diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 57 |
1 files changed, 33 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b7f3999e82..2d11ea02aa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,16 +57,17 @@ OPTION(WITH_PLAYER "Build Player" OFF) OPTION(WITH_GAMEENGINE "Enable Game Engine" ON) OPTION(WITH_BULLET "Enable Bullet (Physics Engine)" ON) OPTION(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON) -OPTION(WITH_VERSE "Enable Verse (http://verse.blender.org)" OFF) OPTION(WITH_ELBEEM "Enable Elbeem (Fluid Simulation)" ON) OPTION(WITH_QUICKTIME "Enable Quicktime Support" OFF) OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON) OPTION(WITH_DDS "Enable DDS Support" ON) OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF) +OPTION(WITH_PYTHON "Enable Embedded Python API" ON) OPTION(WITH_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF) OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON) OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF) OPTION(WITH_WEBPLUGIN "Enable Web Plugin (Unix only)" OFF) +OPTION(WITH_YAFRAY "Enable Yafray (Renderer)" OFF) IF(NOT WITH_GAMEENGINE AND WITH_PLAYER) MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE") @@ -184,7 +185,7 @@ IF(UNIX) SET(ZLIB_LIB z) - SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++") + SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11 -ldl") IF(WITH_OPENMP) SET(LLIBS "${LLIBS} -lgomp") @@ -197,6 +198,9 @@ IF(UNIX) SET(PLATFORM_LINKFLAGS "-pthread") + # Better warnings + SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wnested-externs -Wdeclaration-after-statement") + INCLUDE_DIRECTORIES(/usr/include /usr/local/include) ENDIF(UNIX) @@ -219,11 +223,15 @@ IF(WIN32) SET(PYTHON_LIB python25) SET(PYTHON_LIBPATH ${PYTHON}/lib) - #SET(WITH_OPENAL ON) - SET(OPENAL ${LIBDIR}/openal) - SET(OPENAL_INC ${OPENAL}/include ${OPENAL}/include/AL) - SET(OPENAL_LIB openal_static) - SET(OPENAL_LIBPATH ${OPENAL}/lib) + IF(CMAKE_CL_64) + SET(WITH_OPENAL OFF) + ELSE(CMAKE_CL_64) + #SET(WITH_OPENAL ON) + SET(OPENAL ${LIBDIR}/openal) + SET(OPENAL_INC ${OPENAL}/include ${OPENAL}/include/AL) + SET(OPENAL_LIB openal_static) + SET(OPENAL_LIBPATH ${OPENAL}/lib) + ENDIF(CMAKE_CL_64) IF(CMAKE_CL_64) SET(PNG_LIB libpng) @@ -234,11 +242,7 @@ IF(WIN32) SET(ZLIB ${LIBDIR}/zlib) SET(ZLIB_INC ${ZLIB}/include) - IF(CMAKE_CL_64) - SET(ZLIB_LIB zlib) - ELSE(CMAKE_CL_64) - SET(ZLIB_LIB libz) - ENDIF(CMAKE_CL_64) + SET(ZLIB_LIB libz) SET(ZLIB_LIBPATH ${ZLIB}/lib) SET(PTHREADS ${LIBDIR}/pthreads) @@ -345,22 +349,28 @@ IF(APPLE) SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-6.1-powerpc) ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386) - INCLUDE(${CMAKE_ROOT}/Modules/FindOpenAL.cmake) - IF(OPENAL_FOUND) - SET(WITH_OPENAL ON) - SET(OPENAL_LIB ${OPENAL_LIBRARY}) - SET(OPENAL_INC ${OPENAL_INCLUDE_DIR}) - ELSE(OPENAL_FOUND) - SET(WITH_OPENAL OFF) - ENDIF(OPENAL_FOUND) + IF(WITH_OPENAL) + INCLUDE(${CMAKE_ROOT}/Modules/FindOpenAL.cmake) + IF(OPENAL_FOUND) + SET(WITH_OPENAL ON) + SET(OPENAL_LIB ${OPENAL_LIBRARY}) + SET(OPENAL_INC ${OPENAL_INCLUDE_DIR}) + ELSE(OPENAL_FOUND) + SET(WITH_OPENAL OFF) + ENDIF(OPENAL_FOUND) + ENDIF(WITH_OPENAL) SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/) - SET(PYTHON_VERSION 2.3) + SET(PYTHON_VERSION 2.5) SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE STRING "") SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION} CACHE STRING "") SET(PYTHON_LIB "") SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "") - SET(PYTHON_LINKFLAGS "-u __dummy -u _PyMac_Error -framework System -framework Python") + IF(CMAKE_SYSTEM_VERSION GREATER 10.4) + SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python") + ELSE(CMAKE_SYSTEM_VERSION GREATER 10.4) + SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python") + ENDIF(CMAKE_SYSTEM_VERSION GREATER 10.4) SET(GETTEXT ${LIBDIR}/gettext) SET(GETTEXT_INC "${GETTEXT}/include") @@ -425,7 +435,6 @@ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") #----------------------------------------------------------------------------- # Common. -SET(VERSE_INC ${CMAKE_SOURCE_DIR}/extern/verse/dist) SET(FTGL ${CMAKE_SOURCE_DIR}/extern/bFTGL) SET(FTGL_INC ${FTGL}/include) @@ -458,7 +467,7 @@ ENDIF(WITH_GAMEENGINE) IF(WITH_BULLET) SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DWITH_BULLET ") ENDIF(WITH_BULLET) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ") #----------------------------------------------------------------------------- |