CMake:
authorCampbell Barton <ideasman42@gmail.com>
Sun, 6 Jun 2010 13:32:58 +0000 (13:32 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 6 Jun 2010 13:32:58 +0000 (13:32 +0000)
- WITH_LCMS added option, was supported in scons.
- commented web plugin option since its not maintained.
- some formatting changes and removed includes that are not needed for source/creator/CMakeLists.txt.

CMake/macros.cmake
CMakeLists.txt
source/blender/blenkernel/CMakeLists.txt
source/blender/editors/space_image/CMakeLists.txt
source/blender/makesrna/intern/CMakeLists.txt
source/creator/CMakeLists.txt

index 54b14dbd5ce4e0efff485b2d097ea101fd8b8737..914547e168e351228ea5de8b33b4fb1b5128ec8b 100644 (file)
 MACRO(BLENDERLIB_NOLIST
-  name
-  sources
-  includes)
-
-  # Gather all headers
-  FILE(GLOB_RECURSE INC_ALL *.h)
-     
-  INCLUDE_DIRECTORIES(${includes})
-  ADD_LIBRARY(${name} ${INC_ALL} ${sources})
-
-  # Group by location on disk
-  SOURCE_GROUP(Files FILES CMakeLists.txt)
-  SET(ALL_FILES ${sources} ${INC_ALL})
-  FOREACH(SRC ${ALL_FILES})
-    STRING(REGEX REPLACE ${CMAKE_CURRENT_SOURCE_DIR} "Files" REL_DIR "${SRC}")
-    STRING(REGEX REPLACE "[\\\\/][^\\\\/]*$" "" REL_DIR "${REL_DIR}")
-    STRING(REGEX REPLACE "^[\\\\/]" "" REL_DIR "${REL_DIR}")
-    IF(REL_DIR)
-      SOURCE_GROUP(${REL_DIR} FILES ${SRC})
-    ELSE(REL_DIR)
-      SOURCE_GROUP(Files FILES ${SRC})
-    ENDIF(REL_DIR)
-  ENDFOREACH(SRC)
-
-  MESSAGE(STATUS "Configuring library ${name}")
+       name
+       sources
+       includes)
+
+       # Gather all headers
+       FILE(GLOB_RECURSE INC_ALL *.h)
+                
+       INCLUDE_DIRECTORIES(${includes})
+       ADD_LIBRARY(${name} ${INC_ALL} ${sources})
+
+       # Group by location on disk
+       SOURCE_GROUP(Files FILES CMakeLists.txt)
+       SET(ALL_FILES ${sources} ${INC_ALL})
+       FOREACH(SRC ${ALL_FILES})
+               STRING(REGEX REPLACE ${CMAKE_CURRENT_SOURCE_DIR} "Files" REL_DIR "${SRC}")
+               STRING(REGEX REPLACE "[\\\\/][^\\\\/]*$" "" REL_DIR "${REL_DIR}")
+               STRING(REGEX REPLACE "^[\\\\/]" "" REL_DIR "${REL_DIR}")
+               IF(REL_DIR)
+                       SOURCE_GROUP(${REL_DIR} FILES ${SRC})
+               ELSE(REL_DIR)
+                       SOURCE_GROUP(Files FILES ${SRC})
+               ENDIF(REL_DIR)
+       ENDFOREACH(SRC)
+
+       MESSAGE(STATUS "Configuring library ${name}")
 ENDMACRO(BLENDERLIB_NOLIST)
 
 MACRO(BLENDERLIB
-  name
-  sources
-  includes)
+       name
+       sources
+       includes)
 
-  BLENDERLIB_NOLIST(${name} "${sources}" "${includes}")
+       BLENDERLIB_NOLIST(${name} "${sources}" "${includes}")
 
-  # Add to blender's list of libraries
-  FILE(APPEND ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt "${name};")
+       # Add to blender's list of libraries
+       FILE(APPEND ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt "${name};")
 ENDMACRO(BLENDERLIB)
 
 MACRO(SETUP_LIBDIRS)
-  # see "cmake --help-policy CMP0003"
-  if(COMMAND cmake_policy)
-    CMAKE_POLICY(SET CMP0003 NEW)
-  endif(COMMAND cmake_policy)
-  
-  LINK_DIRECTORIES(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH} ${LIBSAMPLERATE_LIBPATH})
-  
-  IF(WITH_PYTHON)
-    LINK_DIRECTORIES(${PYTHON_LIBPATH})
-  ENDIF(WITH_PYTHON)
-  IF(WITH_INTERNATIONAL)
-    LINK_DIRECTORIES(${ICONV_LIBPATH})
-    LINK_DIRECTORIES(${GETTEXT_LIBPATH})
-  ENDIF(WITH_INTERNATIONAL)
-  IF(WITH_SDL)
-    LINK_DIRECTORIES(${SDL_LIBPATH})
-  ENDIF(WITH_SDL)
-  IF(WITH_FFMPEG)
-    LINK_DIRECTORIES(${FFMPEG_LIBPATH})
-  ENDIF(WITH_FFMPEG)
-  IF(WITH_OPENEXR)
-    LINK_DIRECTORIES(${OPENEXR_LIBPATH})
-  ENDIF(WITH_OPENEXR)
-  IF(WITH_TIFF)
-    LINK_DIRECTORIES(${TIFF_LIBPATH})
-  ENDIF(WITH_TIFF)
-  IF(WITH_QUICKTIME)
-    LINK_DIRECTORIES(${QUICKTIME_LIBPATH})
-  ENDIF(WITH_QUICKTIME)
-  IF(WITH_OPENAL)
-    LINK_DIRECTORIES(${OPENAL_LIBPATH})
-  ENDIF(WITH_OPENAL)
-  IF(WITH_JACK)
-    LINK_DIRECTORIES(${JACK_LIBPATH})
-  ENDIF(WITH_JACK)
-  IF(WITH_SNDFILE)
-    LINK_DIRECTORIES(${SNDFILE_LIBPATH})
-  ENDIF(WITH_SNDFILE)
-  IF(WITH_FFTW3)
-    LINK_DIRECTORIES(${FFTW3_LIBPATH})
-  ENDIF(WITH_FFTW3)
-  IF(WITH_OPENCOLLADA)
-    LINK_DIRECTORIES(${OPENCOLLADA_LIBPATH})
-    LINK_DIRECTORIES(${PCRE_LIBPATH})
-    LINK_DIRECTORIES(${EXPAT_LIBPATH})
-  ENDIF(WITH_OPENCOLLADA)
-
-  IF(WIN32)
-    LINK_DIRECTORIES(${PTHREADS_LIBPATH})
-  ENDIF(WIN32)
+       # see "cmake --help-policy CMP0003"
+       if(COMMAND cmake_policy)
+               CMAKE_POLICY(SET CMP0003 NEW)
+       endif(COMMAND cmake_policy)
+       
+       LINK_DIRECTORIES(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH} ${LIBSAMPLERATE_LIBPATH})
+       
+       IF(WITH_PYTHON)
+               LINK_DIRECTORIES(${PYTHON_LIBPATH})
+       ENDIF(WITH_PYTHON)
+       IF(WITH_INTERNATIONAL)
+               LINK_DIRECTORIES(${ICONV_LIBPATH})
+               LINK_DIRECTORIES(${GETTEXT_LIBPATH})
+       ENDIF(WITH_INTERNATIONAL)
+       IF(WITH_SDL)
+               LINK_DIRECTORIES(${SDL_LIBPATH})
+       ENDIF(WITH_SDL)
+       IF(WITH_FFMPEG)
+               LINK_DIRECTORIES(${FFMPEG_LIBPATH})
+       ENDIF(WITH_FFMPEG)
+       IF(WITH_OPENEXR)
+               LINK_DIRECTORIES(${OPENEXR_LIBPATH})
+       ENDIF(WITH_OPENEXR)
+       IF(WITH_TIFF)
+               LINK_DIRECTORIES(${TIFF_LIBPATH})
+       ENDIF(WITH_TIFF)
+       IF(WITH_LCMS)
+               LINK_DIRECTORIES(${LCMS_LIBPATH})
+       ENDIF(WITH_LCMS)
+       IF(WITH_QUICKTIME)
+               LINK_DIRECTORIES(${QUICKTIME_LIBPATH})
+       ENDIF(WITH_QUICKTIME)
+       IF(WITH_OPENAL)
+               LINK_DIRECTORIES(${OPENAL_LIBPATH})
+       ENDIF(WITH_OPENAL)
+       IF(WITH_JACK)
+               LINK_DIRECTORIES(${JACK_LIBPATH})
+       ENDIF(WITH_JACK)
+       IF(WITH_SNDFILE)
+               LINK_DIRECTORIES(${SNDFILE_LIBPATH})
+       ENDIF(WITH_SNDFILE)
+       IF(WITH_FFTW3)
+               LINK_DIRECTORIES(${FFTW3_LIBPATH})
+       ENDIF(WITH_FFTW3)
+       IF(WITH_OPENCOLLADA)
+               LINK_DIRECTORIES(${OPENCOLLADA_LIBPATH})
+               LINK_DIRECTORIES(${PCRE_LIBPATH})
+               LINK_DIRECTORIES(${EXPAT_LIBPATH})
+       ENDIF(WITH_OPENCOLLADA)
+
+       IF(WIN32)
+               LINK_DIRECTORIES(${PTHREADS_LIBPATH})
+       ENDIF(WIN32)
 ENDMACRO(SETUP_LIBDIRS)
 
 MACRO(SETUP_LIBLINKS
-  target)
-  SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ")
-
-  TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${LLIBS})
-
-  # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
-  IF(WITH_PYTHON)
-    TARGET_LINK_LIBRARIES(${target} ${PYTHON_LINKFLAGS})
-  
-    IF(WIN32)
-      TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d)
-      TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB})
-    ELSE(WIN32)
-      TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB})
-    ENDIF(WIN32)
-  ENDIF(WITH_PYTHON)
-  
-  TARGET_LINK_LIBRARIES(${target} ${OPENGL_glu_LIBRARY} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB})
-  TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIBRARY} ${LIBSAMPLERATE_LIB})
-
-  IF(WITH_INTERNATIONAL)
-    TARGET_LINK_LIBRARIES(${target} ${GETTEXT_LIB})
-       
-    IF(WIN32)
-      TARGET_LINK_LIBRARIES(${target} ${ICONV_LIB})
-    ENDIF(WIN32)
-  ENDIF(WITH_INTERNATIONAL)
-  
-  IF(WITH_OPENAL)
-    TARGET_LINK_LIBRARIES(${target} ${OPENAL_LIBRARY})
-  ENDIF(WITH_OPENAL)
-  IF(WITH_FFTW3)  
-    TARGET_LINK_LIBRARIES(${target} ${FFTW3_LIB})
-  ENDIF(WITH_FFTW3)
-  IF(WITH_JACK)
-    TARGET_LINK_LIBRARIES(${target} ${JACK_LIB})
-  ENDIF(WITH_JACK)
-  IF(WITH_SNDFILE)
-    TARGET_LINK_LIBRARIES(${target} ${SNDFILE_LIB})
-  ENDIF(WITH_SNDFILE)
-  IF(WITH_SDL)
-    TARGET_LINK_LIBRARIES(${target} ${SDL_LIBRARY})
-  ENDIF(WITH_SDL)
-  IF(WITH_QUICKTIME)
-    TARGET_LINK_LIBRARIES(${target} ${QUICKTIME_LIB})
-  ENDIF(WITH_QUICKTIME)
-  IF(WITH_TIFF)
-    TARGET_LINK_LIBRARIES(${target} ${TIFF_LIBRARY})
-  ENDIF(WITH_TIFF)
-  IF(WITH_OPENEXR)
-    IF(WIN32)
-      FOREACH(loop_var ${OPENEXR_LIB})
-        TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d)
-        TARGET_LINK_LIBRARIES(${target} optimized ${loop_var})
-      ENDFOREACH(loop_var)
-    ELSE(WIN32)
-      TARGET_LINK_LIBRARIES(${target} ${OPENEXR_LIB})
-    ENDIF(WIN32)
-  ENDIF(WITH_OPENEXR)
-  IF(WITH_FFMPEG)
-    TARGET_LINK_LIBRARIES(${target} ${FFMPEG_LIB})
-  ENDIF(WITH_FFMPEG)
-  IF(WITH_OPENCOLLADA)
-    IF(WIN32)
-      FOREACH(loop_var ${OPENCOLLADA_LIB})
-        TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d)
-        TARGET_LINK_LIBRARIES(${target} optimized ${loop_var})
-      ENDFOREACH(loop_var)
-      TARGET_LINK_LIBRARIES(${target} debug ${PCRE_LIB}_d)
-      TARGET_LINK_LIBRARIES(${target} optimized ${PCRE_LIB})
-      IF(EXPAT_LIB)
-        TARGET_LINK_LIBRARIES(${target} debug ${EXPAT_LIB}_d)
-        TARGET_LINK_LIBRARIES(${target} optimized ${EXPAT_LIB})
-      ENDIF(EXPAT_LIB)
-    ELSE(WIN32)
-         TARGET_LINK_LIBRARIES(${target} ${OPENCOLLADA_LIB})
-      TARGET_LINK_LIBRARIES(${target} ${PCRE_LIB})
-      TARGET_LINK_LIBRARIES(${target} ${EXPAT_LIB})
-    ENDIF(WIN32)
-  ENDIF(WITH_OPENCOLLADA)
-  IF(WIN32)
-    TARGET_LINK_LIBRARIES(${target} ${PTHREADS_LIB})
-  ENDIF(WIN32)
-ENDMACRO(SETUP_LIBLINKS)
+       target)
+       SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ")
 
+       TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${LLIBS})
+
+       # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
+       IF(WITH_PYTHON)
+               TARGET_LINK_LIBRARIES(${target} ${PYTHON_LINKFLAGS})
+
+               IF(WIN32)
+                       TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d)
+                       TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB})
+               ELSE(WIN32)
+                       TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB})
+               ENDIF(WIN32)
+       ENDIF(WITH_PYTHON)
+
+       TARGET_LINK_LIBRARIES(${target} ${OPENGL_glu_LIBRARY} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB})
+       TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIBRARY} ${LIBSAMPLERATE_LIB})
+
+       IF(WITH_INTERNATIONAL)
+               TARGET_LINK_LIBRARIES(${target} ${GETTEXT_LIB})
+
+               IF(WIN32)
+                       TARGET_LINK_LIBRARIES(${target} ${ICONV_LIB})
+               ENDIF(WIN32)
+       ENDIF(WITH_INTERNATIONAL)
+
+       IF(WITH_OPENAL)
+               TARGET_LINK_LIBRARIES(${target} ${OPENAL_LIBRARY})
+       ENDIF(WITH_OPENAL)
+       IF(WITH_FFTW3)  
+               TARGET_LINK_LIBRARIES(${target} ${FFTW3_LIB})
+       ENDIF(WITH_FFTW3)
+       IF(WITH_JACK)
+               TARGET_LINK_LIBRARIES(${target} ${JACK_LIB})
+       ENDIF(WITH_JACK)
+       IF(WITH_SNDFILE)
+               TARGET_LINK_LIBRARIES(${target} ${SNDFILE_LIB})
+       ENDIF(WITH_SNDFILE)
+       IF(WITH_SDL)
+               TARGET_LINK_LIBRARIES(${target} ${SDL_LIBRARY})
+       ENDIF(WITH_SDL)
+       IF(WITH_QUICKTIME)
+               TARGET_LINK_LIBRARIES(${target} ${QUICKTIME_LIB})
+       ENDIF(WITH_QUICKTIME)
+       IF(WITH_TIFF)
+               TARGET_LINK_LIBRARIES(${target} ${TIFF_LIBRARY})
+       ENDIF(WITH_TIFF)
+       IF(WITH_OPENEXR)
+               IF(WIN32)
+                       FOREACH(loop_var ${OPENEXR_LIB})
+                               TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d)
+                               TARGET_LINK_LIBRARIES(${target} optimized ${loop_var})
+                       ENDFOREACH(loop_var)
+               ELSE(WIN32)
+                       TARGET_LINK_LIBRARIES(${target} ${OPENEXR_LIB})
+               ENDIF(WIN32)
+       ENDIF(WITH_OPENEXR)
+       IF(WITH_LCMS)
+               TARGET_LINK_LIBRARIES(${target} ${LCMS_LIBRARY})
+       ENDIF(WITH_LCMS)
+       IF(WITH_FFMPEG)
+               TARGET_LINK_LIBRARIES(${target} ${FFMPEG_LIB})
+       ENDIF(WITH_FFMPEG)
+       IF(WITH_OPENCOLLADA)
+               IF(WIN32)
+                       FOREACH(loop_var ${OPENCOLLADA_LIB})
+                               TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d)
+                               TARGET_LINK_LIBRARIES(${target} optimized ${loop_var})
+                       ENDFOREACH(loop_var)
+                       TARGET_LINK_LIBRARIES(${target} debug ${PCRE_LIB}_d)
+                       TARGET_LINK_LIBRARIES(${target} optimized ${PCRE_LIB})
+                       IF(EXPAT_LIB)
+                               TARGET_LINK_LIBRARIES(${target} debug ${EXPAT_LIB}_d)
+                               TARGET_LINK_LIBRARIES(${target} optimized ${EXPAT_LIB})
+                       ENDIF(EXPAT_LIB)
+               ELSE(WIN32)
+               TARGET_LINK_LIBRARIES(${target} ${OPENCOLLADA_LIB})
+                       TARGET_LINK_LIBRARIES(${target} ${PCRE_LIB})
+                       TARGET_LINK_LIBRARIES(${target} ${EXPAT_LIB})
+               ENDIF(WIN32)
+       ENDIF(WITH_OPENCOLLADA)
+       IF(WIN32)
+               TARGET_LINK_LIBRARIES(${target} ${PTHREADS_LIB})
+       ENDIF(WIN32)
+ENDMACRO(SETUP_LIBLINKS)
index 7202ff9024c5b971737c6b5e674abdc37ae507f0..ab525febc571753c7d4798c7ac92e3fa332c5ede 100644 (file)
@@ -57,54 +57,76 @@ SET(BLENDER_VERSION  2.5)
 
 #-----------------------------------------------------------------------------
 # Set default config options
-OPTION(WITH_PLAYER        "Build Player" OFF)
-OPTION(WITH_GAMEENGINE    "Enable Game Engine" ON)
-OPTION(WITH_BULLET        "Enable Bullet (Physics Engine)" ON)
+
+# Blender internal features
 OPTION(WITH_INTERNATIONAL "Enable I18N   (International fonts and text)" ON)
+OPTION(WITH_LCMS          "Enable color correction with lcms" OFF)
+OPTION(WITH_PYTHON        "Enable Embedded Python API" ON)
+OPTION(WITH_BUILDINFO     "Include extra build details" ON)
 OPTION(WITH_ELBEEM        "Enable Elbeem (Fluid Simulation)" ON)
+OPTION(WITH_FFTW3         "Enable FFTW3 support (Used for smoke and audio effects)" OFF)
+OPTION(WITH_BULLET        "Enable Bullet (Physics Engine)" ON)
+OPTION(WITH_GAMEENGINE    "Enable Game Engine" ON)
+OPTION(WITH_PLAYER        "Build Player" OFF)
+# (unix defaults to OpenMP On)
+IF(UNIX AND NOT APPLE)
+       OPTION(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" ON)
+ELSE()
+       OPTION(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" OFF)
+ENDIF()
+
+# Image format support
 OPTION(WITH_OPENEXR       "Enable OpenEXR Support (http://www.openexr.com)" ON)
+OPTION(WITH_OPENJPEG      "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF)
 OPTION(WITH_TIFF          "Enable LibTIFF Support" ON)
 OPTION(WITH_DDS           "Enable DDS Support" ON)
+
+# Audio format support
 OPTION(WITH_FFMPEG        "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
-OPTION(WITH_PYTHON        "Enable Embedded Python API" ON)
-OPTION(WITH_SDL           "Enable SDL for sound and joystick support" 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_WEBPLUGIN     "Enable Web Plugin (Unix only)" OFF)
-OPTION(WITH_FFTW3         "Enable FFTW3 support" OFF)
-OPTION(WITH_JACK          "Enable Jack Support (http://www.jackaudio.org)" OFF)
 OPTION(WITH_SNDFILE       "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
-OPTION(WITH_LZO           "Enable fast LZO compression, used for pointcache" ON)
-OPTION(WITH_LZMA          "Enable best LZMA compression, used for pointcache" ON)
-OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation" OFF)
-OPTION(WITH_BUILDINFO     "Include extra build details" ON)
-OPTION(WITH_INSTALL       "Install accompanying scripts and language files needed to run blender" ON)
-OPTION(WITH_RAYOPTIMIZATION    "Enable use of SIMD (SSE) optimizations for the raytracer" OFF) 
-
 IF(APPLE OR WIN32)
        OPTION(WITH_QUICKTIME     "Enable Quicktime Support" OFF)
 ENDIF(APPLE OR WIN32)
 
-# Unix defaults to OpenMP On
-# Disable opencollada on non-apple unix because opencollada has no package for debian
+# 3D format support
+# disable opencollada on non-apple unix because opencollada has no package for debian
 IF(UNIX AND NOT APPLE)
-       OPTION(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" ON)
        OPTION(WITH_OPENCOLLADA         "Enable OpenCollada Support (http://www.opencollada.org/)"      OFF)
 ELSE()
-       OPTION(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" OFF)
        OPTION(WITH_OPENCOLLADA         "Enable OpenCollada Support (http://www.opencollada.org/)"      OFF)
 ENDIF()
 
+# Sound output
+OPTION(WITH_SDL           "Enable SDL for sound and joystick support" ON)
+OPTION(WITH_OPENAL        "Enable OpenAL Support (http://www.openal.org)" ON)
+OPTION(WITH_JACK          "Enable Jack Support (http://www.jackaudio.org)" OFF)
+
+# Compression
+OPTION(WITH_LZO           "Enable fast LZO compression (used for pointcache)" ON)
+OPTION(WITH_LZMA          "Enable best LZMA compression, (used for pointcache)" ON)
+
+# Misc
+OPTION(WITH_RAYOPTIMIZATION    "Enable use of SIMD (SSE) optimizations for the raytracer" OFF) 
+OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking" OFF)
+OPTION(WITH_INSTALL       "Install accompanying scripts and language files needed to run blender" ON)
+
 IF (APPLE)
        OPTION(WITH_COCOA         "Use Cocoa framework instead of deprecated Carbon" ON)
        OPTION(USE_QTKIT          "Use QtKit instead of Carbon quicktime (needed for having partial quicktime for 64bit)" OFF)
        OPTION(WITH_LIBS10.5  "Use 10.5 libs (needed for 64bit builds)" OFF)
-ENDIF (APPLE)
+ENDIF(APPLE)
+
+IF(NOT WITH_BULLET AND WITH_GAMEENGINE)
+       MESSAGE("WARNING: WITH_GAMEENGINE needs WITH_BULLET")
+ENDIF(NOT WITH_BULLET AND WITH_GAMEENGINE)
 
 IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
        MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
 ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
 
+# disabled for now, not supported
+# OPTION(WITH_WEBPLUGIN     "Enable Web Plugin (Unix only)" OFF)
+
 # For alternate Python locations the commandline can be used to override detected/default cache settings, e.g:
 # On Unix: 
 #   cmake -D PYTHON_LIB=/usr/local/lib/python3.1/config/libpython3.1.so -D PYTHON_INC=/usr/local/include/python3.1 -G "Unix Makefiles" ../blender
@@ -179,7 +201,6 @@ IF(UNIX AND NOT APPLE)
                SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
        ENDIF(WITH_PYTHON)
 
-
        IF(WITH_SDL)
                FIND_PACKAGE(SDL)
                # UNSET(SDLMAIN_LIBRARY CACHE)
@@ -203,13 +224,33 @@ IF(UNIX AND NOT APPLE)
                SET(OPENEXR_LIB Half IlmImf Iex Imath)
        ENDIF(WITH_OPENEXR)
 
+       IF(WITH_TIFF)
+               FIND_PACKAGE(TIFF)
+               IF(NOT TIFF_FOUND)
+                       SET(WITH_TIFF OFF)
+               ENDIF(NOT TIFF_FOUND)
+       ENDIF(WITH_TIFF)
+
+       FIND_PACKAGE(JPEG REQUIRED)
+
+       FIND_PACKAGE(PNG REQUIRED)
+
+       FIND_PACKAGE(ZLIB REQUIRED)
+
+       IF(WITH_LCMS)
+               SET(LCMS /usr CACHE FILEPATH "LCMS directory")
+               SET(LCMS_INCLUDE_DIR ${LCMS}/include)
+               SET(LCMS_LIBRARY lcms)
+               SET(LCMS_LIBPATH ${LCMS}/lib)
+       ENDIF(WITH_LCMS)
+
        IF(WITH_FFMPEG)
                SET(FFMPEG /usr CACHE FILEPATH "FFMPEG Directory")
                SET(FFMPEG_INC ${FFMPEG}/include)
                SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
                SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
        ENDIF(WITH_FFMPEG)
-  
+
        IF(WITH_FFTW3)
                SET(FFTW3 /usr)
                SET(FFTW3_INC ${FFTW3}/include)
@@ -222,19 +263,6 @@ IF(UNIX AND NOT APPLE)
        SET(LIBSAMPLERATE_LIB samplerate)
        SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
 
-       IF(WITH_TIFF)
-               FIND_PACKAGE(TIFF)
-               IF(NOT TIFF_FOUND)
-                       SET(WITH_TIFF OFF)
-               ENDIF(NOT TIFF_FOUND)
-       ENDIF(WITH_TIFF)
-
-       FIND_PACKAGE(JPEG REQUIRED)
-
-       FIND_PACKAGE(PNG REQUIRED)
-
-       FIND_PACKAGE(ZLIB REQUIRED)
-
        IF (WITH_OPENCOLLADA)
                SET(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory")
                SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
@@ -429,6 +457,8 @@ IF(WIN32)
                        SET(PCRE_LIB pcre)
                ENDIF(WITH_OPENCOLLADA)
                
+        # TODO: IF(WITH_LCMS)
+        
                IF(WITH_FFMPEG)
                        SET(FFMPEG ${LIBDIR}/ffmpeg)
                        SET(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc)
@@ -632,10 +662,12 @@ IF(APPLE)
                SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
        ENDIF(PYTHON_VERSION MATCHES 3.1)
 
-       SET(GETTEXT ${LIBDIR}/gettext)
-       SET(GETTEXT_INC "${GETTEXT}/include")
-       SET(GETTEXT_LIB intl iconv)
-       SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
+       IF(WITH_INTERNATIONAL)
+               SET(GETTEXT ${LIBDIR}/gettext)
+               SET(GETTEXT_INC "${GETTEXT}/include")
+               SET(GETTEXT_LIB intl iconv)
+               SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
+       ENDIF(WITH_INTERNATIONAL)
   
        IF(WITH_FFTW3)
                SET(FFTW3 ${LIBDIR}/fftw3)
@@ -656,15 +688,21 @@ IF(APPLE)
        SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
        SET(FREETYPE_LIBRARY freetype)
 
-       SET(OPENEXR ${LIBDIR}/openexr)
-       SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
-       SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
-       SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
+       IF(WITH_OPENEXR)
+               SET(OPENEXR ${LIBDIR}/openexr)
+               SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
+               SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
+               SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
+       ENDIF(WITH_OPENEXR)
 
-       SET(FFMPEG ${LIBDIR}/ffmpeg)
-       SET(FFMPEG_INC ${FFMPEG}/include)
-       SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg)
-       SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+    # TODO: IF(WITH_LCMS)
+
+       IF(WITH_FFMPEG)
+               SET(FFMPEG ${LIBDIR}/ffmpeg)
+               SET(FFMPEG_INC ${FFMPEG}/include)
+               SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg)
+               SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+       ENDIF(WITH_FFMPEG)
 
        SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
        SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
@@ -712,10 +750,12 @@ IF(APPLE)
                SET(EXPAT_LIB)
        ENDIF (WITH_OPENCOLLADA)
 
-       SET(SDL ${LIBDIR}/sdl)
-       SET(SDL_INCLUDE_DIR ${SDL}/include)
-       SET(SDL_LIBRARY SDL)
-       SET(SDL_LIBPATH ${SDL}/lib)
+       IF(WITH_SDL)
+               SET(SDL ${LIBDIR}/sdl)
+               SET(SDL_INCLUDE_DIR ${SDL}/include)
+               SET(SDL_LIBRARY SDL)
+               SET(SDL_LIBPATH ${SDL}/lib)
+       ENDIF(WITH_SDL)
 
        SET(PNG "${LIBDIR}/png")
        SET(PNG_INC "${PNG}/include")
@@ -725,10 +765,12 @@ IF(APPLE)
        SET(JPEG_INC "${JPEG}/include")
        SET(JPEG_LIBPATH ${JPEG}/lib)
 
-       SET(TIFF ${LIBDIR}/tiff)
-       SET(TIFF_INCLUDE_DIR ${TIFF}/include)
-       SET(TIFF_LIBRARY tiff)
-       SET(TIFF_LIBPATH ${TIFF}/lib)
+       IF(WITH_TIFF)
+               SET(TIFF ${LIBDIR}/tiff)
+               SET(TIFF_INCLUDE_DIR ${TIFF}/include)
+               SET(TIFF_LIBRARY tiff)
+               SET(TIFF_LIBPATH ${TIFF}/lib)
+       ENDIF(WITH_TIFF)
 
        SET(EXETYPE MACOSX_BUNDLE)
 
index 68684bcc0a15203dcd9491b60d00ec357ce56f15..bcd60154379efaefd53b9158a70cef088be37068 100644 (file)
@@ -72,6 +72,11 @@ IF(WITH_FFMPEG)
        ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
+IF(WITH_LCMS)
+       SET(INC ${INC} ${LCMS_INCLUDE_DIR})
+       ADD_DEFINITIONS(-DWITH_LCMS)
+ENDIF(WITH_LCMS)
+
 IF(WITH_PYTHON)
        SET(INC ${INC} ../python ${PYTHON_INC})
 ELSE(WITH_PYTHON)
index 34c7c774774eb06a09b5f148ec8a0dd45fd04d62..71eebdb9b1e89513b3bad15557166a5c8f22ca22 100644 (file)
@@ -41,6 +41,11 @@ IF(WITH_TIFF)
        ADD_DEFINITIONS(-DWITH_TIFF)
 ENDIF(WITH_TIFF)
 
+IF(WITH_LCMS)
+       SET(INC ${INC} ${LCMS_INCLUDE_DIR})
+       ADD_DEFINITIONS(-DWITH_LCMS)
+ENDIF(WITH_LCMS)
+
 IF(WIN32)
        SET(INC ${INC} ${PTHREADS_INC})
 ENDIF(WIN32)
index e9fc5c10f9eed9ed036c0574ee0dc0a136c02881..9b824279d8db025676c02e4fb366eacc64a2a64b 100644 (file)
@@ -32,14 +32,28 @@ LIST(REMOVE_ITEM DEFSRC ${APISRC})
 STRING(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}")
 
 SET(SRC
-               makesrna.c
-               rna_define.c
-               ${DEFSRC}
-               ${APISRC}
-               ../../../../intern/guardedalloc/intern/mallocn.c
-               ../../../../intern/guardedalloc/intern/mmap_win.c)
-
-INCLUDE_DIRECTORIES(../../../../intern/audaspace/intern ../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../ikplugin ../../windowmanager ../../editors/include ../../gpu ../../imbuf ../../render/extern/include .)
+       makesrna.c
+       rna_define.c
+       ${DEFSRC}
+       ${APISRC}
+       ../../../../intern/guardedalloc/intern/mallocn.c
+       ../../../../intern/guardedalloc/intern/mmap_win.c)
+
+INCLUDE_DIRECTORIES(
+       ../../../../intern/audaspace/intern
+       ../../../../intern/guardedalloc
+       ..
+       ../../makesdna
+       ../../blenkernel
+       ../../blenlib
+       ../../ikplugin
+       ../../windowmanager
+       ../../editors/include
+       ../../gpu
+       ../../imbuf
+       ../../render/extern/include
+       . )
+
 FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
 
 IF(NOT WITH_PYTHON)
@@ -80,6 +94,11 @@ IF(WITH_FFMPEG)
        ADD_DEFINITIONS(-DWITH_FFMPEG)
 ENDIF(WITH_FFMPEG)
 
+IF(WITH_LCMS)
+       SET(INC ${INC} ${LCMS_INCLUDE_DIR})
+       ADD_DEFINITIONS(-DWITH_LCMS)
+ENDIF(WITH_LCMS)
+
 IF(NOT WITH_ELBEEM)
        ADD_DEFINITIONS(-DDISABLE_ELBEEM)
 ENDIF(NOT WITH_ELBEEM)
index 97a85b5b70b14fcca28b7858ef2ee85b2ea69488..11997550ee11db318a726edd54ee8d737c940796 100644 (file)
@@ -29,24 +29,19 @@ CMAKE_POLICY(SET CMP0005 NEW)
 
 SETUP_LIBDIRS()
 
-INCLUDE_DIRECTORIES(../../intern/guardedalloc
+INCLUDE_DIRECTORIES(
+       ../../intern/guardedalloc
        ../blender/blenlib
        ../blender/blenkernel
        ../blender/editors/include
        ../blender/makesrna
-       ../blender/makesrna/intern
-       ../blender/nodes
-       ../blender/include
-       ../blender/blenloader
        ../blender/imbuf
-       ../blender/renderconverter
        ../blender/render/extern/include
        ../blender/makesdna
        ../blender/gpu
        ../blender/windowmanager
        ../kernel/gen_messaging
        ../kernel/gen_system
-       ../../extern/glew/include
 )
 
 IF(WIN32)