use lowercase for cmake builtin names and macros, remove contents in else() and endif...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 8 Dec 2010 08:43:06 +0000 (08:43 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 8 Dec 2010 08:43:06 +0000 (08:43 +0000)
120 files changed:
CMakeLists.txt
build_files/cmake/macros.cmake
extern/CMakeLists.txt
extern/binreloc/CMakeLists.txt
extern/bullet2/CMakeLists.txt
extern/bullet2/src/BulletCollision/CMakeLists.txt
extern/bullet2/src/BulletDynamics/CMakeLists.txt
extern/bullet2/src/BulletSoftBody/CMakeLists.txt
extern/bullet2/src/CMakeLists.txt
extern/bullet2/src/LinearMath/CMakeLists.txt
extern/glew/CMakeLists.txt
extern/libopenjpeg/CMakeLists.txt
extern/libredcode/CMakeLists.txt
extern/lzma/CMakeLists.txt
extern/lzo/CMakeLists.txt
intern/CMakeLists.txt
intern/audaspace/CMakeLists.txt
intern/boolop/CMakeLists.txt
intern/bsp/CMakeLists.txt
intern/container/CMakeLists.txt
intern/decimation/CMakeLists.txt
intern/elbeem/CMakeLists.txt
intern/ghost/CMakeLists.txt
intern/guardedalloc/CMakeLists.txt
intern/iksolver/CMakeLists.txt
intern/itasc/CMakeLists.txt
intern/memutil/CMakeLists.txt
intern/moto/CMakeLists.txt
intern/opennl/CMakeLists.txt
intern/smoke/CMakeLists.txt
intern/string/CMakeLists.txt
source/CMakeLists.txt
source/blender/CMakeLists.txt
source/blender/avi/CMakeLists.txt
source/blender/blenfont/CMakeLists.txt
source/blender/blenkernel/CMakeLists.txt
source/blender/blenlib/CMakeLists.txt
source/blender/blenloader/CMakeLists.txt
source/blender/blenpluginapi/CMakeLists.txt
source/blender/collada/CMakeLists.txt
source/blender/editors/CMakeLists.txt
source/blender/editors/animation/CMakeLists.txt
source/blender/editors/armature/CMakeLists.txt
source/blender/editors/curve/CMakeLists.txt
source/blender/editors/datafiles/CMakeLists.txt
source/blender/editors/gpencil/CMakeLists.txt
source/blender/editors/interface/CMakeLists.txt
source/blender/editors/mesh/CMakeLists.txt
source/blender/editors/metaball/CMakeLists.txt
source/blender/editors/object/CMakeLists.txt
source/blender/editors/physics/CMakeLists.txt
source/blender/editors/render/CMakeLists.txt
source/blender/editors/screen/CMakeLists.txt
source/blender/editors/sculpt_paint/CMakeLists.txt
source/blender/editors/sound/CMakeLists.txt
source/blender/editors/space_action/CMakeLists.txt
source/blender/editors/space_api/CMakeLists.txt
source/blender/editors/space_buttons/CMakeLists.txt
source/blender/editors/space_console/CMakeLists.txt
source/blender/editors/space_file/CMakeLists.txt
source/blender/editors/space_graph/CMakeLists.txt
source/blender/editors/space_image/CMakeLists.txt
source/blender/editors/space_info/CMakeLists.txt
source/blender/editors/space_logic/CMakeLists.txt
source/blender/editors/space_nla/CMakeLists.txt
source/blender/editors/space_node/CMakeLists.txt
source/blender/editors/space_outliner/CMakeLists.txt
source/blender/editors/space_script/CMakeLists.txt
source/blender/editors/space_sequencer/CMakeLists.txt
source/blender/editors/space_sound/CMakeLists.txt
source/blender/editors/space_text/CMakeLists.txt
source/blender/editors/space_time/CMakeLists.txt
source/blender/editors/space_userpref/CMakeLists.txt
source/blender/editors/space_view3d/CMakeLists.txt
source/blender/editors/transform/CMakeLists.txt
source/blender/editors/util/CMakeLists.txt
source/blender/editors/uvedit/CMakeLists.txt
source/blender/gpu/CMakeLists.txt
source/blender/ikplugin/CMakeLists.txt
source/blender/imbuf/CMakeLists.txt
source/blender/imbuf/intern/cineon/CMakeLists.txt
source/blender/imbuf/intern/dds/CMakeLists.txt
source/blender/imbuf/intern/openexr/CMakeLists.txt
source/blender/makesdna/CMakeLists.txt
source/blender/makesdna/intern/CMakeLists.txt
source/blender/makesrna/CMakeLists.txt
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/rna_texture.c
source/blender/modifiers/CMakeLists.txt
source/blender/nodes/CMakeLists.txt
source/blender/python/CMakeLists.txt
source/blender/python/generic/CMakeLists.txt
source/blender/python/intern/CMakeLists.txt
source/blender/quicktime/CMakeLists.txt
source/blender/readblenfile/CMakeLists.txt
source/blender/render/CMakeLists.txt
source/blender/windowmanager/CMakeLists.txt
source/blenderplayer/CMakeLists.txt
source/blenderplayer/bad_level_call_stubs/CMakeLists.txt
source/creator/CMakeLists.txt
source/gameengine/BlenderRoutines/CMakeLists.txt
source/gameengine/CMakeLists.txt
source/gameengine/Converter/CMakeLists.txt
source/gameengine/Expressions/CMakeLists.txt
source/gameengine/GameLogic/CMakeLists.txt
source/gameengine/GamePlayer/CMakeLists.txt
source/gameengine/GamePlayer/common/CMakeLists.txt
source/gameengine/GamePlayer/ghost/CMakeLists.txt
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
source/gameengine/Network/CMakeLists.txt
source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
source/gameengine/Physics/Bullet/CMakeLists.txt
source/gameengine/Physics/Dummy/CMakeLists.txt
source/gameengine/Physics/common/CMakeLists.txt
source/gameengine/Rasterizer/CMakeLists.txt
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
source/gameengine/SceneGraph/CMakeLists.txt
source/gameengine/VideoTexture/CMakeLists.txt
source/kernel/CMakeLists.txt

index 1540e54f694d42cb9095e3c05493fc8335adebd7..0bbb8c6804c169c605b2f2fbc04c06019d14c622 100644 (file)
@@ -30,8 +30,8 @@
 # build the libs and objects in it. It will also conflict with the current 
 # Makefile system for Blender
 
-IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
-MESSAGE(FATAL_ERROR "CMake generation for blender is not allowed within the source directory! 
+if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
+message(FATAL_ERROR "CMake generation for blender is not allowed within the source directory! 
 Remove the CMakeCache.txt file and try again from another folder, e.g.: 
 
        rm CMakeCache.txt 
@@ -40,120 +40,120 @@ Remove the CMakeCache.txt file and try again from another folder, e.g.:
        cd cmake-make
        cmake -G \"Unix Makefiles\" ../blender
 ")
-ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
+endif()
 
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+cmake_minimum_required(VERSION 2.6)
 
 # quiet output for Makefiles, 'make -s' helps too
-# SET_PROPERTY(GLOBAL PROPERTY RULE_MESSAGES OFF)
+# set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
 
-PROJECT(Blender)
+project(Blender)
 
 #-----------------------------------------------------------------------------
 # Redirect output files
 
-SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
-SET(LIBRARY_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/lib)
+set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
+set(LIBRARY_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/lib)
 
 #-----------------------------------------------------------------------------
 # Load some macros.
-INCLUDE(build_files/cmake/macros.cmake)
+include(build_files/cmake/macros.cmake)
 
 #-----------------------------------------------------------------------------
 # Set default config options
 
-GET_BLENDER_VERSION()
+get_blender_version()
 
 # Blender internal features
-OPTION(WITH_INTERNATIONAL "Enable I18N   (International fonts and text)" ON)
-OPTION(WITH_PYTHON        "Enable Embedded Python API" ON)
-OPTION(WITH_BUILDINFO     "Include extra build details" ON)
-OPTION(WITH_IK_ITASC      "Enable ITASC IK solver" 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)
+option(WITH_INTERNATIONAL "Enable I18N   (International fonts and text)" ON)
+option(WITH_PYTHON        "Enable Embedded Python API" ON)
+option(WITH_BUILDINFO     "Include extra build details" ON)
+option(WITH_IK_ITASC      "Enable ITASC IK solver" 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()
+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()
 
 # Modifiers
-OPTION(WITH_MOD_FLUID          "Enable Elbeem Modifier (Fluid Simulation)" ON)
-OPTION(WITH_MOD_DECIMATE               "Enable Decimate Modifier" ON)
-OPTION(WITH_MOD_BOOLEAN                "Enable Boolean Modifier" ON)
+option(WITH_MOD_FLUID          "Enable Elbeem Modifier (Fluid Simulation)" ON)
+option(WITH_MOD_DECIMATE               "Enable Decimate Modifier" ON)
+option(WITH_MOD_BOOLEAN                "Enable Boolean Modifier" ON)
 
 # Image format support
-OPTION(WITH_IMAGE_OPENEXR       "Enable OpenEXR Support (http://www.openexr.com)" ON)
-OPTION(WITH_IMAGE_OPENJPEG      "Enable OpenJpeg Support (http://www.openjpeg.org)" ON)
-OPTION(WITH_IMAGE_TIFF          "Enable LibTIFF Support" ON)
-OPTION(WITH_IMAGE_DDS           "Enable DDS Image Support" ON)
-OPTION(WITH_IMAGE_CINEON        "Enable CINEON and DPX Image Support" ON)
-OPTION(WITH_IMAGE_HDR           "Enable HDR Image Support" ON)
-OPTION(WITH_IMAGE_REDCODE       "Enable RedCode Image Support" OFF)
+option(WITH_IMAGE_OPENEXR       "Enable OpenEXR Support (http://www.openexr.com)" ON)
+option(WITH_IMAGE_OPENJPEG      "Enable OpenJpeg Support (http://www.openjpeg.org)" ON)
+option(WITH_IMAGE_TIFF          "Enable LibTIFF Support" ON)
+option(WITH_IMAGE_DDS           "Enable DDS Image Support" ON)
+option(WITH_IMAGE_CINEON        "Enable CINEON and DPX Image Support" ON)
+option(WITH_IMAGE_HDR           "Enable HDR Image Support" ON)
+option(WITH_IMAGE_REDCODE       "Enable RedCode Image Support" OFF)
 
 # Audio/Video format support
-OPTION(WITH_CODEC_FFMPEG        "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu)" OFF)
-OPTION(WITH_CODEC_SNDFILE       "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
-IF(APPLE OR (WIN32 AND NOT UNIX))
-       OPTION(WITH_CODEC_QUICKTIME     "Enable Quicktime Support" OFF)
-ENDIF(APPLE OR (WIN32 AND NOT UNIX))
+option(WITH_CODEC_FFMPEG        "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu)" OFF)
+option(WITH_CODEC_SNDFILE       "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
+if(APPLE OR (WIN32 AND NOT UNIX))
+       option(WITH_CODEC_QUICKTIME     "Enable Quicktime Support" OFF)
+endif()
 
 # 3D format support
 # disable opencollada on non-apple unix because opencollada has no package for debian
-IF(UNIX AND NOT APPLE)
-       OPTION(WITH_OPENCOLLADA         "Enable OpenCollada Support (http://www.opencollada.org)"       OFF)
-ELSE()
-       OPTION(WITH_OPENCOLLADA         "Enable OpenCollada Support (http://www.opencollada.org)"       OFF)
-ENDIF()
+if(UNIX AND NOT APPLE)
+       option(WITH_OPENCOLLADA         "Enable OpenCollada Support (http://www.opencollada.org)"       OFF)
+else()
+       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)
-OPTION(WITH_SAMPLERATE    "Enable samplerate conversion" ON)
+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)
+option(WITH_SAMPLERATE    "Enable samplerate conversion" ON)
 
 # Compression
-OPTION(WITH_LZO           "Enable fast LZO compression (used for pointcache)" ON)
-OPTION(WITH_LZMA          "Enable best LZMA compression, (used for pointcache)" ON)
+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" ON) 
-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)
-OPTION(WITH_PYTHON_INSTALL       "Copy system python into the blender install folder" ON)
+option(WITH_RAYOPTIMIZATION    "Enable use of SIMD (SSE) optimizations for the raytracer" ON) 
+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)
+option(WITH_PYTHON_INSTALL       "Copy system python into the blender install folder" 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)
+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()
 
 # only for developers who want to make this functional
-# OPTION(WITH_LCMS          "Enable color correction with lcms" OFF)
+# option(WITH_LCMS          "Enable color correction with lcms" OFF)
 
-IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
-       MESSAGE(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
-ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
+if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
+       message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
+endif()
 
-IF(NOT WITH_INSTALL AND WITH_PYTHON_INSTALL)
-       MESSAGE("WARNING: WITH_PYTHON_INSTALL requires WITH_INSTALL")
-ENDIF(NOT WITH_INSTALL AND WITH_PYTHON_INSTALL)
+if(NOT WITH_INSTALL AND WITH_PYTHON_INSTALL)
+       message("WARNING: WITH_PYTHON_INSTALL requires WITH_INSTALL")
+endif()
 
-IF(NOT WITH_SAMPLERATE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK))
-       MESSAGE(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK require WITH_SAMPLERATE")
-ENDIF(NOT WITH_SAMPLERATE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK))
+if(NOT WITH_SAMPLERATE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK))
+       message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK require WITH_SAMPLERATE")
+endif()
 
-IF(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE)
-       MESSAGE(FATAL_ERROR "WITH_IMAGE_REDCODE requires WITH_IMAGE_OPENJPEG")
-ENDIF(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE)
+if(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE)
+       message(FATAL_ERROR "WITH_IMAGE_REDCODE requires WITH_IMAGE_OPENJPEG")
+endif()
 
 TEST_SSE_SUPPORT()
 
 # disabled for now, not supported
-# OPTION(WITH_WEBPLUGIN     "Enable Web Plugin (Unix only)" OFF)
+# 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: 
@@ -166,78 +166,78 @@ TEST_SSE_SUPPORT()
 #-----------------------------------------------------------------------------
 #Platform specifics
 
-IF(UNIX AND NOT APPLE)
-
-       IF(WITH_OPENAL)
-               FIND_PACKAGE(OpenAL)
-               IF(NOT OPENAL_FOUND)
-                       SET(WITH_OPENAL OFF)
-               ENDIF(NOT OPENAL_FOUND)
-       ENDIF(WITH_OPENAL)
-
-       IF(WITH_JACK)
-               SET(JACK /usr)
-               SET(JACK_INC ${JACK}/include/jack)
-               SET(JACK_LIB jack)
-               SET(JACK_LIBPATH ${JACK}/lib)
-       ENDIF(WITH_JACK)
-
-       IF(WITH_CODEC_SNDFILE)
-               SET(SNDFILE /usr)
-               SET(SNDFILE_INC ${SNDFILE}/include)
-               SET(SNDFILE_LIB sndfile)
-               SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
-       ENDIF(WITH_CODEC_SNDFILE)
-
-       IF(WITH_INTERNATIONAL)
-               FIND_LIBRARY(INTL_LIBRARY
+if(UNIX AND NOT APPLE)
+
+       if(WITH_OPENAL)
+               find_package(OpenAL)
+               if(NOT OPENAL_FOUND)
+                       set(WITH_OPENAL OFF)
+               endif()
+       endif()
+
+       if(WITH_JACK)
+               set(JACK /usr)
+               set(JACK_INC ${JACK}/include/jack)
+               set(JACK_LIB jack)
+               set(JACK_LIBPATH ${JACK}/lib)
+       endif()
+
+       if(WITH_CODEC_SNDFILE)
+               set(SNDFILE /usr)
+               set(SNDFILE_INC ${SNDFILE}/include)
+               set(SNDFILE_LIB sndfile)
+               set(SNDFILE_LIBPATH ${SNDFILE}/lib)
+       endif()
+
+       if(WITH_INTERNATIONAL)
+               find_library(INTL_LIBRARY
                        NAMES intl
                        PATHS
                        /sw/lib
                )
 
-               FIND_LIBRARY(ICONV_LIBRARY
+               find_library(ICONV_LIBRARY
                        NAMES iconv
                        PATHS
                        /sw/lib
                )
 
-               IF(INTL_LIBRARY AND ICONV_LIBRARY)
-                       SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
-               ENDIF(INTL_LIBRARY AND ICONV_LIBRARY)
-       ENDIF(WITH_INTERNATIONAL)
+               if(INTL_LIBRARY AND ICONV_LIBRARY)
+                       set(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
+               endif()
+       endif()
 
-       FIND_PACKAGE(Freetype)
-       # UNSET(FREETYPE_INCLUDE_DIRS CACHE) # cant use
+       find_package(Freetype)
+       # unset(FREETYPE_INCLUDE_DIRS CACHE) # cant use
 
 
-       IF(WITH_PYTHON)
+       if(WITH_PYTHON)
                # No way to set py31. remove for now.
-               # FIND_PACKAGE(PythonLibs)
-               SET(PYTHON /usr)
-               SET(PYTHON_VERSION 3.1)
-               SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
-               # SET(PYTHON_BINARY python) # not used yet
-               SET(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "")
-               SET(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
+               # find_package(PythonLibs)
+               set(PYTHON /usr)
+               set(PYTHON_VERSION 3.1)
+               set(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
+               # set(PYTHON_BINARY python) # not used yet
+               set(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "")
+               set(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
        
-               # FIND_PACKAGE(PythonInterp) # not used yet
-               # SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
-
-               SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
-       ENDIF(WITH_PYTHON)
-
-       IF(WITH_SDL)
-               FIND_PACKAGE(SDL)
-               # UNSET(SDLMAIN_LIBRARY CACHE)
-               IF(NOT SDL_FOUND)
-                       SET(WITH_SDL OFF)
-               ENDIF(NOT SDL_FOUND)
-       ENDIF(WITH_SDL)
-
-       IF(WITH_IMAGE_OPENEXR)
-               SET(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory")
-               FIND_PATH(OPENEXR_INC
+               # find_package(PythonInterp) # not used yet
+               # set(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
+
+               set(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
+       endif()
+
+       if(WITH_SDL)
+               find_package(SDL)
+               # unset(SDLMAIN_LIBRARY CACHE)
+               if(NOT SDL_FOUND)
+                       set(WITH_SDL OFF)
+               endif()
+       endif()
+
+       if(WITH_IMAGE_OPENEXR)
+               set(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory")
+               find_path(OPENEXR_INC
                        ImfXdr.h
                        PATHS
                        ${OPENEXR}/include/OpenEXR
@@ -247,764 +247,764 @@ IF(UNIX AND NOT APPLE)
                        /opt/csw/include/OpenEXR
                        /opt/include/OpenEXR
                )
-               SET(OPENEXR_LIB Half IlmImf Iex Imath)
+               set(OPENEXR_LIB Half IlmImf Iex Imath)
                
-               IF(NOT OPENEXR_INC)
-                       SET(WITH_IMAGE_OPENEXR OFF)
-               ENDIF(NOT OPENEXR_INC)
-       ENDIF(WITH_IMAGE_OPENEXR)
-
-       IF(WITH_IMAGE_TIFF)
-               FIND_PACKAGE(TIFF)
-               IF(NOT TIFF_FOUND)
-                       SET(WITH_IMAGE_TIFF OFF)
-               ENDIF(NOT TIFF_FOUND)
-       ENDIF(WITH_IMAGE_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_CODEC_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)
-               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
-       ENDIF(WITH_CODEC_FFMPEG)
-
-       IF(WITH_FFTW3)
-               SET(FFTW3 /usr)
-               SET(FFTW3_INC ${FFTW3}/include)
-               SET(FFTW3_LIB fftw3)
-               SET(FFTW3_LIBPATH ${FFTW3}/lib)
-       ENDIF(WITH_FFTW3)
-
-       IF(WITH_SAMPLERATE)
-               SET(LIBSAMPLERATE /usr)
-               SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-               SET(LIBSAMPLERATE_LIB samplerate)
-               SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
-       ENDIF(WITH_SAMPLERATE)
-
-       IF (WITH_OPENCOLLADA)
-               SET(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory")
-               SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-               SET(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2)
-               SET(OPENCOLLADA_INC ${OPENCOLLADA})
-               SET(PCRE /usr CACHE FILEPATH "PCRE Directory")
-               SET(PCRE_LIBPATH ${PCRE}/lib)
-               SET(PCRE_LIB pcre)
-               SET(EXPAT /usr CACHE FILEPATH "Expat Directory")
-               SET(EXPAT_LIBPATH ${EXPAT}/lib)
-               SET(EXPAT_LIB expat)
-       ENDIF (WITH_OPENCOLLADA)
-
-       FIND_PACKAGE(X11 REQUIRED)
+               if(NOT OPENEXR_INC)
+                       set(WITH_IMAGE_OPENEXR OFF)
+               endif()
+       endif()
+
+       if(WITH_IMAGE_TIFF)
+               find_package(TIFF)
+               if(NOT TIFF_FOUND)
+                       set(WITH_IMAGE_TIFF OFF)
+               endif()
+       endif()
+
+       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()
+
+       if(WITH_CODEC_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)
+               set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
+       endif()
+
+       if(WITH_FFTW3)
+               set(FFTW3 /usr)
+               set(FFTW3_INC ${FFTW3}/include)
+               set(FFTW3_LIB fftw3)
+               set(FFTW3_LIBPATH ${FFTW3}/lib)
+       endif()
+
+       if(WITH_SAMPLERATE)
+               set(LIBSAMPLERATE /usr)
+               set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
+               set(LIBSAMPLERATE_LIB samplerate)
+               set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+       endif()
+
+       if(WITH_OPENCOLLADA)
+               set(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory")
+               set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
+               set(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2)
+               set(OPENCOLLADA_INC ${OPENCOLLADA})
+               set(PCRE /usr CACHE FILEPATH "PCRE Directory")
+               set(PCRE_LIBPATH ${PCRE}/lib)
+               set(PCRE_LIB pcre)
+               set(EXPAT /usr CACHE FILEPATH "Expat Directory")
+               set(EXPAT_LIBPATH ${EXPAT}/lib)
+               set(EXPAT_LIB expat)
+       endif()
+
+       find_package(X11 REQUIRED)
 
        # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
-       SET(LLIBS "-lutil -lc -lm -lpthread -lstdc++ ${X11_X11_LIB} ${X11_Xinput_LIB}")
+       set(LLIBS "-lutil -lc -lm -lpthread -lstdc++ ${X11_X11_LIB} ${X11_Xinput_LIB}")
 
-       IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+       if(CMAKE_SYSTEM_NAME MATCHES "Linux")
                # BSD's dont use libdl.so
-               LIST(APPEND LLIBS -ldl)
+               list(APPEND LLIBS -ldl)
 
                # binreloc is linux only
-               SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
-               SET(BINRELOC_INC ${BINRELOC}/include)
-       ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+               set(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
+               set(BINRELOC_INC ${BINRELOC}/include)
+       endif()
 
-       SET(PLATFORM_LINKFLAGS "-pthread")
+       set(PLATFORM_LINKFLAGS "-pthread")
 
-       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
-       SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
+       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
 
        # GNU Compiler
-       IF(CMAKE_COMPILER_IS_GNUCC)
-               SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
+       if(CMAKE_COMPILER_IS_GNUCC)
+               set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
        
                # Better warnings
                # note: -Wunused-parameter is added below for all GCC compilers
-               SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
-               SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
+               set(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
+               set(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
 
        # Intel C++ Compiler
-       ELSEIF(CMAKE_C_COMPILER_ID MATCHES "Intel")
+       elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
                # think these next two are broken
-               FIND_PROGRAM(XIAR xiar) 
-               IF(XIAR) 
-                       SET(CMAKE_AR "${XIAR}")
-               ENDIF(XIAR
-               MARK_AS_ADVANCED(XIAR)
+               find_program(XIAR xiar) 
+               if(XIAR) 
+                       set(CMAKE_AR "${XIAR}")
+               endif(
+               mark_as_advanced(XIAR)
 
-               FIND_PROGRAM(XILD xild) 
-               IF(XILD) 
-                       SET(CMAKE_LINKER "${XILD}")
-               ENDIF(XILD
-               MARK_AS_ADVANCED(XILD)
+               find_program(XILD xild) 
+               if(XILD) 
+                       set(CMAKE_LINKER "${XILD}")
+               endif(
+               mark_as_advanced(XILD)
 
-               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel")
-               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp-model precise -prec_div -parallel")
+               set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel")
+               set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp-model precise -prec_div -parallel")
 
-               SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
+               set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
 
-               # SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -diag-enable sc3")
+               # set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -diag-enable sc3")
 
-               SET(C_WARNINGS "-Wall -Wpointer-arith -Wno-unknown-pragmas")
-               SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
+               set(C_WARNINGS "-Wall -Wpointer-arith -Wno-unknown-pragmas")
+               set(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
 
-               SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel")
-       ENDIF(CMAKE_COMPILER_IS_GNUCC)
+               set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel")
+       endif()
 
-ELSEIF(WIN32)
+elseif(WIN32)
 
        # this file is included anyway when building under Windows with cl.exe
-       #  INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
+       #  include(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
 
-       SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
+       set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
 
        # Setup 64bit and 64bit windows systems
-       IF(CMAKE_CL_64)
-               MESSAGE("64 bit compiler detected.")
-               SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
-       ENDIF(CMAKE_CL_64)
+       if(CMAKE_CL_64)
+               message("64 bit compiler detected.")
+               set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
+       endif()
        
-       ADD_DEFINITIONS(-DWIN32)
-
-       IF(WITH_INTERNATIONAL)
-               SET(ICONV ${LIBDIR}/iconv)
-               SET(ICONV_INC ${ICONV}/include)
-               SET(ICONV_LIB iconv)
-               SET(ICONV_LIBPATH ${ICONV}/lib)
-       ENDIF(WITH_INTERNATIONAL)
-
-       IF(WITH_SAMPLERATE)
-               SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
-               SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-               SET(LIBSAMPLERATE_LIB libsamplerate)
-               SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
-       ENDIF(WITH_SAMPLERATE)
-
-       SET(PNG "${LIBDIR}/png")
-       SET(PNG_INC "${PNG}/include")
-       SET(PNG_LIBPATH ${PNG}/lib)
-
-       SET(JPEG "${LIBDIR}/jpeg")
-       SET(JPEG_INC "${JPEG}/include")
-       SET(JPEG_LIBPATH ${JPEG}/lib)
-
-       SET(WINTAB_INC ${LIBDIR}/wintab/include) 
-
-       IF(WITH_OPENAL)
-               SET(OPENAL ${LIBDIR}/openal)
-               SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
-               SET(OPENAL_LIBRARY wrap_oal)
-               SET(OPENAL_LIBPATH ${OPENAL}/lib)
-       ENDIF(WITH_OPENAL)
-
-       IF(WITH_CODEC_SNDFILE)
-               SET(SNDFILE ${LIBDIR}/sndfile)
-               SET(SNDFILE_INC ${SNDFILE}/include)
-               SET(SNDFILE_LIB libsndfile-1)
-               SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
-       ENDIF(WITH_CODEC_SNDFILE)
-
-       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)
-
-       IF(WITH_CODEC_QUICKTIME)
-               SET(QUICKTIME ${LIBDIR}/QTDevWin)
-               SET(QUICKTIME_INC ${QUICKTIME}/CIncludes)
-               SET(QUICKTIME_LIB qtmlClient)
-               SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
-       ENDIF(WITH_CODEC_QUICKTIME)
-
-       IF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
-               ADD_DEFINITIONS(-D__SSE__ -D__MMX__)
-       ENDIF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
-
-       IF(MSVC)
-               IF(CMAKE_CL_64)
-                       SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
-               ELSE(CMAKE_CL_64)
-                       SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
-               ENDIF(CMAKE_CL_64)
+       add_definitions(-DWIN32)
+
+       if(WITH_INTERNATIONAL)
+               set(ICONV ${LIBDIR}/iconv)
+               set(ICONV_INC ${ICONV}/include)
+               set(ICONV_LIB iconv)
+               set(ICONV_LIBPATH ${ICONV}/lib)
+       endif()
+
+       if(WITH_SAMPLERATE)
+               set(LIBSAMPLERATE ${LIBDIR}/samplerate)
+               set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
+               set(LIBSAMPLERATE_LIB libsamplerate)
+               set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+       endif()
+
+       set(PNG "${LIBDIR}/png")
+       set(PNG_INC "${PNG}/include")
+       set(PNG_LIBPATH ${PNG}/lib)
+
+       set(JPEG "${LIBDIR}/jpeg")
+       set(JPEG_INC "${JPEG}/include")
+       set(JPEG_LIBPATH ${JPEG}/lib)
+
+       set(WINTAB_INC ${LIBDIR}/wintab/include) 
+
+       if(WITH_OPENAL)
+               set(OPENAL ${LIBDIR}/openal)
+               set(OPENAL_INCLUDE_DIR ${OPENAL}/include)
+               set(OPENAL_LIBRARY wrap_oal)
+               set(OPENAL_LIBPATH ${OPENAL}/lib)
+       endif()
+
+       if(WITH_CODEC_SNDFILE)
+               set(SNDFILE ${LIBDIR}/sndfile)
+               set(SNDFILE_INC ${SNDFILE}/include)
+               set(SNDFILE_LIB libsndfile-1)
+               set(SNDFILE_LIBPATH ${SNDFILE}/lib)
+       endif()
+
+       if(WITH_SDL)
+               set(SDL ${LIBDIR}/sdl)
+               set(SDL_INCLUDE_DIR ${SDL}/include)
+               set(SDL_LIBRARY SDL)
+               set(SDL_LIBPATH ${SDL}/lib)
+       endif()
+
+       if(WITH_CODEC_QUICKTIME)
+               set(QUICKTIME ${LIBDIR}/QTDevWin)
+               set(QUICKTIME_INC ${QUICKTIME}/CIncludes)
+               set(QUICKTIME_LIB qtmlClient)
+               set(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
+       endif()
+
+       if(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+               add_definitions(-D__SSE__ -D__MMX__)
+       endif()
+
+       if(MSVC)
+               if(CMAKE_CL_64)
+                       set(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
+               else()
+                       set(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
+               endif()
                
-               SET(CMAKE_CXX_FLAGS "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /we4013 /wd4018 /wd4800 /wd4244 /wd4305 /wd4065 /wd4267" CACHE STRING "MSVC MT C++ flags " FORCE)
-               SET(CMAKE_C_FLAGS   "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /we4013 /wd4018 /wd4800 /wd4244 /wd4305 /wd4065 /wd4267" CACHE STRING "MSVC MT C++ flags " FORCE)
-
-               IF(CMAKE_CL_64)
-                       SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
-               ELSE(CMAKE_CL_64)
-                       SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
-               ENDIF(CMAKE_CL_64)
-               SET(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
-               SET(CMAKE_CXX_FLAGS_MINSIZEREL "/O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
-               SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
-               IF(CMAKE_CL_64)
-                       SET(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
-               ELSE(CMAKE_CL_64)
-                       SET(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
-               ENDIF(CMAKE_CL_64)
-               SET(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
-               SET(CMAKE_C_FLAGS_MINSIZEREL "/O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
-               SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
-
-               IF(WITH_INTERNATIONAL)
-                       SET(GETTEXT ${LIBDIR}/gettext)
-                       SET(GETTEXT_INC ${GETTEXT}/include)
-                       SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
-                       IF(CMAKE_CL_64)
-                               SET(GETTEXT_LIB gettext)
-                       ELSE(CMAKE_CL_64)
-                               SET(GETTEXT_LIB gnu_gettext)
-                       ENDIF(CMAKE_CL_64)
-               ENDIF(WITH_INTERNATIONAL)
-
-               IF(CMAKE_CL_64)
-                       SET(PNG_LIBRARIES libpng)
-               ELSE(CMAKE_CL_64)
-                       SET(PNG_LIBRARIES libpng_st)
-               ENDIF(CMAKE_CL_64)
-               SET(JPEG_LIBRARY libjpeg)
-
-               SET(ZLIB ${LIBDIR}/zlib)
-               SET(ZLIB_INC ${ZLIB}/include)
-               SET(ZLIB_LIBPATH ${ZLIB}/lib)
-               IF(CMAKE_CL_64)
-                       SET(ZLIB_LIBRARIES libz)
-               ELSE(CMAKE_CL_64)
-                       SET(ZLIB_LIBRARIES zlib)
-               ENDIF(CMAKE_CL_64)
-
-               SET(PTHREADS ${LIBDIR}/pthreads)
-               SET(PTHREADS_INC ${PTHREADS}/include)
-               SET(PTHREADS_LIBPATH ${PTHREADS}/lib)
-               SET(PTHREADS_LIB pthreadVC2)
+               set(CMAKE_CXX_FLAGS "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /we4013 /wd4018 /wd4800 /wd4244 /wd4305 /wd4065 /wd4267" CACHE STRING "MSVC MT C++ flags " FORCE)
+               set(CMAKE_C_FLAGS   "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /we4013 /wd4018 /wd4800 /wd4244 /wd4305 /wd4065 /wd4267" CACHE STRING "MSVC MT C++ flags " FORCE)
+
+               if(CMAKE_CL_64)
+                       set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+               else()
+                       set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
+               endif()
+               set(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+               set(CMAKE_CXX_FLAGS_MINSIZEREL "/O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+               set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+               if(CMAKE_CL_64)
+                       set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+               else()
+                       set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
+               endif()
+               set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+               set(CMAKE_C_FLAGS_MINSIZEREL "/O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+               set(CMAKE_C_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+
+               if(WITH_INTERNATIONAL)
+                       set(GETTEXT ${LIBDIR}/gettext)
+                       set(GETTEXT_INC ${GETTEXT}/include)
+                       set(GETTEXT_LIBPATH ${GETTEXT}/lib)
+                       if(CMAKE_CL_64)
+                               set(GETTEXT_LIB gettext)
+                       else()
+                               set(GETTEXT_LIB gnu_gettext)
+                       endif()
+               endif()
+
+               if(CMAKE_CL_64)
+                       set(PNG_LIBRARIES libpng)
+               else()
+                       set(PNG_LIBRARIES libpng_st)
+               endif()
+               set(JPEG_LIBRARY libjpeg)
+
+               set(ZLIB ${LIBDIR}/zlib)
+               set(ZLIB_INC ${ZLIB}/include)
+               set(ZLIB_LIBPATH ${ZLIB}/lib)
+               if(CMAKE_CL_64)
+                       set(ZLIB_LIBRARIES libz)
+               else()
+                       set(ZLIB_LIBRARIES zlib)
+               endif()
+
+               set(PTHREADS ${LIBDIR}/pthreads)
+               set(PTHREADS_INC ${PTHREADS}/include)
+               set(PTHREADS_LIBPATH ${PTHREADS}/lib)
+               set(PTHREADS_LIB pthreadVC2)
                
-               SET(FREETYPE ${LIBDIR}/freetype)
-               SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
-               SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
-               SET(FREETYPE_LIBRARY freetype2ST)
-
-               IF(WITH_FFTW3)
-                       SET(FFTW3 ${LIBDIR}/fftw3)
-                       SET(FFTW3_LIB libfftw)
-                       SET(FFTW3_INC ${FFTW3}/include)
-                       SET(FFTW3_LIBPATH ${FFTW3}/lib)
-               ENDIF(WITH_FFTW3)
-
-               IF(WITH_OPENCOLLADA)
-                       SET(OPENCOLLADA ${LIBDIR}/opencollada)
-                       SET(OPENCOLLADA_INC ${OPENCOLLADA}/include)
-                       SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-                       SET(OPENCOLLADA_LIB OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser xml2 buffer ftoa)
-                       SET(PCRE_LIB pcre)
-               ENDIF(WITH_OPENCOLLADA)
+               set(FREETYPE ${LIBDIR}/freetype)
+               set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
+               set(FREETYPE_LIBPATH ${FREETYPE}/lib)
+               set(FREETYPE_LIBRARY freetype2ST)
+
+               if(WITH_FFTW3)
+                       set(FFTW3 ${LIBDIR}/fftw3)
+                       set(FFTW3_LIB libfftw)
+                       set(FFTW3_INC ${FFTW3}/include)
+                       set(FFTW3_LIBPATH ${FFTW3}/lib)
+               endif()
+
+               if(WITH_OPENCOLLADA)
+                       set(OPENCOLLADA ${LIBDIR}/opencollada)
+                       set(OPENCOLLADA_INC ${OPENCOLLADA}/include)
+                       set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
+                       set(OPENCOLLADA_LIB OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser xml2 buffer ftoa)
+                       set(PCRE_LIB pcre)
+               endif()
                
-               IF(WITH_LCMS)
-                       SET(LCMS ${LIBDIR}/lcms)
-                       SET(LCMS_INCLUDE_DIR ${LCMS}/include)
-                       SET(LCMS_LIBPATH ${LCMS}/lib)
-                       SET(LCMS_LIB lcms)
-               ENDIF(WITH_LCMS)
-
-               IF(WITH_CODEC_FFMPEG)
-                       SET(FFMPEG ${LIBDIR}/ffmpeg)
-                       SET(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc)
-                       SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
-                       SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
-               ENDIF(WITH_CODEC_FFMPEG)
-
-               IF(WITH_IMAGE_OPENEXR)
-                       SET(OPENEXR ${LIBDIR}/openexr)
-                       SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
-                       SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
-                       IF (MSVC80)
-                               SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
-                       ELSE (MSVC80)
-                               SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
-                       ENDIF(MSVC80)
-                       IF (MSVC90)
-                               SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
-                       ENDIF(MSVC90)
-               ENDIF(WITH_IMAGE_OPENEXR)
-
-               IF(WITH_IMAGE_TIFF)
-                       SET(TIFF ${LIBDIR}/tiff)
-                       SET(TIFF_LIBRARY libtiff)
-                       SET(TIFF_INCLUDE_DIR ${TIFF}/include)
-                       SET(TIFF_LIBPATH ${TIFF}/lib)
-               ENDIF(WITH_IMAGE_TIFF)
-
-               IF(WITH_JACK)
-                       SET(JACK ${LIBDIR}/jack)
-                       SET(JACK_INC ${JACK}/include/jack ${JACK}/include)
-                       SET(JACK_LIB libjack)
-                       SET(JACK_LIBPATH ${JACK}/lib)
-               ENDIF(WITH_JACK)
-
-               IF(WITH_PYTHON)
-                       SET(PYTHON ${LIBDIR}/python)
-                       SET(PYTHON_VERSION 3.1)
-                       SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
-                       # SET(PYTHON_BINARY python) # not used yet
-                       SET(PYTHON_LIB python31)
-                       SET(PYTHON_LIBPATH ${PYTHON}/lib)
-               ENDIF(WITH_PYTHON)
+               if(WITH_LCMS)
+                       set(LCMS ${LIBDIR}/lcms)
+                       set(LCMS_INCLUDE_DIR ${LCMS}/include)
+                       set(LCMS_LIBPATH ${LCMS}/lib)
+                       set(LCMS_LIB lcms)
+               endif()
+
+               if(WITH_CODEC_FFMPEG)
+                       set(FFMPEG ${LIBDIR}/ffmpeg)
+                       set(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc)
+                       set(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
+                       set(FFMPEG_LIBPATH ${FFMPEG}/lib)
+               endif()
+
+               if(WITH_IMAGE_OPENEXR)
+                       set(OPENEXR ${LIBDIR}/openexr)
+                       set(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
+                       set(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
+                       if(MSVC80)
+                               set(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
+                       else()
+                               set(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
+                       endif()
+                       if(MSVC90)
+                               set(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
+                       endif()
+               endif()
+
+               if(WITH_IMAGE_TIFF)
+                       set(TIFF ${LIBDIR}/tiff)
+                       set(TIFF_LIBRARY libtiff)
+                       set(TIFF_INCLUDE_DIR ${TIFF}/include)
+                       set(TIFF_LIBPATH ${TIFF}/lib)
+               endif()
+
+               if(WITH_JACK)
+                       set(JACK ${LIBDIR}/jack)
+                       set(JACK_INC ${JACK}/include/jack ${JACK}/include)
+                       set(JACK_LIB libjack)
+                       set(JACK_LIBPATH ${JACK}/lib)
+               endif()
+
+               if(WITH_PYTHON)
+                       set(PYTHON ${LIBDIR}/python)
+                       set(PYTHON_VERSION 3.1)
+                       set(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
+                       # set(PYTHON_BINARY python) # not used yet
+                       set(PYTHON_LIB python31)
+                       set(PYTHON_LIBPATH ${PYTHON}/lib)
+               endif()
 
                # MSVC only, Mingw doesnt need
-               IF(CMAKE_CL_64)
-                       SET(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib ")
-               ELSE(CMAKE_CL_64)
-                       SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
-               ENDIF(CMAKE_CL_64)
+               if(CMAKE_CL_64)
+                       set(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib ")
+               else()
+                       set(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
+               endif()
 
-               SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
+               set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
 
-       ELSE(MSVC)
+       else()
                # keep GCC spesific stuff here
-               IF(CMAKE_COMPILER_IS_GNUCC)
-                       SET(LLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid")
-                       SET(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
+               if(CMAKE_COMPILER_IS_GNUCC)
+                       set(LLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid")
+                       set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
 
                        # Better warnings
-                       SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
-                       SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
+                       set(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
+                       set(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
 
-                       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
-                       SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
-               ENDIF(CMAKE_COMPILER_IS_GNUCC)
+                       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
+                       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
+               endif()
 
-               ADD_DEFINITIONS(-DFREE_WINDOWS)
+               add_definitions(-DFREE_WINDOWS)
 
-               SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
-               SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
+               set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
+               set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
 
-               IF(WITH_INTERNATIONAL)
-                       SET(GETTEXT ${LIBDIR}/gcc/gettext)
-                       SET(GETTEXT_INC ${GETTEXT}/include)
-                       SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
-                       SET(GETTEXT_LIB intl)
-               ENDIF(WITH_INTERNATIONAL)
+               if(WITH_INTERNATIONAL)
+                       set(GETTEXT ${LIBDIR}/gcc/gettext)
+                       set(GETTEXT_INC ${GETTEXT}/include)
+                       set(GETTEXT_LIBPATH ${GETTEXT}/lib)
+                       set(GETTEXT_LIB intl)
+               endif()
 
-               SET(JPEG_LIBRARY libjpeg)
-               SET(PNG_LIBRARIES png)
+               set(JPEG_LIBRARY libjpeg)
+               set(PNG_LIBRARIES png)
 
-               SET(ZLIB ${LIBDIR}/zlib)
-               SET(ZLIB_INC ${ZLIB}/include)
-               SET(ZLIB_LIBPATH ${ZLIB}/lib)
-               SET(ZLIB_LIBRARIES z)
+               set(ZLIB ${LIBDIR}/zlib)
+               set(ZLIB_INC ${ZLIB}/include)
+               set(ZLIB_LIBPATH ${ZLIB}/lib)
+               set(ZLIB_LIBRARIES z)
 
-               SET(PTHREADS ${LIBDIR}/pthreads)
-               SET(PTHREADS_INC ${PTHREADS}/include)
-               SET(PTHREADS_LIBPATH ${PTHREADS}/lib)
-               SET(PTHREADS_LIB pthreadGC2)
+               set(PTHREADS ${LIBDIR}/pthreads)
+               set(PTHREADS_INC ${PTHREADS}/include)
+               set(PTHREADS_LIBPATH ${PTHREADS}/lib)
+               set(PTHREADS_LIB pthreadGC2)
                
-               SET(FREETYPE ${LIBDIR}/gcc/freetype)
-               SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
-               SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
-               SET(FREETYPE_LIBRARY freetype)
-
-               IF(WITH_FFTW3)
-                       SET(FFTW3 ${LIBDIR}/gcc/fftw3)
-                       SET(FFTW3_LIB fftw3)
-                       SET(FFTW3_INC ${FFTW3}/include)
-                       SET(FFTW3_LIBPATH ${FFTW3}/lib)
-               ENDIF(WITH_FFTW3)
-
-               IF(WITH_OPENCOLLADA)
-                       SET(OPENCOLLADA ${LIBDIR}/gcc/opencollada)
-                       SET(OPENCOLLADA_INC ${OPENCOLLADA}/include)
-                       SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
-                       SET(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
-                       SET(PCRE_LIB pcre)
-               ENDIF(WITH_OPENCOLLADA)
+               set(FREETYPE ${LIBDIR}/gcc/freetype)
+               set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
+               set(FREETYPE_LIBPATH ${FREETYPE}/lib)
+               set(FREETYPE_LIBRARY freetype)
+
+               if(WITH_FFTW3)
+                       set(FFTW3 ${LIBDIR}/gcc/fftw3)
+                       set(FFTW3_LIB fftw3)
+                       set(FFTW3_INC ${FFTW3}/include)
+                       set(FFTW3_LIBPATH ${FFTW3}/lib)
+               endif()
+
+               if(WITH_OPENCOLLADA)
+                       set(OPENCOLLADA ${LIBDIR}/gcc/opencollada)
+                       set(OPENCOLLADA_INC ${OPENCOLLADA}/include)
+                       set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
+                       set(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
+                       set(PCRE_LIB pcre)
+               endif()
                
-               IF(WITH_CODEC_FFMPEG)
-                       SET(FFMPEG ${LIBDIR}/ffmpeg)
-                       SET(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include)
-                       SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
-                       SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
-               ENDIF(WITH_CODEC_FFMPEG)
-
-               IF(WITH_IMAGE_OPENEXR)
-                       SET(OPENEXR ${LIBDIR}/gcc/openexr)
-                       SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/OpenEXR)
-                       SET(OPENEXR_LIB Half IlmImf Imath IlmThread)
-                       SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
+               if(WITH_CODEC_FFMPEG)
+                       set(FFMPEG ${LIBDIR}/ffmpeg)
+                       set(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include)
+                       set(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
+                       set(FFMPEG_LIBPATH ${FFMPEG}/lib)
+               endif()
+
+               if(WITH_IMAGE_OPENEXR)
+                       set(OPENEXR ${LIBDIR}/gcc/openexr)
+                       set(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/OpenEXR)
+                       set(OPENEXR_LIB Half IlmImf Imath IlmThread)
+                       set(OPENEXR_LIBPATH ${OPENEXR}/lib)
 
                        # TODO, gives linking errors, force off
-                       SET(WITH_IMAGE_OPENEXR OFF)
-               ENDIF(WITH_IMAGE_OPENEXR)
-
-               IF(WITH_IMAGE_TIFF)
-                       SET(TIFF ${LIBDIR}/gcc/tiff)
-                       SET(TIFF_LIBRARY tiff)
-                       SET(TIFF_INCLUDE_DIR ${TIFF}/include)
-                       SET(TIFF_LIBPATH ${TIFF}/lib)
-               ENDIF(WITH_IMAGE_TIFF)
-
-               IF(WITH_JACK)
-                       SET(JACK ${LIBDIR}/jack)
-                       SET(JACK_INC ${JACK}/include/jack ${JACK}/include)
-                       SET(JACK_LIB jack)
-                       SET(JACK_LIBPATH ${JACK}/lib)
+                       set(WITH_IMAGE_OPENEXR OFF)
+               endif()
+
+               if(WITH_IMAGE_TIFF)
+                       set(TIFF ${LIBDIR}/gcc/tiff)
+                       set(TIFF_LIBRARY tiff)
+                       set(TIFF_INCLUDE_DIR ${TIFF}/include)
+                       set(TIFF_LIBPATH ${TIFF}/lib)
+               endif()
+
+               if(WITH_JACK)
+                       set(JACK ${LIBDIR}/jack)
+                       set(JACK_INC ${JACK}/include/jack ${JACK}/include)
+                       set(JACK_LIB jack)
+                       set(JACK_LIBPATH ${JACK}/lib)
                        
                        # TODO, gives linking errors, force off
-                       SET(WITH_JACK OFF)
-               ENDIF(WITH_JACK)
+                       set(WITH_JACK OFF)
+               endif()
 
-               IF(WITH_PYTHON)
-                       SET(PYTHON ${LIBDIR}/python)
-                       SET(PYTHON_VERSION 3.1)
-                       SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
-                       # SET(PYTHON_BINARY python) # not used yet
-                       SET(PYTHON_LIB python31mw)
-                       SET(PYTHON_LIBPATH ${PYTHON}/lib)
-               ENDIF(WITH_PYTHON)
+               if(WITH_PYTHON)
+                       set(PYTHON ${LIBDIR}/python)
+                       set(PYTHON_VERSION 3.1)
+                       set(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
+                       # set(PYTHON_BINARY python) # not used yet
+                       set(PYTHON_LIB python31mw)
+                       set(PYTHON_LIBPATH ${PYTHON}/lib)
+               endif()
 
-       ENDIF(MSVC)
+       endif()
 
        # used in many places so include globally, like OpenGL
-       INCLUDE_DIRECTORIES(${PTHREADS_INC})
-
-ELSEIF(APPLE)
-
-       IF(WITH_LIBS10.5)
-               SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-9.x.universal)
-       ELSE(WITH_LIBS10.5)
-               IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
-                       SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386)
-               ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386)
-                       SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.0.0-powerpc)
-               ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
-       ENDIF(WITH_LIBS10.5)
+       include_directories(${PTHREADS_INC})
+
+elseif(APPLE)
+
+       if(WITH_LIBS10.5)
+               set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-9.x.universal)
+       else()
+               if(CMAKE_OSX_ARCHITECTURES MATCHES i386)
+                       set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386)
+               else()
+                       set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.0.0-powerpc)
+               endif()
+       endif()
        
 
-       IF(WITH_OPENAL)
-               FIND_PACKAGE(OpenAL)
-               IF(OPENAL_FOUND)
-                       SET(WITH_OPENAL ON)
-                       SET(OPENAL_INCLUDE_DIR "${LIBDIR}/openal/include")
-               ELSE(OPENAL_FOUND)
-                       SET(WITH_OPENAL OFF)
-               ENDIF(OPENAL_FOUND)
-       ENDIF(WITH_OPENAL)
-
-       IF(WITH_JACK)
-               SET(JACK /usr)
-               SET(JACK_INC ${JACK}/include/jack)
-               SET(JACK_LIB jack)
-               SET(JACK_LIBPATH ${JACK}/lib)
-       ENDIF(WITH_JACK)
-
-       IF(WITH_CODEC_SNDFILE)
-               SET(SNDFILE ${LIBDIR}/sndfile)
-               SET(SNDFILE_INC ${SNDFILE}/include)
-               SET(SNDFILE_LIB sndfile FLAC ogg vorbis vorbisenc)
-               SET(SNDFILE_LIBPATH ${SNDFILE}/lib ${FFMPEG}/lib)
-       ENDIF(WITH_CODEC_SNDFILE)
-
-       SET(PYTHON_VERSION 3.1)
-
-       IF(PYTHON_VERSION MATCHES 3.1)
+       if(WITH_OPENAL)
+               find_package(OpenAL)
+               if(OPENAL_FOUND)
+                       set(WITH_OPENAL ON)
+                       set(OPENAL_INCLUDE_DIR "${LIBDIR}/openal/include")
+               else()
+                       set(WITH_OPENAL OFF)
+               endif()
+       endif()
+
+       if(WITH_JACK)
+               set(JACK /usr)
+               set(JACK_INC ${JACK}/include/jack)
+               set(JACK_LIB jack)
+               set(JACK_LIBPATH ${JACK}/lib)
+       endif()
+
+       if(WITH_CODEC_SNDFILE)
+               set(SNDFILE ${LIBDIR}/sndfile)
+               set(SNDFILE_INC ${SNDFILE}/include)
+               set(SNDFILE_LIB sndfile FLAC ogg vorbis vorbisenc)
+               set(SNDFILE_LIBPATH ${SNDFILE}/lib ${FFMPEG}/lib)
+       endif()
+
+       set(PYTHON_VERSION 3.1)
+
+       if(PYTHON_VERSION MATCHES 3.1)
                # we use precompiled libraries for py 3.1 and up by default
 
-               SET(PYTHON ${LIBDIR}/python)
-               SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
-               # SET(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}") # not used yet
-               SET(PYTHON_LIB python${PYTHON_VERSION})
-               SET(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}")
-               # SET(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
-       ELSE(PYTHON_VERSION MATCHES 3.1)
+               set(PYTHON ${LIBDIR}/python)
+               set(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
+               # set(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}") # not used yet
+               set(PYTHON_LIB python${PYTHON_VERSION})
+               set(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}")
+               # set(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
+       else()
                # otherwise, use custom system framework
 
-               SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
-               SET(PYTHON_VERSION 3.1)
-               SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}")
-               # SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION}) # not used yet
-               SET(PYTHON_LIB "")
-               SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config)
-               SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
-       ENDIF(PYTHON_VERSION MATCHES 3.1)
-
-       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)
+               set(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
+               set(PYTHON_VERSION 3.1)
+               set(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}")
+               # set(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION}) # not used yet
+               set(PYTHON_LIB "")
+               set(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config)
+               set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
+       endif()
+
+       if(WITH_INTERNATIONAL)
+               set(GETTEXT ${LIBDIR}/gettext)
+               set(GETTEXT_INC "${GETTEXT}/include")
+               set(GETTEXT_LIB intl iconv)
+               set(GETTEXT_LIBPATH ${GETTEXT}/lib)
+       endif()
   
-       IF(WITH_FFTW3)
-               SET(FFTW3 ${LIBDIR}/fftw3)
-               SET(FFTW3_INC ${FFTW3}/include)
-               SET(FFTW3_LIB fftw3)
-               SET(FFTW3_LIBPATH ${FFTW3}/lib)
-       ENDIF(WITH_FFTW3)
-
-       SET(PNG_LIBRARIES png)
-       SET(JPEG_LIBRARY jpeg)
-
-       SET(ZLIB /usr)
-       SET(ZLIB_INC "${ZLIB}/include")
-       SET(ZLIB_LIBRARIES z bz2)
-
-       SET(FREETYPE ${LIBDIR}/freetype)
-       SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
-       SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
-       SET(FREETYPE_LIBRARY freetype)
-
-       IF(WITH_IMAGE_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_IMAGE_OPENEXR)
-
-       IF(WITH_LCMS)
-               SET(LCMS ${LIBDIR}/lcms)
-               SET(LCMS_INCLUDE_DIR ${LCMS}/include)
-               SET(LCMS_LIBRARY lcms)
-               SET(LCMS_LIBPATH ${LCMS}/lib)
-       ENDIF(WITH_LCMS)
-
-       IF(WITH_CODEC_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)
-               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
-       ENDIF(WITH_CODEC_FFMPEG)
-
-       IF(WITH_SAMPLERATE)
-               SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
-               SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-               SET(LIBSAMPLERATE_LIB samplerate)
-               SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
-       ENDIF(WITH_SAMPLERATE)
-
-       SET(LLIBS stdc++ SystemStubs)
-
-       IF (WITH_COCOA)
-               SET(PLATFORM_CFLAGS "-pipe -funsigned-char -DGHOST_COCOA")
-               SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio")
-               IF(USE_QTKIT)
-                       SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DUSE_QTKIT")
-                       SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QTKit")
-                       IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
-                               SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime")
+       if(WITH_FFTW3)
+               set(FFTW3 ${LIBDIR}/fftw3)
+               set(FFTW3_INC ${FFTW3}/include)
+               set(FFTW3_LIB fftw3)
+               set(FFTW3_LIBPATH ${FFTW3}/lib)
+       endif()
+
+       set(PNG_LIBRARIES png)
+       set(JPEG_LIBRARY jpeg)
+
+       set(ZLIB /usr)
+       set(ZLIB_INC "${ZLIB}/include")
+       set(ZLIB_LIBRARIES z bz2)
+
+       set(FREETYPE ${LIBDIR}/freetype)
+       set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
+       set(FREETYPE_LIBPATH ${FREETYPE}/lib)
+       set(FREETYPE_LIBRARY freetype)
+
+       if(WITH_IMAGE_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()
+
+       if(WITH_LCMS)
+               set(LCMS ${LIBDIR}/lcms)
+               set(LCMS_INCLUDE_DIR ${LCMS}/include)
+               set(LCMS_LIBRARY lcms)
+               set(LCMS_LIBPATH ${LCMS}/lib)
+       endif()
+
+       if(WITH_CODEC_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)
+               set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
+       endif()
+
+       if(WITH_SAMPLERATE)
+               set(LIBSAMPLERATE ${LIBDIR}/samplerate)
+               set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
+               set(LIBSAMPLERATE_LIB samplerate)
+               set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+       endif()
+
+       set(LLIBS stdc++ SystemStubs)
+
+       if(WITH_COCOA)
+               set(PLATFORM_CFLAGS "-pipe -funsigned-char -DGHOST_COCOA")
+               set(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio")
+               if(USE_QTKIT)
+                       set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DUSE_QTKIT")
+                       set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QTKit")
+                       if(CMAKE_OSX_ARCHITECTURES MATCHES i386)
+                               set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime")
                                #libSDL still needs 32bit carbon quicktime 
-                       ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
-               ELSEIF(WITH_CODEC_QUICKTIME)
-                       SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime")
-               ENDIF(USE_QTKIT)
-       ELSE (WITH_COCOA)
-               SET(PLATFORM_CFLAGS "-pipe -funsigned-char")
-               SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
-       ENDIF (WITH_COCOA)
-
-       IF (WITH_OPENCOLLADA)
-               SET(OPENCOLLADA ${LIBDIR}/opencollada)
-               SET(OPENCOLLADA_INC ${OPENCOLLADA}/include)
-               SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-               SET(OPENCOLLADA_LIB "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa" )
+                       endif()
+               elseif(WITH_CODEC_QUICKTIME)
+                       set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime")
+               endif()
+       else()
+               set(PLATFORM_CFLAGS "-pipe -funsigned-char")
+               set(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
+       endif()
+
+       if(WITH_OPENCOLLADA)
+               set(OPENCOLLADA ${LIBDIR}/opencollada)
+               set(OPENCOLLADA_INC ${OPENCOLLADA}/include)
+               set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
+               set(OPENCOLLADA_LIB "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa" )
                #pcre is bundled with openCollada
-               #SET(PCRE ${LIBDIR}/pcre)
-               #SET(PCRE_LIBPATH ${PCRE}/lib)
-               SET(PCRE_LIB pcre)
+               #set(PCRE ${LIBDIR}/pcre)
+               #set(PCRE_LIBPATH ${PCRE}/lib)
+               set(PCRE_LIB pcre)
                #libxml2 is used
-               #SET(EXPAT ${LIBDIR}/expat)
-               #SET(EXPAT_LIBPATH ${EXPAT}/lib)
-               SET(EXPAT_LIB)
-       ENDIF (WITH_OPENCOLLADA)
-
-       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")
-       SET(PNG_LIBPATH ${PNG}/lib)
-
-       SET(JPEG "${LIBDIR}/jpeg")
-       SET(JPEG_INC "${JPEG}/include")
-       SET(JPEG_LIBPATH ${JPEG}/lib)
-
-       IF(WITH_IMAGE_TIFF)
-               SET(TIFF ${LIBDIR}/tiff)
-               SET(TIFF_INCLUDE_DIR ${TIFF}/include)
-               SET(TIFF_LIBRARY tiff)
-               SET(TIFF_LIBPATH ${TIFF}/lib)
-       ENDIF(WITH_IMAGE_TIFF)
-
-       SET(EXETYPE MACOSX_BUNDLE)
-
-       SET(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
-       SET(CMAKE_CXX_FLAGS_DEBUG "-fno-strict-aliasing -g")
-       IF(CMAKE_OSX_ARCHITECTURES MATCHES "i386")
-               SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller")
-               SET(CMAKE_C_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller")
-       ELSEIF(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
-               SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller")
-               SET(CMAKE_C_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller")
-       ELSE(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
-               SET(CMAKE_C_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
-               SET(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
-       ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES "i386")
+               #set(EXPAT ${LIBDIR}/expat)
+               #set(EXPAT_LIBPATH ${EXPAT}/lib)
+               set(EXPAT_LIB)
+       endif()
+
+       if(WITH_SDL)
+               set(SDL ${LIBDIR}/sdl)
+               set(SDL_INCLUDE_DIR ${SDL}/include)
+               set(SDL_LIBRARY SDL)
+               set(SDL_LIBPATH ${SDL}/lib)
+       endif()
+
+       set(PNG "${LIBDIR}/png")
+       set(PNG_INC "${PNG}/include")
+       set(PNG_LIBPATH ${PNG}/lib)
+
+       set(JPEG "${LIBDIR}/jpeg")
+       set(JPEG_INC "${JPEG}/include")
+       set(JPEG_LIBPATH ${JPEG}/lib)
+
+       if(WITH_IMAGE_TIFF)
+               set(TIFF ${LIBDIR}/tiff)
+               set(TIFF_INCLUDE_DIR ${TIFF}/include)
+               set(TIFF_LIBRARY tiff)
+               set(TIFF_LIBPATH ${TIFF}/lib)
+       endif()
+
+       set(EXETYPE MACOSX_BUNDLE)
+
+       set(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
+       set(CMAKE_CXX_FLAGS_DEBUG "-fno-strict-aliasing -g")
+       if(CMAKE_OSX_ARCHITECTURES MATCHES "i386")
+               set(CMAKE_CXX_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller")
+               set(CMAKE_C_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller")
+       elseif(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
+               set(CMAKE_CXX_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller")
+               set(CMAKE_C_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller")
+       else()
+               set(CMAKE_C_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
+               set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
+       endif()
 
        # Better warnings
-       SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
-       SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
+       set(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas")
+       set(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
 
-ENDIF(UNIX AND NOT APPLE)
+endif()
 
 
 # buildinfo
-IF(WITH_BUILDINFO)
+if(WITH_BUILDINFO)
        # BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
-       IF(UNIX)
+       if(UNIX)
                EXEC_PROGRAM("date \"+%Y-%m-%d\"" OUTPUT_VARIABLE BUILD_DATE)
                EXEC_PROGRAM("date \"+%H:%M:%S\"" OUTPUT_VARIABLE BUILD_TIME)  
                EXEC_PROGRAM("svnversion ${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE BUILD_REV RETURN_VALUE BUILD_REV_RETURN)
-               IF(BUILD_REV_RETURN)
-                       SET(BUILD_REV "unknown")
-               ENDIF(BUILD_REV_RETURN)
-       ENDIF(UNIX)
+               if(BUILD_REV_RETURN)
+                       set(BUILD_REV "unknown")
+               endif()
+       endif()
        
-       IF(WIN32)
+       if(WIN32)
                EXEC_PROGRAM("cmd /c date /t" OUTPUT_VARIABLE BUILD_DATE)
                EXEC_PROGRAM("cmd /c time /t" OUTPUT_VARIABLE BUILD_TIME)  
                EXEC_PROGRAM("svnversion ${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE BUILD_REV RETURN_VALUE BUILD_REV_RETURN)
-               IF(BUILD_REV_RETURN)
-                       SET(BUILD_REV "unknown")
-               ENDIF(BUILD_REV_RETURN)
-       ENDIF(WIN32)
-ENDIF(WITH_BUILDINFO)
+               if(BUILD_REV_RETURN)
+                       set(BUILD_REV "unknown")
+               endif()
+       endif()
+endif()
 #-----------------------------------------------------------------------------
 # Common.
 
-IF(WITH_RAYOPTIMIZATION)
-       IF(CMAKE_COMPILER_IS_GNUCC)
-               IF(SUPPORT_SSE_BUILD)
-                       SET(PLATFORM_CFLAGS " -msse ${PLATFORM_CFLAGS}")
-                       ADD_DEFINITIONS(-D__SSE__ -D__MMX__)
-               ENDIF(SUPPORT_SSE_BUILD)
-               IF(SUPPORT_SSE2_BUILD)
-                       SET(PLATFORM_CFLAGS " -msse2 ${PLATFORM_CFLAGS}")
-                       ADD_DEFINITIONS(-D__SSE2__)
-                       IF(NOT SUPPORT_SSE_BUILD) # dont double up
-                               ADD_DEFINITIONS(-D__MMX__)
-                       ENDIF(NOT SUPPORT_SSE_BUILD)
-               ENDIF(SUPPORT_SSE2_BUILD)
-       ENDIF(CMAKE_COMPILER_IS_GNUCC)
-ENDIF(WITH_RAYOPTIMIZATION)
-
-IF(WITH_IMAGE_OPENJPEG)
+if(WITH_RAYOPTIMIZATION)
+       if(CMAKE_COMPILER_IS_GNUCC)
+               if(SUPPORT_SSE_BUILD)
+                       set(PLATFORM_CFLAGS " -msse ${PLATFORM_CFLAGS}")
+                       add_definitions(-D__SSE__ -D__MMX__)
+               endif()
+               if(SUPPORT_SSE2_BUILD)
+                       set(PLATFORM_CFLAGS " -msse2 ${PLATFORM_CFLAGS}")
+                       add_definitions(-D__SSE2__)
+                       if(NOT SUPPORT_SSE_BUILD) # dont double up
+                               add_definitions(-D__MMX__)
+                       endif()
+               endif()
+       endif()
+endif()
+
+if(WITH_IMAGE_OPENJPEG)
        set(OPENJPEG ${CMAKE_SOURCE_DIR}/extern/libopenjpeg)
        set(OPENJPEG_INC ${OPENJPEG})
-ENDIF(WITH_IMAGE_OPENJPEG)
+endif()
 
-IF(WITH_IMAGE_REDCODE)
+if(WITH_IMAGE_REDCODE)
        set(REDCODE ${CMAKE_SOURCE_DIR}/extern)
        set(REDCODE_INC ${REDCODE})
-ENDIF(WITH_IMAGE_REDCODE)
+endif()
 
 #-----------------------------------------------------------------------------
 # Blender WebPlugin
 
-IF(WITH_WEBPLUGIN) 
-       SET(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
-       SET(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none")
+if(WITH_WEBPLUGIN) 
+       set(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
+       set(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none")
 
-       SET(WITH_PLAYER ON)
-ENDIF(WITH_WEBPLUGIN)
+       set(WITH_PLAYER ON)
+endif()
 
 
 #-----------------------------------------------------------------------------
 # Configure OpenGL.
-FIND_PACKAGE(OpenGL)
-INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
-# UNSET(OPENGL_LIBRARIES CACHE) # not compat with older cmake 
-# UNSET(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake 
+find_package(OpenGL)
+include_directories(${OPENGL_INCLUDE_DIR})
+# unset(OPENGL_LIBRARIES CACHE) # not compat with older cmake 
+# unset(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake 
 
 #-----------------------------------------------------------------------------
 # Configure OpenMP.
-IF(WITH_OPENMP)
-       FIND_PACKAGE(OpenMP)    
-       IF(OPENMP_FOUND)
-               SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
-               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
-
-               IF(APPLE AND ${CMAKE_GENERATOR} MATCHES "Xcode")
-                       SET(CMAKE_XCODE_ATTRIBUTE_ENABLE_OPENMP_SUPPORT "YES")
-               ENDIF(APPLE AND ${CMAKE_GENERATOR} MATCHES "Xcode")
-       ELSE(OPENMP_FOUND)
-               SET(WITH_OPENMP OFF)
-       ENDIF(OPENMP_FOUND)
-ENDIF(WITH_OPENMP
+if(WITH_OPENMP)
+       find_package(OpenMP)    
+       if(OPENMP_FOUND)
+               set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+               set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+
+               if(APPLE AND ${CMAKE_GENERATOR} MATCHES "Xcode")
+                       set(CMAKE_XCODE_ATTRIBUTE_ENABLE_OPENMP_SUPPORT "YES")
+               endif()
+       else()
+               set(WITH_OPENMP OFF)
+       endif()
+endif(
 
 #-----------------------------------------------------------------------------
 # Extra compile flags
 
-IF((NOT WIN32) AND (NOT MSVC))
+if((NOT WIN32) AND (NOT MSVC))
        # used for internal debug checks
-       SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
-       SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
+       set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
+       set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
        
        # assert() checks for this.
-       SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")
-       SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -DNDEBUG")
-       SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG")
+       set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")
+       set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -DNDEBUG")
+       set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG")
 
-       SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG")
-       SET(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -DNDEBUG")
-       SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DNDEBUG")
-ENDIF((NOT WIN32) AND (NOT MSVC))
+       set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG")
+       set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -DNDEBUG")
+       set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DNDEBUG")
+endif()
 
-IF(CMAKE_COMPILER_IS_GNUCC)
-       SET(C_WARNINGS "${C_WARNINGS} -Wunused-parameter -Wwrite-strings -Werror=strict-prototypes -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type")
-ENDIF(CMAKE_COMPILER_IS_GNUCC)
+if(CMAKE_COMPILER_IS_GNUCC)
+       set(C_WARNINGS "${C_WARNINGS} -Wunused-parameter -Wwrite-strings -Werror=strict-prototypes -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type")
+endif()
 
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}")
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}")
 
 # better not define flags here but this is a debugging option thats off by default.
-IF(WITH_CXX_GUARDEDALLOC)
-       SET(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}")
-ENDIF(WITH_CXX_GUARDEDALLOC)
+if(WITH_CXX_GUARDEDALLOC)
+       set(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}")
+endif()
 
 #-----------------------------------------------------------------------------
 # Libraries
 
-ADD_SUBDIRECTORY(source)
-ADD_SUBDIRECTORY(intern)
-ADD_SUBDIRECTORY(extern)
+add_subdirectory(source)
+add_subdirectory(intern)
+add_subdirectory(extern)
 
 
 #-----------------------------------------------------------------------------
 # Blender Application
-ADD_SUBDIRECTORY(source/creator)
+add_subdirectory(source/creator)
 
 
 #-----------------------------------------------------------------------------
 # Blender Player
-IF(WITH_PLAYER)
-       ADD_SUBDIRECTORY(source/blenderplayer)
-ENDIF(WITH_PLAYER)
+if(WITH_PLAYER)
+       add_subdirectory(source/blenderplayer)
+endif()
index cb201c53a22f02303dc678db0aa6c6ff0a47609d..7f7ddc9d258e9a16d3e450442fb6d0df0c2b691e 100644 (file)
 
 # only MSVC uses SOURCE_GROUP
-MACRO(BLENDERLIB_NOLIST
+macro(blenderlib_nolist
        name
        sources
        includes)
 
-       MESSAGE(STATUS "Configuring library ${name}")
+       message(STATUS "Configuring library ${name}")
 
-       INCLUDE_DIRECTORIES(${includes})
-       ADD_LIBRARY(${name} ${sources})
+       include_directories(${includes})
+       add_library(${name} ${sources})
 
        # Group by location on disk
-       SOURCE_GROUP("Source Files" FILES CMakeLists.txt)
-       FOREACH(SRC ${sources})
-               GET_FILENAME_COMPONENT(SRC_EXT ${SRC} EXT)
-               IF(${SRC_EXT} MATCHES ".h" OR ${SRC_EXT} MATCHES ".hpp") 
-                       SOURCE_GROUP("Header Files" FILES ${SRC})
-               ELSE()
-                       SOURCE_GROUP("Source Files" FILES ${SRC})
-               ENDIF()
-       ENDFOREACH(SRC)
-ENDMACRO(BLENDERLIB_NOLIST)
+       source_group("Source Files" FILES CMakeLists.txt)
+       foreach(SRC ${sources})
+               get_filename_component(SRC_EXT ${SRC} EXT)
+               if(${SRC_EXT} MATCHES ".h" OR ${SRC_EXT} MATCHES ".hpp") 
+                       source_group("Header Files" FILES ${SRC})
+               else()
+                       source_group("Source Files" FILES ${SRC})
+               endif()
+       endforeach()
+endmacro()
 
 #      # works fine but having the includes listed is helpful for IDE's (QtCreator/MSVC)
-#      MACRO(BLENDERLIB_NOLIST
+#      macro(blenderlib_nolist
 #              name
 #              sources
 #              includes)
 #
-#              MESSAGE(STATUS "Configuring library ${name}")
-#              INCLUDE_DIRECTORIES(${includes})
-#              ADD_LIBRARY(${name} ${sources})
-#      ENDMACRO(BLENDERLIB_NOLIST)
+#              message(STATUS "Configuring library ${name}")
+#              include_directories(${includes})
+#              add_library(${name} ${sources})
+#      endmacro()
 
 
-MACRO(BLENDERLIB
+macro(blenderlib
        name
        sources
        includes)
 
-       BLENDERLIB_NOLIST(${name} "${sources}" "${includes}")
+       blenderlib_nolist(${name} "${sources}" "${includes}")
 
-       SET_PROPERTY(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name})
+       set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name})
 
-ENDMACRO(BLENDERLIB)
+endmacro()
 
-MACRO(SETUP_LIBDIRS)
+macro(SETUP_LIBDIRS)
        # see "cmake --help-policy CMP0003"
        if(COMMAND cmake_policy)
-               CMAKE_POLICY(SET CMP0003 NEW)
-       endif(COMMAND cmake_policy)
+               cmake_policy(SET CMP0003 NEW)
+       endif()
        
-       LINK_DIRECTORIES(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_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_CODEC_FFMPEG)
-               LINK_DIRECTORIES(${FFMPEG_LIBPATH})
-       ENDIF(WITH_CODEC_FFMPEG)
-       IF(WITH_IMAGE_OPENEXR)
-               LINK_DIRECTORIES(${OPENEXR_LIBPATH})
-       ENDIF(WITH_IMAGE_OPENEXR)
-       IF(WITH_IMAGE_TIFF)
-               LINK_DIRECTORIES(${TIFF_LIBPATH})
-       ENDIF(WITH_IMAGE_TIFF)
-       IF(WITH_LCMS)
-               LINK_DIRECTORIES(${LCMS_LIBPATH})
-       ENDIF(WITH_LCMS)
-       IF(WITH_CODEC_QUICKTIME)
-               LINK_DIRECTORIES(${QUICKTIME_LIBPATH})
-       ENDIF(WITH_CODEC_QUICKTIME)
-       IF(WITH_OPENAL)
-               LINK_DIRECTORIES(${OPENAL_LIBPATH})
-       ENDIF(WITH_OPENAL)
-       IF(WITH_JACK)
-               LINK_DIRECTORIES(${JACK_LIBPATH})
-       ENDIF(WITH_JACK)
-       IF(WITH_CODEC_SNDFILE)
-               LINK_DIRECTORIES(${SNDFILE_LIBPATH})
-       ENDIF(WITH_CODEC_SNDFILE)
-       IF(WITH_SAMPLERATE)
-               LINK_DIRECTORIES(${LIBSAMPLERATE_LIBPATH})
-       ENDIF(WITH_SAMPLERATE)
-       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 AND NOT UNIX)
-               LINK_DIRECTORIES(${PTHREADS_LIBPATH})
-       ENDIF(WIN32 AND NOT UNIX)
-ENDMACRO(SETUP_LIBDIRS)
-
-MACRO(SETUP_LIBLINKS
+       link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH})
+
+       if(WITH_PYTHON)
+               link_directories(${PYTHON_LIBPATH})
+       endif()
+       if(WITH_INTERNATIONAL)
+               link_directories(${ICONV_LIBPATH})
+               link_directories(${GETTEXT_LIBPATH})
+       endif()
+       if(WITH_SDL)
+               link_directories(${SDL_LIBPATH})
+       endif()
+       if(WITH_CODEC_FFMPEG)
+               link_directories(${FFMPEG_LIBPATH})
+       endif()
+       if(WITH_IMAGE_OPENEXR)
+               link_directories(${OPENEXR_LIBPATH})
+       endif()
+       if(WITH_IMAGE_TIFF)
+               link_directories(${TIFF_LIBPATH})
+       endif()
+       if(WITH_LCMS)
+               link_directories(${LCMS_LIBPATH})
+       endif()
+       if(WITH_CODEC_QUICKTIME)
+               link_directories(${QUICKTIME_LIBPATH})
+       endif()
+       if(WITH_OPENAL)
+               link_directories(${OPENAL_LIBPATH})
+       endif()
+       if(WITH_JACK)
+               link_directories(${JACK_LIBPATH})
+       endif()
+       if(WITH_CODEC_SNDFILE)
+               link_directories(${SNDFILE_LIBPATH})
+       endif()
+       if(WITH_SAMPLERATE)
+               link_directories(${LIBSAMPLERATE_LIBPATH})
+       endif()
+       if(WITH_FFTW3)
+               link_directories(${FFTW3_LIBPATH})
+       endif()
+       if(WITH_OPENCOLLADA)
+               link_directories(${OPENCOLLADA_LIBPATH})
+               link_directories(${PCRE_LIBPATH})
+               link_directories(${EXPAT_LIBPATH})
+       endif()
+
+       if(WIN32 AND NOT UNIX)
+               link_directories(${PTHREADS_LIBPATH})
+       endif()
+endmacro()
+
+macro(setup_liblinks
        target)
-       SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ")
+       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})
+       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 AND NOT UNIX)
-                       TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d)
-                       TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB})
-               ELSE(WIN32 AND NOT UNIX)
-                       TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB})
-               ENDIF(WIN32 AND NOT UNIX)
-       ENDIF(WITH_PYTHON)
-
-       TARGET_LINK_LIBRARIES(${target} ${OPENGL_glu_LIBRARY} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB})
-       TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIBRARY})
-
-       IF(WITH_INTERNATIONAL)
-               TARGET_LINK_LIBRARIES(${target} ${GETTEXT_LIB})
-
-               IF(WIN32 AND NOT UNIX)
-                       TARGET_LINK_LIBRARIES(${target} ${ICONV_LIB})
-               ENDIF(WIN32 AND NOT UNIX)
-       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_CODEC_SNDFILE)
-               TARGET_LINK_LIBRARIES(${target} ${SNDFILE_LIB})
-       ENDIF(WITH_CODEC_SNDFILE)
-       IF(WITH_SAMPLERATE)
-               TARGET_LINK_LIBRARIES(${target} ${LIBSAMPLERATE_LIB})
-       ENDIF(WITH_SAMPLERATE)  
-       IF(WITH_SDL)
-               TARGET_LINK_LIBRARIES(${target} ${SDL_LIBRARY})
-       ENDIF(WITH_SDL)
-       IF(WITH_CODEC_QUICKTIME)
-               TARGET_LINK_LIBRARIES(${target} ${QUICKTIME_LIB})
-       ENDIF(WITH_CODEC_QUICKTIME)
-       IF(WITH_IMAGE_TIFF)
-               TARGET_LINK_LIBRARIES(${target} ${TIFF_LIBRARY})
-       ENDIF(WITH_IMAGE_TIFF)
-       IF(WITH_IMAGE_OPENEXR)
-               IF(WIN32 AND NOT UNIX)
-                       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 AND NOT UNIX)
-                       TARGET_LINK_LIBRARIES(${target} ${OPENEXR_LIB})
-               ENDIF(WIN32 AND NOT UNIX)
-       ENDIF(WITH_IMAGE_OPENEXR)
-       IF(WITH_LCMS)
-               TARGET_LINK_LIBRARIES(${target} ${LCMS_LIBRARY})
-       ENDIF(WITH_LCMS)
-       IF(WITH_CODEC_FFMPEG)
-               TARGET_LINK_LIBRARIES(${target} ${FFMPEG_LIB})
-       ENDIF(WITH_CODEC_FFMPEG)
-       IF(WITH_OPENCOLLADA)
-               IF(WIN32 AND NOT UNIX)
-                       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 AND NOT UNIX)
-                       TARGET_LINK_LIBRARIES(${target} ${OPENCOLLADA_LIB})
-                       TARGET_LINK_LIBRARIES(${target} ${PCRE_LIB})
-                       TARGET_LINK_LIBRARIES(${target} ${EXPAT_LIB})
-               ENDIF(WIN32 AND NOT UNIX)
-       ENDIF(WITH_OPENCOLLADA)
-       IF(WITH_LCMS)
-               IF(WIN32 AND NOT UNIX)
-                       TARGET_LINK_LIBRARIES(${target} debug ${LCMS_LIB}_d)
-                       TARGET_LINK_LIBRARIES(${target} optimized ${LCMS_LIB})
-               ENDIF(WIN32 AND NOT UNIX)
-       ENDIF(WITH_LCMS)
-       IF(WIN32 AND NOT UNIX)
-               TARGET_LINK_LIBRARIES(${target} ${PTHREADS_LIB})
-       ENDIF(WIN32 AND NOT UNIX)
-ENDMACRO(SETUP_LIBLINKS)
-
-MACRO(TEST_SSE_SUPPORT)
-       INCLUDE(CheckCSourceRuns)
-
-       MESSAGE(STATUS "Detecting SSE support")
-       IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-               SET(CMAKE_REQUIRED_FLAGS "-msse -msse2")
-       ELSEIF(MSVC)
-               SET(CMAKE_REQUIRED_FLAGS "/arch:SSE2") # TODO, SSE 1 ?
-       ENDIF()
-
-       CHECK_C_SOURCE_RUNS("
+       if(WITH_PYTHON)
+               target_link_libraries(${target} ${PYTHON_LINKFLAGS})
+
+               if(WIN32 AND NOT UNIX)
+                       target_link_libraries(${target} debug ${PYTHON_LIB}_d)
+                       target_link_libraries(${target} optimized ${PYTHON_LIB})
+               else()
+                       target_link_libraries(${target} ${PYTHON_LIB})
+               endif()
+       endif()
+
+       target_link_libraries(${target} ${OPENGL_glu_LIBRARY} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB})
+       target_link_libraries(${target} ${FREETYPE_LIBRARY})
+
+       if(WITH_INTERNATIONAL)
+               target_link_libraries(${target} ${GETTEXT_LIB})
+
+               if(WIN32 AND NOT UNIX)
+                       target_link_libraries(${target} ${ICONV_LIB})
+               endif()
+       endif()
+
+       if(WITH_OPENAL)
+               target_link_libraries(${target} ${OPENAL_LIBRARY})
+       endif()
+       if(WITH_FFTW3)  
+               target_link_libraries(${target} ${FFTW3_LIB})
+       endif()
+       if(WITH_JACK)
+               target_link_libraries(${target} ${JACK_LIB})
+       endif()
+       if(WITH_CODEC_SNDFILE)
+               target_link_libraries(${target} ${SNDFILE_LIB})
+       endif()
+       if(WITH_SAMPLERATE)
+               target_link_libraries(${target} ${LIBSAMPLERATE_LIB})
+       endif() 
+       if(WITH_SDL)
+               target_link_libraries(${target} ${SDL_LIBRARY})
+       endif()
+       if(WITH_CODEC_QUICKTIME)
+               target_link_libraries(${target} ${QUICKTIME_LIB})
+       endif()
+       if(WITH_IMAGE_TIFF)
+               target_link_libraries(${target} ${TIFF_LIBRARY})
+       endif()
+       if(WITH_IMAGE_OPENEXR)
+               if(WIN32 AND NOT UNIX)
+                       foreach(loop_var ${OPENEXR_LIB})
+                               target_link_libraries(${target} debug ${loop_var}_d)
+                               target_link_libraries(${target} optimized ${loop_var})
+                       endforeach()
+               else()
+                       target_link_libraries(${target} ${OPENEXR_LIB})
+               endif()
+       endif()
+       if(WITH_LCMS)
+               target_link_libraries(${target} ${LCMS_LIBRARY})
+       endif()
+       if(WITH_CODEC_FFMPEG)
+               target_link_libraries(${target} ${FFMPEG_LIB})
+       endif()
+       if(WITH_OPENCOLLADA)
+               if(WIN32 AND NOT UNIX)
+                       foreach(loop_var ${OPENCOLLADA_LIB})
+                               target_link_libraries(${target} debug ${loop_var}_d)
+                               target_link_libraries(${target} optimized ${loop_var})
+                       endforeach()
+                       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()
+               else()
+                       target_link_libraries(${target} ${OPENCOLLADA_LIB})
+                       target_link_libraries(${target} ${PCRE_LIB})
+                       target_link_libraries(${target} ${EXPAT_LIB})
+               endif()
+       endif()
+       if(WITH_LCMS)
+               if(WIN32 AND NOT UNIX)
+                       target_link_libraries(${target} debug ${LCMS_LIB}_d)
+                       target_link_libraries(${target} optimized ${LCMS_LIB})
+               endif()
+       endif()
+       if(WIN32 AND NOT UNIX)
+               target_link_libraries(${target} ${PTHREADS_LIB})
+       endif()
+endmacro()
+
+macro(TEST_SSE_SUPPORT)
+       include(CheckCSourceRuns)
+
+       message(STATUS "Detecting SSE support")
+       if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+               set(CMAKE_REQUIRED_FLAGS "-msse -msse2")
+       elseif(MSVC)
+               set(CMAKE_REQUIRED_FLAGS "/arch:SSE2") # TODO, SSE 1 ?
+       endif()
+
+       check_c_source_runs("
                #include <xmmintrin.h>
                int main() { __m128 v = _mm_setzero_ps(); return 0; }"
        SUPPORT_SSE_BUILD)
 
-       CHECK_C_SOURCE_RUNS("
+       check_c_source_runs("
                #include <emmintrin.h>
                int main() { __m128d v = _mm_setzero_pd(); return 0; }"
        SUPPORT_SSE2_BUILD)
-       MESSAGE(STATUS "Detecting SSE support")
+       message(STATUS "Detecting SSE support")
 
-       IF(SUPPORT_SSE_BUILD)
-               MESSAGE(STATUS "   ...SSE support found.")
-       ELSE(SUPPORT_SSE_BUILD)
-               MESSAGE(STATUS "   ...SSE support missing.")
-       ENDIF(SUPPORT_SSE_BUILD)
+       if(SUPPORT_SSE_BUILD)
+               message(STATUS "   ...SSE support found.")
+       else()
+               message(STATUS "   ...SSE support missing.")
+       endif()
 
-       IF(SUPPORT_SSE2_BUILD)
-               MESSAGE(STATUS "   ...SSE2 support found.")
-       ELSE(SUPPORT_SSE2_BUILD)
-               MESSAGE(STATUS "   ...SSE2 support missing.")
-       ENDIF(SUPPORT_SSE2_BUILD)
+       if(SUPPORT_SSE2_BUILD)
+               message(STATUS "   ...SSE2 support found.")
+       else()
+               message(STATUS "   ...SSE2 support missing.")
+       endif()
 
-ENDMACRO(TEST_SSE_SUPPORT)
+endmacro()
 
 # when we have warnings as errors applied globally this
 # needs to be removed for some external libs which we dont maintain.
 
 # utility macro
-MACRO(_REMOVE_STRICT_FLAGS
+macro(_remove_strict_flags
        flag)
        
-       STRING(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
-       STRING(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
-       STRING(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
-       STRING(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
-       STRING(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
-
-       STRING(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-       STRING(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
-       STRING(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
-       STRING(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
-       STRING(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
-
-ENDMACRO(_REMOVE_STRICT_FLAGS)
-
-MACRO(REMOVE_STRICT_FLAGS)
-
-       IF(CMAKE_COMPILER_IS_GNUCC)
-               _REMOVE_STRICT_FLAGS("-Wstrict-prototypes")
-               _REMOVE_STRICT_FLAGS("-Wunused-parameter")
-               _REMOVE_STRICT_FLAGS("-Wwrite-strings")
-               _REMOVE_STRICT_FLAGS("-Wshadow")
-               _REMOVE_STRICT_FLAGS("-Werror=[^ ]+")
-               _REMOVE_STRICT_FLAGS("-Werror")
-       ENDIF(CMAKE_COMPILER_IS_GNUCC)
-
-       IF(MSVC)
+       string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+       string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
+       string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
+       string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
+       string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
+
+       string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+       string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
+       string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
+       string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
+       string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+
+endmacro()
+
+macro(remove_strict_flags)
+
+       if(CMAKE_COMPILER_IS_GNUCC)
+               _remove_strict_flags("-Wstrict-prototypes")
+               _remove_strict_flags("-Wunused-parameter")
+               _remove_strict_flags("-Wwrite-strings")
+               _remove_strict_flags("-Wshadow")
+               _remove_strict_flags("-Werror=[^ ]+")
+               _remove_strict_flags("-Werror")
+       endif()
+
+       if(MSVC)
                # TODO
-       ENDIF(MSVC)
+       endif()
 
-ENDMACRO(REMOVE_STRICT_FLAGS)
+endmacro()
 
 
-MACRO(GET_BLENDER_VERSION)
-       FILE(READ ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h CONTENT)
-       STRING(REGEX REPLACE "\n" ";" CONTENT "${CONTENT}")
-       STRING(REGEX REPLACE "\t" ";" CONTENT "${CONTENT}")
-       STRING(REGEX REPLACE " " ";" CONTENT "${CONTENT}")
+macro(get_blender_version)
+       file(READ ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h CONTENT)
+       string(REGEX REPLACE "\n" ";" CONTENT "${CONTENT}")
+       string(REGEX REPLACE "\t" ";" CONTENT "${CONTENT}")
+       string(REGEX REPLACE " " ";" CONTENT "${CONTENT}")
 
-       FOREACH(ITEM ${CONTENT})
-               IF(LASTITEM MATCHES "BLENDER_VERSION")
+       foreach(ITEM ${CONTENT})
+               if(LASTITEM MATCHES "BLENDER_VERSION")
                        MATH(EXPR BLENDER_VERSION_MAJOR "${ITEM} / 100")
                        MATH(EXPR BLENDER_VERSION_MINOR "${ITEM} % 100")
-                       SET(BLENDER_VERSION "${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}")
-               ENDIF(LASTITEM MATCHES "BLENDER_VERSION")
+                       set(BLENDER_VERSION "${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}")
+               endif()
                
-               IF(LASTITEM MATCHES "BLENDER_SUBVERSION")
-                       SET(BLENDER_SUBVERSION ${ITEM})
-               ENDIF(LASTITEM MATCHES "BLENDER_SUBVERSION")
+               if(LASTITEM MATCHES "BLENDER_SUBVERSION")
+                       set(BLENDER_SUBVERSION ${ITEM})
+               endif()
                
-               IF(LASTITEM MATCHES "BLENDER_MINVERSION")
+               if(LASTITEM MATCHES "BLENDER_MINVERSION")
                        MATH(EXPR BLENDER_MINVERSION_MAJOR "${ITEM} / 100")
                        MATH(EXPR BLENDER_MINVERSION_MINOR "${ITEM} % 100")
-                       SET(BLENDER_MINVERSION "${BLENDER_MINVERSION_MAJOR}.${BLENDER_MINVERSION_MINOR}")
-               ENDIF(LASTITEM MATCHES "BLENDER_MINVERSION")
+                       set(BLENDER_MINVERSION "${BLENDER_MINVERSION_MAJOR}.${BLENDER_MINVERSION_MINOR}")
+               endif()
                
-               IF(LASTITEM MATCHES "BLENDER_MINSUBVERSION")
-                       SET(BLENDER_MINSUBVERSION ${ITEM})
-               ENDIF(LASTITEM MATCHES "BLENDER_MINSUBVERSION")
+               if(LASTITEM MATCHES "BLENDER_MINSUBVERSION")
+                       set(BLENDER_MINSUBVERSION ${ITEM})
+               endif()
 
-               SET(LASTITEM ${ITEM})
-       ENDFOREACH(ITEM ${CONTENT})
+               set(LASTITEM ${ITEM})
+       endforeach()
        
-       MESSAGE(STATUS "Version major: ${BLENDER_VERSION_MAJOR}, Version minor: ${BLENDER_VERSION_MINOR}, Subversion: ${BLENDER_SUBVERSION}, Version: ${BLENDER_VERSION}")
-       MESSAGE(STATUS "Minversion major: ${BLENDER_MINVERSION_MAJOR}, Minversion minor: ${BLENDER_MINVERSION_MINOR}, MinSubversion: ${BLENDER_MINSUBVERSION}, Minversion: ${BLENDER_MINVERSION}")
-ENDMACRO(GET_BLENDER_VERSION)
+       message(STATUS "Version major: ${BLENDER_VERSION_MAJOR}, Version minor: ${BLENDER_VERSION_MINOR}, Subversion: ${BLENDER_SUBVERSION}, Version: ${BLENDER_VERSION}")
+       message(STATUS "Minversion major: ${BLENDER_MINVERSION_MAJOR}, Minversion minor: ${BLENDER_MINVERSION_MINOR}, MinSubversion: ${BLENDER_MINSUBVERSION}, Minversion: ${BLENDER_MINVERSION}")
+endmacro()
index 72a290d4e10cc8c84f2e79bdb2f67e1ee876e81b..cdbfa3e0dff841ebd65d38fedad7bb6a1c190424 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 # Otherwise we get warnings here that we cant fix in external projects
-REMOVE_STRICT_FLAGS()
+remove_strict_flags()
 
-IF(WITH_BULLET)
-       ADD_SUBDIRECTORY(bullet2)
-ENDIF(WITH_BULLET)
+if(WITH_BULLET)
+       add_subdirectory(bullet2)
+endif()
 
-IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-       ADD_SUBDIRECTORY(binreloc)
-ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+       add_subdirectory(binreloc)
+endif()
 
-ADD_SUBDIRECTORY(glew)
+add_subdirectory(glew)
 
-IF(WITH_IMAGE_OPENJPEG)
-       ADD_SUBDIRECTORY(libopenjpeg)
-ENDIF(WITH_IMAGE_OPENJPEG)
+if(WITH_IMAGE_OPENJPEG)
+       add_subdirectory(libopenjpeg)
+endif()
 
-IF(WITH_IMAGE_REDCODE)
-       ADD_SUBDIRECTORY(libredcode)
-ENDIF(WITH_IMAGE_REDCODE)
+if(WITH_IMAGE_REDCODE)
+       add_subdirectory(libredcode)
+endif()
 
-IF(WITH_LZO)
-       ADD_SUBDIRECTORY(lzo)
-ENDIF(WITH_LZO)
+if(WITH_LZO)
+       add_subdirectory(lzo)
+endif()
 
-IF(WITH_LZMA)
-       ADD_SUBDIRECTORY(lzma)
-ENDIF(WITH_LZMA)
+if(WITH_LZMA)
+       add_subdirectory(lzma)
+endif()
index a8d5ecd8a773556c645e73e0bd0d2041ca56646c..d0bba4c3cf931ee8406516d5403b5a36475b7f54 100644 (file)
 # All rights reserved.
 #
 
-SET(SRC
+set(SRC
        binreloc.c
 
        include/binreloc.h
 )
 
-SET(INC
+set(INC
        ./include
 )
 
-ADD_DEFINITIONS(-DENABLE_BINRELOC)
+add_definitions(-DENABLE_BINRELOC)
 
 
-BLENDERLIB(extern_binreloc "${SRC}" "${INC}")
+blenderlib(extern_binreloc "${SRC}" "${INC}")
index ace5e9881234a6d97027dd8674c8cd849b1df808..278a7d46e54dfb60db5d9d25a442426792960bc4 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
        src
 )
 
-SET(SRC
+set(SRC
        src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp
        src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp
        src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp
@@ -319,4 +319,4 @@ SET(SRC
        src/btBulletDynamicsCommon.h
 )
 
-BLENDERLIB(extern_bullet "${SRC}" "${INC}")
+blenderlib(extern_bullet "${SRC}" "${INC}")
index ddc806a3e6acc1ef181d60a3ff408926a4b0d388..c3c0224c8a3e49f3e0b0bb7f641daa4df3f181c8 100644 (file)
@@ -1,6 +1,6 @@
-INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src } )
+include_directories( ${BULLET_PHYSICS_SOURCE_DIR}/src } )
 
-SET(BulletCollision_SRCS
+set(BulletCollision_SRCS
        BroadphaseCollision/btAxisSweep3.cpp
        BroadphaseCollision/btBroadphaseProxy.cpp
        BroadphaseCollision/btCollisionAlgorithm.cpp
@@ -88,10 +88,10 @@ SET(BulletCollision_SRCS
        NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
 )
 
-SET(Root_HDRS
+set(Root_HDRS
        ../btBulletCollisionCommon.h
 )
-SET(BroadphaseCollision_HDRS
+set(BroadphaseCollision_HDRS
        BroadphaseCollision/btAxisSweep3.h
        BroadphaseCollision/btBroadphaseInterface.h
        BroadphaseCollision/btBroadphaseProxy.h
@@ -105,7 +105,7 @@ SET(BroadphaseCollision_HDRS
        BroadphaseCollision/btQuantizedBvh.h
        BroadphaseCollision/btSimpleBroadphase.h
 )
-SET(CollisionDispatch_HDRS
+set(CollisionDispatch_HDRS
        CollisionDispatch/btActivatingCollisionAlgorithm.h
        CollisionDispatch/btCollisionConfiguration.h
        CollisionDispatch/btCollisionCreateFunc.h
@@ -129,7 +129,7 @@ SET(CollisionDispatch_HDRS
        CollisionDispatch/btUnionFind.h
        CollisionDispatch/SphereTriangleDetector.h
 )
-SET(CollisionShapes_HDRS
+set(CollisionShapes_HDRS
        CollisionShapes/btBoxShape.h
        CollisionShapes/btBvhTriangleMeshShape.h
        CollisionShapes/btCapsuleShape.h
@@ -166,7 +166,7 @@ SET(CollisionShapes_HDRS
        CollisionShapes/btTriangleMeshShape.h
        CollisionShapes/btUniformScalingShape.h
 )
-SET(Gimpact_HDRS
+set(Gimpact_HDRS
        Gimpact/btGImpactShape.h
        Gimpact/gim_contact.h
        Gimpact/btGImpactBvh.h
@@ -178,7 +178,7 @@ SET(Gimpact_HDRS
        Gimpact/btGImpactQuantizedBvh.h
        Gimpact/gim_box_set.h
 )
-SET(NarrowPhaseCollision_HDRS
+set(NarrowPhaseCollision_HDRS
        NarrowPhaseCollision/btContinuousConvexCollision.h
        NarrowPhaseCollision/btConvexCast.h
        NarrowPhaseCollision/btConvexPenetrationDepthSolver.h
@@ -197,7 +197,7 @@ SET(NarrowPhaseCollision_HDRS
        NarrowPhaseCollision/btVoronoiSimplexSolver.h
 )
 
-SET(BulletCollision_HDRS
+set(BulletCollision_HDRS
        ${Root_HDRS}
        ${BroadphaseCollision_HDRS}
        ${CollisionDispatch_HDRS}
@@ -207,28 +207,28 @@ SET(BulletCollision_HDRS
 )
 
 
-ADD_LIBRARY(BulletCollision ${BulletCollision_SRCS} ${BulletCollision_HDRS})
+add_library(BulletCollision ${BulletCollision_SRCS} ${BulletCollision_HDRS})
 SET_TARGET_PROPERTIES(BulletCollision PROPERTIES VERSION ${BULLET_VERSION})
 SET_TARGET_PROPERTIES(BulletCollision PROPERTIES SOVERSION ${BULLET_VERSION})
-IF (BUILD_SHARED_LIBS)
-       TARGET_LINK_LIBRARIES(BulletCollision LinearMath)
-ENDIF (BUILD_SHARED_LIBS)
+if(BUILD_SHARED_LIBS)
+       target_link_libraries(BulletCollision LinearMath)
+endif()
 
 #INSTALL of other files requires CMake 2.6
-IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
-       INSTALL(TARGETS BulletCollision DESTINATION lib)
-                               INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
-ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+       install(TARGETS BulletCollision DESTINATION lib)
+                               install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
+endif()
 
-IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+if(APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
        SET_TARGET_PROPERTIES(BulletCollision PROPERTIES FRAMEWORK true)
 
        SET_TARGET_PROPERTIES(BulletCollision PROPERTIES PUBLIC_HEADER "${Root_HDRS}")
        # Have to list out sub-directories manually:
-       SET_PROPERTY(SOURCE ${BroadphaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/BroadphaseCollision)
-       SET_PROPERTY(SOURCE ${CollisionDispatch_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionDispatch)
-       SET_PROPERTY(SOURCE ${CollisionShapes_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionShapes)
-       SET_PROPERTY(SOURCE ${Gimpact_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Gimpact)
-       SET_PROPERTY(SOURCE ${NarrowPhaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/NarrowPhaseCollision)
+       set_property(SOURCE ${BroadphaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/BroadphaseCollision)
+       set_property(SOURCE ${CollisionDispatch_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionDispatch)
+       set_property(SOURCE ${CollisionShapes_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionShapes)
+       set_property(SOURCE ${Gimpact_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Gimpact)
+       set_property(SOURCE ${NarrowPhaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/NarrowPhaseCollision)
 
-ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+endif()
index ecfcbfef9293f75d7b54c537279a92157b719bc0..f605e6272f3926e08ac477ba1613573223bc0624 100644 (file)
@@ -1,6 +1,6 @@
-INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src } )
+include_directories( ${BULLET_PHYSICS_SOURCE_DIR}/src } )
 
-SET(BulletDynamics_SRCS
+set(BulletDynamics_SRCS
        ConstraintSolver/btContactConstraint.cpp
        ConstraintSolver/btConeTwistConstraint.cpp
        ConstraintSolver/btGeneric6DofConstraint.cpp
@@ -19,11 +19,11 @@ SET(BulletDynamics_SRCS
        Character/btKinematicCharacterController.cpp
 )
 
-SET(Root_HDRS
+set(Root_HDRS
        ../btBulletDynamicsCommon.h
        ../btBulletCollisionCommon.h
 )
-SET(ConstraintSolver_HDRS
+set(ConstraintSolver_HDRS
        ConstraintSolver/btConstraintSolver.h
        ConstraintSolver/btContactConstraint.h
        ConstraintSolver/btContactSolverInfo.h
@@ -39,27 +39,27 @@ SET(ConstraintSolver_HDRS
        ConstraintSolver/btSolverConstraint.h
        ConstraintSolver/btTypedConstraint.h
 )
-SET(Dynamics_HDRS
+set(Dynamics_HDRS
        Dynamics/btContinuousDynamicsWorld.h
        Dynamics/btDiscreteDynamicsWorld.h
        Dynamics/btDynamicsWorld.h
        Dynamics/btSimpleDynamicsWorld.h
        Dynamics/btRigidBody.h
 )
-SET(Vehicle_HDRS
+set(Vehicle_HDRS
        Vehicle/btRaycastVehicle.h
        Vehicle/btVehicleRaycaster.h
        Vehicle/btWheelInfo.h
 )
 
-SET(Character_HDRS
+set(Character_HDRS
        Character/btCharacterControllerInterface.h
        Character/btKinematicCharacterController.h
 )
 
 
 
-SET(BulletDynamics_HDRS
+set(BulletDynamics_HDRS
        ${Root_HDRS}
        ${ConstraintSolver_HDRS}
        ${Dynamics_HDRS}
@@ -68,26 +68,26 @@ SET(BulletDynamics_HDRS
 )
 
 
-ADD_LIBRARY(BulletDynamics ${BulletDynamics_SRCS} ${BulletDynamics_HDRS})
+add_library(BulletDynamics ${BulletDynamics_SRCS} ${BulletDynamics_HDRS})
 SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES VERSION ${BULLET_VERSION})
 SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES SOVERSION ${BULLET_VERSION})
-IF (BUILD_SHARED_LIBS)
-       TARGET_LINK_LIBRARIES(BulletDynamics BulletCollision LinearMath)
-ENDIF (BUILD_SHARED_LIBS)
+if(BUILD_SHARED_LIBS)
+       target_link_libraries(BulletDynamics BulletCollision LinearMath)
+endif()
 
-IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
-       INSTALL(TARGETS BulletDynamics DESTINATION lib)
-       INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
-ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+       install(TARGETS BulletDynamics DESTINATION lib)
+       install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
+endif()
 
-IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+if(APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
        SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES FRAMEWORK true)
        
        SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES PUBLIC_HEADER "${Root_HDRS}")
        # Have to list out sub-directories manually:
-       SET_PROPERTY(SOURCE ${ConstraintSolver_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/ConstraintSolver)
-       SET_PROPERTY(SOURCE ${Dynamics_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Dynamics)
-       SET_PROPERTY(SOURCE ${Vehicle_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Vehicle)
-       SET_PROPERTY(SOURCE ${Character_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Character)
+       set_property(SOURCE ${ConstraintSolver_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/ConstraintSolver)
+       set_property(SOURCE ${Dynamics_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Dynamics)
+       set_property(SOURCE ${Vehicle_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Vehicle)
+       set_property(SOURCE ${Character_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Character)
                
-ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+endif()
index fe31d2bee71b588ca7ed5d8064d4360aa07aedbe..16fc86f4c56f4de4ae68303b0161875fb6404005 100644 (file)
@@ -1,9 +1,9 @@
 
-INCLUDE_DIRECTORIES(
+include_directories(
 ${BULLET_PHYSICS_SOURCE_DIR}/src }
 )
 
-SET(BulletSoftBody_SRCS
+set(BulletSoftBody_SRCS
        btSoftBody.cpp
        btSoftBodyHelpers.cpp
        btSoftBodyRigidBodyCollisionConfiguration.cpp
@@ -13,7 +13,7 @@ SET(BulletSoftBody_SRCS
        btSoftRigidDynamicsWorld.cpp
 )
 
-SET(BulletSoftBody_HDRS
+set(BulletSoftBody_HDRS
        btSoftBody.h
        btSparseSDF.h
        btSoftBodyHelpers.h
@@ -25,19 +25,19 @@ SET(BulletSoftBody_HDRS
 
 
 
-ADD_LIBRARY(BulletSoftBody  ${BulletSoftBody_SRCS} ${BulletSoftBody_HDRS})
+add_library(BulletSoftBody  ${BulletSoftBody_SRCS} ${BulletSoftBody_HDRS})
 SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES VERSION ${BULLET_VERSION})
 SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES SOVERSION ${BULLET_VERSION})
-IF (BUILD_SHARED_LIBS)
-       TARGET_LINK_LIBRARIES(BulletSoftBody BulletDynamics)
-ENDIF (BUILD_SHARED_LIBS)
+if(BUILD_SHARED_LIBS)
+       target_link_libraries(BulletSoftBody BulletDynamics)
+endif()
 
-IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
-       INSTALL(TARGETS BulletSoftBody DESTINATION lib)
-                               INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
-ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+       install(TARGETS BulletSoftBody DESTINATION lib)
+                               install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
+endif()
 
-IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+if(APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
        SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES FRAMEWORK true)
        SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES PUBLIC_HEADER "${BulletSoftBody_HDRS}")
-ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+endif()
index 9b8a5a7e00e21c1147a756be9a429e92dbda6e63..6c9b6b0127b320a99b90184b3bf087cac467914b 100644 (file)
@@ -1,4 +1,4 @@
-ADD_SUBDIRECTORY(BulletCollision)
-ADD_SUBDIRECTORY(BulletDynamics)
-ADD_SUBDIRECTORY(LinearMath)
-ADD_SUBDIRECTORY(BulletSoftBody )
+add_subdirectory(BulletCollision)
+add_subdirectory(BulletDynamics)
+add_subdirectory(LinearMath)
+add_subdirectory(BulletSoftBody )
index 99d5a6a2fefabeb3cfe0dfdeffe5369cb95517bf..acd3dbc406d1796c262e45b21e2617b7f2e298a5 100644 (file)
@@ -1,16 +1,16 @@
 
-INCLUDE_DIRECTORIES(
+include_directories(
 ${BULLET_PHYSICS_SOURCE_DIR}/src }
 )
 
-SET(LinearMath_SRCS
+set(LinearMath_SRCS
                btConvexHull.cpp
                btQuickprof.cpp
                btGeometryUtil.cpp
                btAlignedAllocator.cpp
 )
 
-SET(LinearMath_HDRS
+set(LinearMath_HDRS
                btAlignedObjectArray.h
                btList.h
                btPoolAllocator.h
@@ -35,17 +35,17 @@ SET(LinearMath_HDRS
                btTransformUtil.h
 )
 
-ADD_LIBRARY(LinearMath ${LinearMath_SRCS} ${LinearMath_HDRS})
+add_library(LinearMath ${LinearMath_SRCS} ${LinearMath_HDRS})
 SET_TARGET_PROPERTIES(LinearMath PROPERTIES VERSION ${BULLET_VERSION})
 SET_TARGET_PROPERTIES(LinearMath PROPERTIES SOVERSION ${BULLET_VERSION})
 
 #FILES_MATCHING requires CMake 2.6
-IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
-       INSTALL(TARGETS LinearMath DESTINATION lib)
-       INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
-ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+       install(TARGETS LinearMath DESTINATION lib)
+       install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
+endif()
 
-IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+if(APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
        SET_TARGET_PROPERTIES(LinearMath PROPERTIES FRAMEWORK true)
        SET_TARGET_PROPERTIES(LinearMath PROPERTIES PUBLIC_HEADER "${LinearMath_HDRS}")
-ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+endif()
index 7bd766d465d7cba306d372fd1803f5fc05172752..82778fd13fb59d1bec14f9737b9b13d3fedff143 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ./include
 )
 
-IF(UNIX)
-       LIST(APPEND INC ${X11_X11_INCLUDE_PATH})
-ENDIF(UNIX)
+if(UNIX)
+       list(APPEND INC ${X11_X11_INCLUDE_PATH})
+endif()
 
-SET(SRC
+set(SRC
        src/glew.c
 
        include/GL/glew.h
@@ -40,6 +40,6 @@ SET(SRC
        include/GL/wglew.h
 )
 
-ADD_DEFINITIONS(-DGLEW_STATIC)
+add_definitions(-DGLEW_STATIC)
 
-BLENDERLIB(extern_glew "${SRC}" "${INC}")
+blenderlib(extern_glew "${SRC}" "${INC}")
index d6e98e9a390d851a6ac115b290a461ed147b20bc..f52c48264b619578168fb11c8b183ff76e20446b 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
 )
 
-SET(SRC
+set(SRC
        bio.c
        cio.c
        dwt.c
@@ -73,4 +73,4 @@ SET(SRC
        tgt.h
 )
 
-BLENDERLIB(extern_openjpeg "${SRC}" "${INC}")
+blenderlib(extern_openjpeg "${SRC}" "${INC}")
index b094a359b034774561dde12e534fab05951d46f4..269de031f90896a8fbf13cac9adda931eb838aea 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
        ../libopenjpeg
 )
 
-SET(SRC
+set(SRC
        codec.c
        debayer.c
        format.c
@@ -39,4 +39,4 @@ SET(SRC
        format.h
 )
 
-BLENDERLIB(extern_redcode "${SRC}" "${INC}")
+blenderlib(extern_redcode "${SRC}" "${INC}")
index e04d3e1bd3b7d5976205f45cdb3f272dca1c73bd..8a4cf166b2dae9e59c1429e25d7bc29a99eb39cb 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
 )
 
-SET(SRC
+set(SRC
        Alloc.c
        LzFind.c
        LzmaDec.c
@@ -44,4 +44,4 @@ SET(SRC
        Types.h
 )
 
-BLENDERLIB(extern_lzma "${SRC}" "${INC}")
+blenderlib(extern_lzma "${SRC}" "${INC}")
index 7724711a3e5a0fe12a98ff32c733de9d5093a2a3..3c68d64d181ef8d2ec1659eaea3af7ac0693b497 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        include
 )
 
-SET(SRC
+set(SRC
        minilzo/minilzo.c
 
        minilzo/lzoconf.h
@@ -36,4 +36,4 @@ SET(SRC
        minilzo/minilzo.h
 )
 
-BLENDERLIB(extern_minilzo "${SRC}" "${INC}")
+blenderlib(extern_minilzo "${SRC}" "${INC}")
index a497d8f2078c3c3f51638788308f3ce0219eb467..3eed1ef54d2dafef14da766602b0c0eba27e0d0f 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-ADD_SUBDIRECTORY(audaspace)
-ADD_SUBDIRECTORY(string)
-ADD_SUBDIRECTORY(ghost)
-ADD_SUBDIRECTORY(guardedalloc)
-ADD_SUBDIRECTORY(moto)
-ADD_SUBDIRECTORY(memutil)
-ADD_SUBDIRECTORY(iksolver)
-ADD_SUBDIRECTORY(opennl)
-ADD_SUBDIRECTORY(smoke)
+add_subdirectory(audaspace)
+add_subdirectory(string)
+add_subdirectory(ghost)
+add_subdirectory(guardedalloc)
+add_subdirectory(moto)
+add_subdirectory(memutil)
+add_subdirectory(iksolver)
+add_subdirectory(opennl)
+add_subdirectory(smoke)
 
-IF(WITH_MOD_FLUID)
-       ADD_SUBDIRECTORY(elbeem)
-ENDIF(WITH_MOD_FLUID)
+if(WITH_MOD_FLUID)
+       add_subdirectory(elbeem)
+endif()
 
-IF(WITH_MOD_DECIMATE)
-       ADD_SUBDIRECTORY(container)
-       ADD_SUBDIRECTORY(decimation)
-ENDIF(WITH_MOD_DECIMATE)
+if(WITH_MOD_DECIMATE)
+       add_subdirectory(container)
+       add_subdirectory(decimation)
+endif()
 
-IF(WITH_MOD_BOOLEAN)
-       ADD_SUBDIRECTORY(boolop)
-       ADD_SUBDIRECTORY(bsp)
-ENDIF(WITH_MOD_BOOLEAN)
+if(WITH_MOD_BOOLEAN)
+       add_subdirectory(boolop)
+       add_subdirectory(bsp)
+endif()
 
-IF(WITH_IK_ITASC)
-       ADD_SUBDIRECTORY(itasc)
-ENDIF(WITH_IK_ITASC)
+if(WITH_IK_ITASC)
+       add_subdirectory(itasc)
+endif()
index 440233eacbc3e92ad3e2cd20891cb018729ad295..1805e7ed494d83e31db9066825d09fe913e1b3a8 100644 (file)
@@ -20,7 +20,7 @@
 #
 # ***** END LGPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
        intern
        FX SRC
@@ -28,7 +28,7 @@ SET(INC
        ${LIBSAMPLERATE_INC}
 )
 
-SET(SRC
+set(SRC
        FX/AUD_AccumulatorFactory.cpp
        FX/AUD_BaseIIRFilterReader.cpp
        FX/AUD_ButterworthFactory.cpp
@@ -153,94 +153,94 @@ SET(SRC
        FX/AUD_VolumeFactory.h
 )
 
-IF(WITH_CODEC_FFMPEG)
-       ADD_DEFINITIONS(-DWITH_FFMPEG)
-       LIST(APPEND INC ffmpeg ${FFMPEG_INC})
-       SET(FFMPEGSRC
+if(WITH_CODEC_FFMPEG)
+       add_definitions(-DWITH_FFMPEG)
+       list(APPEND INC ffmpeg ${FFMPEG_INC})
+       set(FFMPEGSRC
                ffmpeg/AUD_FFMPEGFactory.cpp
                ffmpeg/AUD_FFMPEGReader.cpp
 
                ffmpeg/AUD_FFMPEGFactory.h
                ffmpeg/AUD_FFMPEGReader.h
        )
-ENDIF(WITH_CODEC_FFMPEG)
+endif()
 
-IF(WITH_SDL)
-       ADD_DEFINITIONS(-DWITH_SDL)
-       LIST(APPEND INC SDL ${SDL_INCLUDE_DIR})
-       SET(SDLSRC
+if(WITH_SDL)
+       add_definitions(-DWITH_SDL)
+       list(APPEND INC SDL ${SDL_INCLUDE_DIR})
+       set(SDLSRC
                SDL/AUD_SDLDevice.cpp
 
                SDL/AUD_SDLDevice.h
        )
-ENDIF(WITH_SDL)
+endif()
 
-IF(WITH_OPENAL)
-       ADD_DEFINITIONS(-DWITH_OPENAL)
-       LIST(APPEND INC OpenAL ${OPENAL_INCLUDE_DIR})
-       SET(OPENALSRC
+if(WITH_OPENAL)
+       add_definitions(-DWITH_OPENAL)
+       list(APPEND INC OpenAL ${OPENAL_INCLUDE_DIR})
+       set(OPENALSRC
                OpenAL/AUD_OpenALDevice.cpp
 
                OpenAL/AUD_OpenALDevice.h
        )       
-ENDIF(WITH_OPENAL)
+endif()
 
-IF(WITH_JACK)
-       ADD_DEFINITIONS(-DWITH_JACK)
-       LIST(APPEND INC jack ${JACK_INC})
-       SET(JACKSRC
+if(WITH_JACK)
+       add_definitions(-DWITH_JACK)
+       list(APPEND INC jack ${JACK_INC})
+       set(JACKSRC
                jack/AUD_JackDevice.cpp
 
                jack/AUD_JackDevice.h
        )       
-ENDIF(WITH_JACK)
+endif()
 
-IF(WITH_CODEC_SNDFILE)
-       ADD_DEFINITIONS(-DWITH_SNDFILE)
-       LIST(APPEND INC sndfile ${SNDFILE_INC})
-       SET(SNDFILESRC
+if(WITH_CODEC_SNDFILE)
+       add_definitions(-DWITH_SNDFILE)
+       list(APPEND INC sndfile ${SNDFILE_INC})
+       set(SNDFILESRC
                sndfile/AUD_SndFileFactory.cpp
                sndfile/AUD_SndFileReader.cpp
 
                sndfile/AUD_SndFileFactory.h
                sndfile/AUD_SndFileReader.h
        )
-ENDIF(WITH_CODEC_SNDFILE)
+endif()
 
-IF(WITH_SAMPLERATE)
-       ADD_DEFINITIONS(-DWITH_SAMPLERATE)
-       SET(SRCFILESRC
+if(WITH_SAMPLERATE)
+       add_definitions(-DWITH_SAMPLERATE)
+       set(SRCFILESRC
                SRC/AUD_SRCResampleFactory.cpp
                SRC/AUD_SRCResampleReader.cpp
 
                SRC/AUD_SRCResampleFactory.h
                SRC/AUD_SRCResampleReader.h
        )
-ENDIF(WITH_SAMPLERATE)
+endif()
 
-IF(WITH_FFTW3 AND FALSE)
-       ADD_DEFINITIONS(-DWITH_FFTW3)
-       LIST(APPEND INC fftw ${FFTW3_INC})
-       SET(FFTW3SRC
+if(WITH_FFTW3 AND FALSE)
+       add_definitions(-DWITH_FFTW3)
+       list(APPEND INC fftw ${FFTW3_INC})
+       set(FFTW3SRC
                fftw/AUD_BandPassFactory.cpp
                fftw/AUD_BandPassReader.cpp
 
                fftw/AUD_BandPassFactory.h
                fftw/AUD_BandPassReader.h
        )
-ENDIF(WITH_FFTW3 AND FALSE)
+endif()
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC Python ${PYTHON_INC})
-       SET(PYTHONSRC
+if(WITH_PYTHON)
+       list(APPEND INC Python ${PYTHON_INC})
+       set(PYTHONSRC
                Python/AUD_PyAPI.cpp
 
                Python/AUD_PyAPI.h
        )
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
+       add_definitions(-DWITH_PYTHON)
+endif()
 
-SET(SRC
+set(SRC
        ${SRC}
        ${FFMPEGSRC}
        ${SNDFILESRC}
@@ -252,4 +252,4 @@ SET(SRC
        ${PYTHONSRC}
 )
 
-BLENDERLIB(bf_intern_audaspace "${SRC}" "${INC}")
+blenderlib(bf_intern_audaspace "${SRC}" "${INC}")
index ae5705052354b7d89738d78f3910c4a0f399bdfb..dcc152531c4c7c10fab8e2f015d2c7f9d76abca1 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC        
+set(INC        
        .
        ./intern
        ./extern
@@ -36,7 +36,7 @@ SET(INC
        ../../source/blender/makesdna
 )
 
-SET(SRC
+set(SRC
        intern/BOP_BBox.cpp
        intern/BOP_BSPNode.cpp
        intern/BOP_BSPTree.cpp
@@ -75,4 +75,4 @@ SET(SRC
        intern/BOP_Vertex.h
 )
 
-BLENDERLIB(bf_intern_bop "${SRC}" "${INC}")
+blenderlib(bf_intern_bop "${SRC}" "${INC}")
index 6799ba563e9475aaecbe153697d732027498af29..82abcf86a34d3065de23f56cdd554793f5fa1922 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ./intern
        ../container
        ../moto/include
        ../memutil
 )
 
-SET(SRC
+set(SRC
        intern/BSP_CSGMesh.cpp
        intern/BSP_MeshPrimitives.cpp
        intern/CSG_BooleanOps.cpp
@@ -43,4 +43,4 @@ SET(SRC
        intern/BSP_MeshPrimitives.h
 )
 
-BLENDERLIB(bf_intern_bsp "${SRC}" "${INC}")
+blenderlib(bf_intern_bsp "${SRC}" "${INC}")
index 207271fcb7c29e2ffbc9174dc599d8d211858508..e603e2701eb5f394175e7242608ceb2847cba38e 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
 )
 
-SET(SRC
+set(SRC
        intern/CTR_List.cpp
 
        CTR_List.h
@@ -38,4 +38,4 @@ SET(SRC
        CTR_UHeap.h
 )
 
-BLENDERLIB(bf_intern_ctr "${SRC}" "${INC}")
+blenderlib(bf_intern_ctr "${SRC}" "${INC}")
index 934624e1f0428cad29842a93bd0a12e7e4d04fb5..1499841503133f4e6a27d3bbede5af9ca4369cb1 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
        ../container
        ../memutil
        ../moto/include
 )
 
-SET(SRC
+set(SRC
        intern/LOD_EdgeCollapser.cpp
        intern/LOD_ExternNormalEditor.cpp
        intern/LOD_FaceNormalEditor.cpp
@@ -56,4 +56,4 @@ SET(SRC
        intern/LOD_QuadricEditor.h
 )
 
-BLENDERLIB(bf_intern_decimate "${SRC}" "${INC}")
+blenderlib(bf_intern_decimate "${SRC}" "${INC}")
index dcbc15f2cded0ba0c1ff15494f80b496ed4912c6..8d6f3fa0a9fa5e74fe9d740b4c0423649c20023f 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        extern
        ${PNG_INC}
        ${ZLIB_INC}
 )
 
-SET(SRC
+set(SRC
        intern/attributes.cpp
        intern/controlparticles.cpp
        intern/elbeem.cpp
@@ -86,13 +86,13 @@ SET(SRC
        intern/utilities.h
 )
 
-ADD_DEFINITIONS(-DNOGUI -DELBEEM_BLENDER=1)
-IF(WINDOWS)
-               ADD_DEFINITIONS(-DUSE_MSVC6FIXES)
-ENDIF(WINDOWS)
+add_definitions(-DNOGUI -DELBEEM_BLENDER=1)
+if(WINDOWS)
+               add_definitions(-DUSE_MSVC6FIXES)
+endif()
 
-IF(WITH_OPENMP)
-               ADD_DEFINITIONS(-DPARALLEL=1)
-ENDIF(WITH_OPENMP)
+if(WITH_OPENMP)
+               add_definitions(-DPARALLEL=1)
+endif()
 
-BLENDERLIB_NOLIST(bf_intern_elbeem "${SRC}" "${INC}")
+blenderlib_nolist(bf_intern_elbeem "${SRC}" "${INC}")
index fa0a3eea3936705a19f06a8f96bbe639ac537554..509741092c5815365a3b1b4a0ab964173fc003d6 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
        ../string
        ../../extern/glew/include
@@ -32,7 +32,7 @@ SET(INC
        ../../source/blender/makesdna
 )
 
-SET(SRC
+set(SRC
        intern/GHOST_Buttons.cpp
        intern/GHOST_CallbackEventConsumer.cpp
        intern/GHOST_C-api.cpp
@@ -82,9 +82,9 @@ SET(SRC
        intern/GHOST_WindowManager.h
 )
 
-IF(APPLE)
-       IF(WITH_COCOA)
-               LIST(APPEND SRC
+if(APPLE)
+       if(WITH_COCOA)
+               list(APPEND SRC
                        intern/GHOST_DisplayManagerCocoa.mm
                        intern/GHOST_SystemCocoa.mm
                        intern/GHOST_WindowCocoa.mm
@@ -93,8 +93,8 @@ IF(APPLE)
                        intern/GHOST_SystemCocoa.h
                        intern/GHOST_WindowCocoa.h
                )
-       ELSE(WITH_COCOA)
-               LIST(APPEND SRC
+       else()
+               list(APPEND SRC
                        intern/GHOST_DisplayManagerCarbon.cpp
                        intern/GHOST_SystemCarbon.cpp
                        intern/GHOST_WindowCarbon.cpp
@@ -103,16 +103,16 @@ IF(APPLE)
                        intern/GHOST_SystemCarbon.h
                        intern/GHOST_WindowCarbon.h
                )
-       ENDIF(WITH_COCOA)
+       endif()
 
-       IF(WITH_CODEC_QUICKTIME)
-               ADD_DEFINITIONS(-DWITH_QUICKTIME)
-       ENDIF(WITH_CODEC_QUICKTIME)
+       if(WITH_CODEC_QUICKTIME)
+               add_definitions(-DWITH_QUICKTIME)
+       endif()
 
-ELSEIF(UNIX)
-       LIST(APPEND INC ${X11_X11_INCLUDE_PATH})
+elseif(UNIX)
+       list(APPEND INC ${X11_X11_INCLUDE_PATH})
 
-       LIST(APPEND SRC
+       list(APPEND SRC
                intern/GHOST_DisplayManagerX11.cpp
                intern/GHOST_SystemX11.cpp
                intern/GHOST_WindowX11.cpp
@@ -122,16 +122,16 @@ ELSEIF(UNIX)
                intern/GHOST_WindowX11.h
        )
 
-       ADD_DEFINITIONS(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
+       add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
 
-ELSEIF(WIN32)
-       IF(MSVC)
-               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
-       ENDIF(MSVC)
+elseif(WIN32)
+       if(MSVC)
+               set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
+       endif()
 
-       LIST(APPEND INC ${WINTAB_INC})
+       list(APPEND INC ${WINTAB_INC})
 
-       LIST(APPEND SRC
+       list(APPEND SRC
                intern/GHOST_DisplayManagerWin32.cpp
                intern/GHOST_SystemWin32.cpp
                intern/GHOST_WindowWin32.cpp
@@ -142,7 +142,7 @@ ELSEIF(WIN32)
                intern/GHOST_SystemWin32.h
                intern/GHOST_WindowWin32.h
        )
-ENDIF(APPLE)
+endif()
 
-BLENDERLIB(bf_intern_ghost "${SRC}" "${INC}")
+blenderlib(bf_intern_ghost "${SRC}" "${INC}")
 
index a095f05065956c2ba5cc418157d96e1a1bec2852..4ae0b17575b6fe0a3e356e4e8e56ad2a190737c2 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC .)
+set(INC .)
 
-SET(SRC
+set(SRC
        ./intern/mallocn.c
 
        BLO_sys_types.h
        MEM_guardedalloc.h
 )
 
-IF(WIN32 AND NOT UNIX)
-       LIST(APPEND SRC
+if(WIN32 AND NOT UNIX)
+       list(APPEND SRC
                intern/mmap_win.c
 
                mmap_win.h
        )
-ENDIF(WIN32 AND NOT UNIX)
+endif()
 
-BLENDERLIB(bf_intern_guardedalloc "${SRC}" "${INC}")
+blenderlib(bf_intern_guardedalloc "${SRC}" "${INC}")
 
 # Override C++ alloc, optional.
-IF(WITH_CXX_GUARDEDALLOC)
-       SET(SRC
+if(WITH_CXX_GUARDEDALLOC)
+       set(SRC
                cpp/mallocn.cpp
        )
-       BLENDERLIB(bf_intern_guardedalloc_cpp "${SRC}" "${INC}")
-ENDIF(WITH_CXX_GUARDEDALLOC)
+       blenderlib(bf_intern_guardedalloc_cpp "${SRC}" "${INC}")
+endif()
index 94adf8c19df5fc5081eea9f5aa14b8c587e47207..e2cd389e84941c1b2a3cfaf72d7bd93daabdf31c 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        intern
        ../memutil
        ../moto/include
 )
 
-SET(SRC
+set(SRC
        intern/IK_QJacobian.cpp
        intern/IK_QJacobianSolver.cpp
        intern/IK_QSegment.cpp
@@ -70,4 +70,4 @@ SET(SRC
        intern/TNT/version.h
 )
 
-BLENDERLIB(bf_intern_ik "${SRC}" "${INC}")
+blenderlib(bf_intern_ik "${SRC}" "${INC}")
index b3e49cca2741cbe8a808d02b4a660e231d0c790d..3a42cd4a64fc7dd61a4679318569c906b0d2a64d 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../../extern/Eigen2
 )
 
-SET(SRC
+set(SRC
        Armature.cpp
        Cache.cpp
        ConstraintSet.cpp
@@ -222,4 +222,4 @@ SET(SRC
        ../../extern/Eigen2/Eigen/src/Sparse/UmfPackSupport.h
 )
 
-BLENDERLIB(bf_intern_itasc "${SRC}" "${INC}")
+blenderlib(bf_intern_itasc "${SRC}" "${INC}")
index 79a38a75304a88be4e2757a0078be0edf3f316c7..03b9192f71a54eaa279b9efb96853a1ed028c5df 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
        ..
 )
 
-SET(SRC
+set(SRC
        intern/MEM_CacheLimiterC-Api.cpp
        intern/MEM_RefCountedC-Api.cpp
 
@@ -43,4 +43,4 @@ SET(SRC
        MEM_SmartPtr.h
 )
 
-BLENDERLIB(bf_intern_memutil "${SRC}" "${INC}")
+blenderlib(bf_intern_memutil "${SRC}" "${INC}")
index 57baa5dfbb383b3a19336679a95b349a6cd7536b..54d59e4e32dc5b94c0a37a14f427a8727cf91a69 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        include
 )
 
-SET(SRC
+set(SRC
        intern/MT_Assert.cpp
        intern/MT_CmMatrix4x4.cpp
        intern/MT_Matrix3x3.cpp
@@ -67,4 +67,4 @@ SET(SRC
        include/NM_Scalar.h
 )
 
-BLENDERLIB(bf_intern_moto "${SRC}" "${INC}")
+blenderlib(bf_intern_moto "${SRC}" "${INC}")
index 46a22650f4b57c9d1952d8081a72fb251f109f2e..b7253a241fec9d9a62e2d0f3499a10da427ea516 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 # External project, better not fix warnings.
-REMOVE_STRICT_FLAGS()
+remove_strict_flags()
 
-SET(INC
+set(INC
        extern
        superlu
 )
 
-SET(SRC
+set(SRC
        intern/opennl.c
        superlu/colamd.c
        superlu/get_perm_c.c
@@ -75,4 +75,4 @@ SET(SRC
        superlu/util.h
 )
 
-BLENDERLIB(bf_intern_opennl "${SRC}" "${INC}")
+blenderlib(bf_intern_opennl "${SRC}" "${INC}")
index 1944ee51054d78c644951fd5ffa9509245a8749a..3505cd2c05d4396742577368d18d2a3c09dbc728 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        intern
        ../memutil
        ../../extern/bullet2/src
@@ -32,7 +32,7 @@ SET(INC
        ${ZLIB_INC}
 )
 
-SET(SRC
+set(SRC
        intern/EIGENVALUE_HELPER.cpp
        intern/FLUID_3D.cpp
        intern/FLUID_3D_SOLVERS.cpp
@@ -80,14 +80,14 @@ SET(SRC
        intern/tnt/tnt_version.h
 )
 
-IF(WITH_OPENMP)
-               ADD_DEFINITIONS(-DPARALLEL=1)
-ENDIF(WITH_OPENMP)
+if(WITH_OPENMP)
+               add_definitions(-DPARALLEL=1)
+endif()
 
-IF(WITH_FFTW3)
-       ADD_DEFINITIONS(-DFFTW3=1)
-       LIST(APPEND INC ${FFTW3_INC})
-ENDIF(WITH_FFTW3)
+if(WITH_FFTW3)
+       add_definitions(-DFFTW3=1)
+       list(APPEND INC ${FFTW3_INC})
+endif()
 
-BLENDERLIB(bf_intern_smoke "${SRC}" "${INC}")
+blenderlib(bf_intern_smoke "${SRC}" "${INC}")
 
index b7bb8d9c1064d9709746d9a87f44dee5c504c4e4..5aef036e55af32375e252e4a9e35bf0858612079 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
 )
 
-SET(SRC
+set(SRC
        intern/STR_String.cpp
 
        STR_HashedString.h
        STR_String.h
 )
 
-BLENDERLIB(bf_intern_string "${SRC}" "${INC}")
+blenderlib(bf_intern_string "${SRC}" "${INC}")
index a043dbad3b83ed1ebcd409eeb6aab2f57b961714..c13abb862b7e8f8368c8c7d6ba67adb83f05cd03 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-ADD_SUBDIRECTORY(blender)
+add_subdirectory(blender)
 
-IF(WITH_GAMEENGINE)
-       ADD_SUBDIRECTORY(kernel)
-       ADD_SUBDIRECTORY(gameengine)
-ENDIF(WITH_GAMEENGINE)
+if(WITH_GAMEENGINE)
+       add_subdirectory(kernel)
+       add_subdirectory(gameengine)
+endif()
        
-IF(WINDOWS)
-       ADD_SUBDIRECTORY(icons)
-ENDIF(WINDOWS)
+if(WINDOWS)
+       add_subdirectory(icons)
+endif()
index 470f395353c2a9363a8108910cc53266f9dc2077..c1696b142328ba05a22ea570044b7add0972fd71 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-ADD_SUBDIRECTORY(editors)
-ADD_SUBDIRECTORY(windowmanager)
-ADD_SUBDIRECTORY(blenkernel)
-ADD_SUBDIRECTORY(blenlib)
-ADD_SUBDIRECTORY(render)
-ADD_SUBDIRECTORY(blenfont)
-ADD_SUBDIRECTORY(blenloader)
-ADD_SUBDIRECTORY(readblenfile)
-ADD_SUBDIRECTORY(blenpluginapi)
-ADD_SUBDIRECTORY(ikplugin)
-ADD_SUBDIRECTORY(gpu)
-ADD_SUBDIRECTORY(imbuf)
-ADD_SUBDIRECTORY(avi)
-ADD_SUBDIRECTORY(nodes)
-ADD_SUBDIRECTORY(modifiers)
-ADD_SUBDIRECTORY(makesdna)
-ADD_SUBDIRECTORY(makesrna)
+add_subdirectory(editors)
+add_subdirectory(windowmanager)
+add_subdirectory(blenkernel)
+add_subdirectory(blenlib)
+add_subdirectory(render)
+add_subdirectory(blenfont)
+add_subdirectory(blenloader)
+add_subdirectory(readblenfile)
+add_subdirectory(blenpluginapi)
+add_subdirectory(ikplugin)
+add_subdirectory(gpu)
+add_subdirectory(imbuf)
+add_subdirectory(avi)
+add_subdirectory(nodes)
+add_subdirectory(modifiers)
+add_subdirectory(makesdna)
+add_subdirectory(makesrna)
 
-IF(WITH_IMAGE_OPENEXR)
-       ADD_SUBDIRECTORY(imbuf/intern/openexr)
-ENDIF(WITH_IMAGE_OPENEXR)
+if(WITH_IMAGE_OPENEXR)
+       add_subdirectory(imbuf/intern/openexr)
+endif()
 
-IF(WITH_IMAGE_DDS)
-       ADD_SUBDIRECTORY(imbuf/intern/dds)
-ENDIF(WITH_IMAGE_DDS)
+if(WITH_IMAGE_DDS)
+       add_subdirectory(imbuf/intern/dds)
+endif()
 
-IF(WITH_IMAGE_CINEON)
-       ADD_SUBDIRECTORY(imbuf/intern/cineon)
-ENDIF(WITH_IMAGE_CINEON)
+if(WITH_IMAGE_CINEON)
+       add_subdirectory(imbuf/intern/cineon)
+endif()
 
-IF(WITH_CODEC_QUICKTIME)
-       ADD_SUBDIRECTORY(quicktime)
-ENDIF(WITH_CODEC_QUICKTIME)
+if(WITH_CODEC_QUICKTIME)
+       add_subdirectory(quicktime)
+endif()
 
-IF(WITH_PYTHON)
-       ADD_SUBDIRECTORY(python)
-ENDIF(WITH_PYTHON)
+if(WITH_PYTHON)
+       add_subdirectory(python)
+endif()
 
-IF(WITH_OPENCOLLADA)
-  ADD_SUBDIRECTORY(collada)
-ENDIF(WITH_OPENCOLLADA)
+if(WITH_OPENCOLLADA)
+  add_subdirectory(collada)
+endif()
 
index 917b2a8e3b02807aa8c17cf3d3e3513352d23fc0..376c1147a71b208c2dbac54fb13d23b28c5b9804 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        .
        ../../../intern/guardedalloc
        ${JPEG_INC}
 )
 
-SET(SRC
+set(SRC
        intern/avi.c
        intern/avirgb.c
        intern/codecs.c
@@ -47,4 +47,4 @@ SET(SRC
        intern/rgb32.h
 )
 
-BLENDERLIB(bf_avi "${SRC}" "${INC}")
+blenderlib(bf_avi "${SRC}" "${INC}")
index 202a8de687fc13dcc3a062db048a35017c240b90..1dc546bd6d5cddfcd979f2150bb95fc098a95c3f 100644 (file)
@@ -22,7 +22,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
        ../blenlib
        ../makesdna
@@ -33,7 +33,7 @@ SET(INC
        ${FREETYPE_INCLUDE_DIRS}
 )
 
-SET(SRC
+set(SRC
        intern/blf.c
        intern/blf_dir.c
        intern/blf_font.c
@@ -47,14 +47,14 @@ SET(SRC
        intern/blf_internal_types.h
 )
 
-IF(WITH_INTERNATIONAL)
-       LIST(APPEND INC ${GETTEXT_INC})
-       ADD_DEFINITIONS(-DINTERNATIONAL)
-ENDIF(WITH_INTERNATIONAL)
+if(WITH_INTERNATIONAL)
+       list(APPEND INC ${GETTEXT_INC})
+       add_definitions(-DINTERNATIONAL)
+endif()
 
-IF(WIN32 AND NOT UNIX)
-       ADD_DEFINITIONS(-DUSE_GETTEXT_DLL)
-ENDIF(WIN32 AND NOT UNIX)
+if(WIN32 AND NOT UNIX)
+       add_definitions(-DUSE_GETTEXT_DLL)
+endif()
 
-BLENDERLIB(bf_blenfont "${SRC}" "${INC}")
+blenderlib(bf_blenfont "${SRC}" "${INC}")
 
index 583f0327e0730b5c7ed87f2d3bf4d18d1478358b..feeda03773b88a6be78c70ca50a2a851ead2d744 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        .
        ../avi
        ../blenlib
@@ -52,7 +52,7 @@ SET(INC
        ${ZLIB_INC}
 )
 
-SET(SRC
+set(SRC
        intern/BME_Customdata.c
        intern/BME_conversions.c
        intern/BME_eulers.c
@@ -225,81 +225,81 @@ SET(SRC
        nla_private.h
 )
 
-ADD_DEFINITIONS(-DGLEW_STATIC)
+add_definitions(-DGLEW_STATIC)
 
-IF(WITH_BULLET)
-       LIST(APPEND INC ../../../extern/bullet2/src)
-       ADD_DEFINITIONS(-DUSE_BULLET)
-ENDIF(WITH_BULLET)
+if(WITH_BULLET)
+       list(APPEND INC ../../../extern/bullet2/src)
+       add_definitions(-DUSE_BULLET)
+endif()
 
-IF(WITH_IMAGE_OPENEXR)
-       ADD_DEFINITIONS(-DWITH_OPENEXR)
-ENDIF(WITH_IMAGE_OPENEXR)
+if(WITH_IMAGE_OPENEXR)
+       add_definitions(-DWITH_OPENEXR)
+endif()
 
-IF(WITH_IMAGE_TIFF)
-       ADD_DEFINITIONS(-DWITH_TIFF)
-ENDIF(WITH_IMAGE_TIFF)
+if(WITH_IMAGE_TIFF)
+       add_definitions(-DWITH_TIFF)
+endif()
 
-IF(WITH_IMAGE_OPENJPEG)
-       ADD_DEFINITIONS(-DWITH_OPENJPEG)
-ENDIF(WITH_IMAGE_OPENJPEG)
+if(WITH_IMAGE_OPENJPEG)
+       add_definitions(-DWITH_OPENJPEG)
+endif()
 
-IF(WITH_IMAGE_DDS)
-       ADD_DEFINITIONS(-DWITH_DDS)
-ENDIF(WITH_IMAGE_DDS)
+if(WITH_IMAGE_DDS)
+       add_definitions(-DWITH_DDS)
+endif()
 
-IF(WITH_IMAGE_CINEON)
-       ADD_DEFINITIONS(-DWITH_CINEON)
-ENDIF(WITH_IMAGE_CINEON)
+if(WITH_IMAGE_CINEON)
+       add_definitions(-DWITH_CINEON)
+endif()
 
-IF(WITH_IMAGE_HDR)
-       ADD_DEFINITIONS(-DWITH_HDR)
-ENDIF(WITH_IMAGE_HDR)
+if(WITH_IMAGE_HDR)
+       add_definitions(-DWITH_HDR)
+endif()
 
-IF(WITH_CODEC_QUICKTIME)
-       LIST(APPEND INC ../quicktime ${QUICKTIME_INC})
-       ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_CODEC_QUICKTIME)
+if(WITH_CODEC_QUICKTIME)
+       list(APPEND INC ../quicktime ${QUICKTIME_INC})
+       add_definitions(-DWITH_QUICKTIME)
+endif()
 
-IF(WITH_CODEC_FFMPEG)
-       LIST(APPEND INC ${FFMPEG_INC})
-       ADD_DEFINITIONS(-DWITH_FFMPEG)
-ENDIF(WITH_CODEC_FFMPEG)
+if(WITH_CODEC_FFMPEG)
+       list(APPEND INC ${FFMPEG_INC})
+       add_definitions(-DWITH_FFMPEG)
+endif()
 
-IF(WITH_LCMS)
-       LIST(APPEND INC ${LCMS_INCLUDE_DIR})
-       ADD_DEFINITIONS(-DWITH_LCMS)
-ENDIF(WITH_LCMS)
+if(WITH_LCMS)
+       list(APPEND INC ${LCMS_INCLUDE_DIR})
+       add_definitions(-DWITH_LCMS)
+endif()
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ../python ${PYTHON_INC})
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
+if(WITH_PYTHON)
+       list(APPEND INC ../python ${PYTHON_INC})
+       add_definitions(-DWITH_PYTHON)
+endif()
 
-IF(WITH_OPENMP)
-       ADD_DEFINITIONS(-DPARALLEL=1)
-ENDIF(WITH_OPENMP)
+if(WITH_OPENMP)
+       add_definitions(-DPARALLEL=1)
+endif()
 
-IF(NOT WITH_MOD_FLUID)
-       ADD_DEFINITIONS(-DDISABLE_ELBEEM)
-ENDIF(NOT WITH_MOD_FLUID)
+if(NOT WITH_MOD_FLUID)
+       add_definitions(-DDISABLE_ELBEEM)
+endif()
 
-IF(WITH_JACK)
-       ADD_DEFINITIONS(-DWITH_JACK)
-ENDIF(WITH_JACK)
+if(WITH_JACK)
+       add_definitions(-DWITH_JACK)
+endif()
 
-IF(WITH_LZO)
-       LIST(APPEND INC ../../../extern/lzo/minilzo)
-       ADD_DEFINITIONS(-DWITH_LZO)
-ENDIF(WITH_LZO)
+if(WITH_LZO)
+       list(APPEND INC ../../../extern/lzo/minilzo)
+       add_definitions(-DWITH_LZO)
+endif()
 
-IF(WITH_LZMA)
-       LIST(APPEND INC ../../../extern/lzma)
-       ADD_DEFINITIONS(-DWITH_LZMA)
-ENDIF(WITH_LZMA)
+if(WITH_LZMA)
+       list(APPEND INC ../../../extern/lzma)
+       add_definitions(-DWITH_LZMA)
+endif()
 
-IF(MSVC)
-    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
-ENDIF(MSVC)
+if(MSVC)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
+endif()
 
-BLENDERLIB(bf_blenkernel "${SRC}" "${INC}")
+blenderlib(bf_blenkernel "${SRC}" "${INC}")
index a30cbebb539c5eb6149dd463de8ee7deea26bc62..a827c7879e1afe55e8e4788d89688ddb4d132b40 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        .
        ../makesdna
        ../blenkernel
@@ -35,7 +35,7 @@ SET(INC
        ${FREETYPE_INCLUDE_DIRS}
 )
 
-SET(SRC
+set(SRC
        intern/BLI_args.c
        intern/BLI_dynstr.c
        intern/BLI_ghash.c
@@ -131,12 +131,12 @@ SET(SRC
        intern/dynamiclist.h
 )
 
-IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-       LIST(APPEND INC "${BINRELOC_INC}")
-ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+       list(APPEND INC "${BINRELOC_INC}")
+endif()
 
-IF(WITH_OPENMP)
-       ADD_DEFINITIONS(-DPARALLEL=1)
-ENDIF(WITH_OPENMP)
+if(WITH_OPENMP)
+       add_definitions(-DPARALLEL=1)
+endif()
 
-BLENDERLIB(bf_blenlib "${SRC}" "${INC}")
+blenderlib(bf_blenlib "${SRC}" "${INC}")
index b84ee1df08dea74f1d96f7747993cdc533135ca8..2d80d565af167b468a97c333d04ac75257b31b3d 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        .
        ../blenlib
        ../blenkernel
@@ -36,7 +36,7 @@ SET(INC
        ${ZLIB_INC}
 )
 
-SET(SRC
+set(SRC
        intern/readblenentry.c
        intern/readfile.c
        intern/undofile.c
@@ -50,4 +50,4 @@ SET(SRC
        intern/readfile.h
 )
 
-BLENDERLIB(bf_blenloader "${SRC}" "${INC}")
+blenderlib(bf_blenloader "${SRC}" "${INC}")
index 0e2e8526747494b09f61fe5ff1a1a99aaabc3e7b..8005afc56152cb52849bcb598b002dde80c34c83 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        .
        ..
        ../blenlib
@@ -33,7 +33,7 @@ SET(INC
        ../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        intern/pluginapi.c
 
        documentation.h
@@ -44,9 +44,9 @@ SET(SRC
        util.h
 )
 
-IF(WITH_CODEC_QUICKTIME)
-       LIST(APPEND INC ${QUICKTIME_INC})
-       ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_CODEC_QUICKTIME)
+if(WITH_CODEC_QUICKTIME)
+       list(APPEND INC ${QUICKTIME_INC})
+       add_definitions(-DWITH_QUICKTIME)
+endif()
 
-BLENDERLIB(bf_blenpluginapi "${SRC}" "${INC}")
+blenderlib(bf_blenpluginapi "${SRC}" "${INC}")
index 9d33885eb59c3f856b4b8400618660ad8f8c9b0f..e0d53d2c2e46b6078a1b35ccc66192da922c3ee2 100644 (file)
@@ -24,9 +24,9 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-REMOVE_STRICT_FLAGS()
+remove_strict_flags()
 
-SET(INC
+set(INC
        .
        ../blenlib
        ../blenkernel
@@ -37,23 +37,23 @@ SET(INC
        ../../../intern/guardedalloc
 )
 
-IF(APPLE)
-       LIST(APPEND INC
+if(APPLE)
+       list(APPEND INC
                ${OPENCOLLADA_INC}/COLLADAStreamWriter
                ${OPENCOLLADA_INC}/COLLADABaseUtils
                ${OPENCOLLADA_INC}/COLLADAFramework
                ${OPENCOLLADA_INC}/COLLADASaxFrameworkLoader 
        )
-ELSE(APPLE)
-       LIST(APPEND INC
+else()
+       list(APPEND INC
                ${OPENCOLLADA_INC}/COLLADAStreamWriter/include
                ${OPENCOLLADA_INC}/COLLADABaseUtils/include
                ${OPENCOLLADA_INC}/COLLADAFramework/include
                ${OPENCOLLADA_INC}/COLLADASaxFrameworkLoader/include 
        )
-ENDIF(APPLE)
+endif()
 
-SET(SRC
+set(SRC
        AnimationImporter.cpp
        ArmatureExporter.cpp
        ArmatureImporter.cpp
@@ -95,8 +95,8 @@ SET(SRC
        collada_utils.h
 )
 
-IF(WITH_BUILDINFO)
-       ADD_DEFINITIONS(-DNAN_BUILDINFO)
-ENDIF(WITH_BUILDINFO)
+if(WITH_BUILDINFO)
+       add_definitions(-DNAN_BUILDINFO)
+endif()
 
-BLENDERLIB(bf_collada "${SRC}" "${INC}")
+blenderlib(bf_collada "${SRC}" "${INC}")
index 5d3cee9a7a59a27fc93ccd89ccbf1c98f38f6b0e..651cb66833da6b1abb3a5d338c9adaa01ebecfa8 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-ADD_SUBDIRECTORY(animation)
-ADD_SUBDIRECTORY(armature)
-ADD_SUBDIRECTORY(curve)
-ADD_SUBDIRECTORY(datafiles)
-ADD_SUBDIRECTORY(gpencil)
-ADD_SUBDIRECTORY(interface)
-ADD_SUBDIRECTORY(mesh)
-ADD_SUBDIRECTORY(metaball)
-ADD_SUBDIRECTORY(object)
-ADD_SUBDIRECTORY(physics)
-ADD_SUBDIRECTORY(render)
-ADD_SUBDIRECTORY(screen)
-ADD_SUBDIRECTORY(sculpt_paint)
-ADD_SUBDIRECTORY(sound)
-ADD_SUBDIRECTORY(space_action)
-ADD_SUBDIRECTORY(space_api)
-ADD_SUBDIRECTORY(space_buttons)
-ADD_SUBDIRECTORY(space_console)
-ADD_SUBDIRECTORY(space_file)
-ADD_SUBDIRECTORY(space_graph)
-ADD_SUBDIRECTORY(space_image)
-ADD_SUBDIRECTORY(space_info)
-ADD_SUBDIRECTORY(space_logic)
-ADD_SUBDIRECTORY(space_nla)
-ADD_SUBDIRECTORY(space_node)
-ADD_SUBDIRECTORY(space_outliner)
-ADD_SUBDIRECTORY(space_script)
-ADD_SUBDIRECTORY(space_sequencer)
-ADD_SUBDIRECTORY(space_sound)
-ADD_SUBDIRECTORY(space_text)
-ADD_SUBDIRECTORY(space_time)
-ADD_SUBDIRECTORY(space_userpref)
-ADD_SUBDIRECTORY(space_view3d)
-ADD_SUBDIRECTORY(transform)
-ADD_SUBDIRECTORY(util)
-ADD_SUBDIRECTORY(uvedit)
+add_subdirectory(animation)
+add_subdirectory(armature)
+add_subdirectory(curve)
+add_subdirectory(datafiles)
+add_subdirectory(gpencil)
+add_subdirectory(interface)
+add_subdirectory(mesh)
+add_subdirectory(metaball)
+add_subdirectory(object)
+add_subdirectory(physics)
+add_subdirectory(render)
+add_subdirectory(screen)
+add_subdirectory(sculpt_paint)
+add_subdirectory(sound)
+add_subdirectory(space_action)
+add_subdirectory(space_api)
+add_subdirectory(space_buttons)
+add_subdirectory(space_console)
+add_subdirectory(space_file)
+add_subdirectory(space_graph)
+add_subdirectory(space_image)
+add_subdirectory(space_info)
+add_subdirectory(space_logic)
+add_subdirectory(space_nla)
+add_subdirectory(space_node)
+add_subdirectory(space_outliner)
+add_subdirectory(space_script)
+add_subdirectory(space_sequencer)
+add_subdirectory(space_sound)
+add_subdirectory(space_text)
+add_subdirectory(space_time)
+add_subdirectory(space_userpref)
+add_subdirectory(space_view3d)
+add_subdirectory(transform)
+add_subdirectory(util)
+add_subdirectory(uvedit)
index 1e0a42fcd4e4ce0e27ebb7f9e359f22732482bb9..64677282bf52cfd3ad90314fb5168f5d8bf27323 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -29,7 +29,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        anim_channels_defines.c
        anim_channels_edit.c
        anim_deps.c
@@ -49,4 +49,4 @@ SET(SRC
        anim_intern.h
 )
 
-BLENDERLIB(bf_editor_animation "${SRC}" "${INC}")
+blenderlib(bf_editor_animation "${SRC}" "${INC}")
index e4243f77074df8bb579479d068429ccda38de80a..8db4d3b2d73d610f556be9a76bf15127dedd6e5c 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -30,7 +30,7 @@ SET(INC
        ../../../../intern/opennl/extern
 )
 
-SET(SRC
+set(SRC
        armature_ops.c
        editarmature.c
        editarmature_generate.c
@@ -50,4 +50,4 @@ SET(SRC
        reeb.h
 )
 
-BLENDERLIB(bf_editor_armature "${SRC}" "${INC}")
+blenderlib(bf_editor_armature "${SRC}" "${INC}")
index 577a144805f6cb79090e4d33f32bc2cfc3eedaed..c828ed874972c8aaf60fa8d4c26e81c843ceba62 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -29,7 +29,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        curve_ops.c
        editcurve.c
        editfont.c
@@ -38,4 +38,4 @@ SET(SRC
        curve_intern.h
 )
 
-BLENDERLIB(bf_editor_curve "${SRC}" "${INC}")
+blenderlib(bf_editor_curve "${SRC}" "${INC}")
index 7683db8ab7a19029e968f4bd56ac18e628417c66..df0c43311951dd3a4e30378143cb692797d31130 100644 (file)
@@ -19,9 +19,9 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC "")
+set(INC "")
 
-SET(SRC
+set(SRC
        Bfont.c
        add.png.c
        bfont.ttf.c
@@ -60,4 +60,4 @@ SET(SRC
        vertexdraw.png.c
 )
 
-BLENDERLIB(bf_editor_datafiles "${SRC}" "${INC}")
+blenderlib(bf_editor_datafiles "${SRC}" "${INC}")
index 8e884149bb8e6cc49c5e4fd56d8dc1d6a46e1bdd..544ee83b83d38708f0af65623b304ff0e5001b6d 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -30,7 +30,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        drawgpencil.c
        editaction_gpencil.c
        gpencil_buttons.c
@@ -41,4 +41,4 @@ SET(SRC
        gpencil_intern.h
 )
 
-BLENDERLIB(bf_editor_gpencil "${SRC}" "${INC}")
+blenderlib(bf_editor_gpencil "${SRC}" "${INC}")
index 80eddcfc08d3a1f11cd9aeffe2eb93a5a91d944b..79fd3cc3b8e330fb658174b2c24a1b7e8f3d4864 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenfont
        ../../blenkernel
@@ -33,7 +33,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        interface.c
        interface_anim.c
        interface_draw.c
@@ -54,12 +54,12 @@ SET(SRC
        interface_intern.h
 )
 
-IF(WITH_INTERNATIONAL)
-       ADD_DEFINITIONS(-DINTERNATIONAL)
-ENDIF(WITH_INTERNATIONAL)
+if(WITH_INTERNATIONAL)
+       add_definitions(-DINTERNATIONAL)
+endif()
 
-IF(WITH_PYTHON)
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
+if(WITH_PYTHON)
+       add_definitions(-DWITH_PYTHON)
+endif()
 
-BLENDERLIB(bf_editor_interface "${SRC}" "${INC}")
+blenderlib(bf_editor_interface "${SRC}" "${INC}")
index 977cbb79b7fc228701696c8ead11f8a9cd6a035d..7a15d3a9edb8b5b9154e0ec85e8eea1f5102e6ee 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -31,7 +31,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        editface.c
        editmesh.c
        editmesh_add.c
@@ -47,4 +47,4 @@ SET(SRC
        mesh_intern.h
 )
 
-BLENDERLIB(bf_editor_mesh "${SRC}" "${INC}")
+blenderlib(bf_editor_mesh "${SRC}" "${INC}")
index 82e287c3e69ac26291d7c715be127046e0cf92bb..f6a58f7812e22df8c7472a49f6cd7782fd606053 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -30,11 +30,11 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        mball_edit.c
        mball_ops.c
 
        mball_intern.h
 )
 
-BLENDERLIB(bf_editor_metaball "${SRC}" "${INC}")
+blenderlib(bf_editor_metaball "${SRC}" "${INC}")
index 6fc06ab20c6f6cb7ca0898ad746c4936f752913a..8aad3a1f6dbdf11272c12860a42870bda5e1db36 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -34,7 +34,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        object_add.c
        object_bake.c
        object_constraint.c
@@ -53,8 +53,8 @@ SET(SRC
        object_intern.h
 )
 
-IF(WITH_PYTHON)
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
+if(WITH_PYTHON)
+       add_definitions(-DWITH_PYTHON)
+endif()
 
-BLENDERLIB(bf_editor_object "${SRC}" "${INC}")
+blenderlib(bf_editor_object "${SRC}" "${INC}")
index da7247e264ae4877d2fccb1756fa4fb0e573c5bf..911d1e904584a9d788437050549306e37e103bd8 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -30,7 +30,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        particle_boids.c
        particle_edit.c
        particle_object.c
@@ -41,12 +41,12 @@ SET(SRC
        physics_intern.h
 )
 
-IF(NOT WITH_MOD_FLUID)
-       ADD_DEFINITIONS(-DDISABLE_ELBEEM)
-ENDIF(NOT WITH_MOD_FLUID)
+if(NOT WITH_MOD_FLUID)
+       add_definitions(-DDISABLE_ELBEEM)
+endif()
 
-IF(WITH_OPENMP)
-               ADD_DEFINITIONS(-DPARALLEL=1)
-ENDIF(WITH_OPENMP)
+if(WITH_OPENMP)
+               add_definitions(-DPARALLEL=1)
+endif()
 
-BLENDERLIB(bf_editor_physics "${SRC}" "${INC}")
+blenderlib(bf_editor_physics "${SRC}" "${INC}")
index 670fa55d998d5c622fd63a31c1b772264f95e350..2c3f4a78c8f684a652ea058591e2572e399e3c4b 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenfont
        ../../blenkernel
@@ -35,7 +35,7 @@ SET(INC
        ../../../../extern/glew/include
 )
 
-SET(SRC
+set(SRC
        render_internal.c
        render_opengl.c
        render_ops.c
@@ -45,13 +45,13 @@ SET(SRC
        render_intern.h
 )
 
-IF(WITH_CODEC_QUICKTIME)
-       LIST(APPEND INC ../../quicktime ${QUICKTIME_INC})
-       ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_CODEC_QUICKTIME)
+if(WITH_CODEC_QUICKTIME)
+       list(APPEND INC ../../quicktime ${QUICKTIME_INC})
+       add_definitions(-DWITH_QUICKTIME)
+endif()
 
-IF(WITH_OPENMP)
-       ADD_DEFINITIONS(-DPARALLEL=1)
-ENDIF(WITH_OPENMP)
+if(WITH_OPENMP)
+       add_definitions(-DPARALLEL=1)
+endif()
 
-BLENDERLIB(bf_editor_render "${SRC}" "${INC}")
+blenderlib(bf_editor_render "${SRC}" "${INC}")
index a7483c60c85e48d0a849b949b2ea0f22f38477a3..0f81d4fb3829f3ee9997e0bd332a922c51025028 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenfont
        ../../blenkernel
@@ -31,7 +31,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        area.c
        glutil.c
        screen_context.c
@@ -42,4 +42,4 @@ SET(SRC
        screen_intern.h
 )
 
-BLENDERLIB(bf_editor_screen "${SRC}" "${INC}")
+blenderlib(bf_editor_screen "${SRC}" "${INC}")
index 5f5211368f20c7985867171b9985dc1d09d11cc2..bb6901288ffee3dc3b81399624091f12b7fb2630 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../imbuf
@@ -32,7 +32,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        paint_image.c
        paint_ops.c
        paint_stroke.c
@@ -46,4 +46,4 @@ SET(SRC
        sculpt_intern.h
 )
 
-BLENDERLIB(bf_editor_sculpt_paint "${SRC}" "${INC}")
+blenderlib(bf_editor_sculpt_paint "${SRC}" "${INC}")
index d1314f649ee3490c01c6d45e60d1d9c085b8b3f0..927632f5a98eeb111637f0946f3b9b68d98ddd46 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -30,10 +30,10 @@ SET(INC
        ../../../../intern/audaspace/intern
 )
 
-SET(SRC
+set(SRC
        sound_ops.c
 
        sound_intern.h
 )
 
-BLENDERLIB(bf_editor_sound "${SRC}" "${INC}")
+blenderlib(bf_editor_sound "${SRC}" "${INC}")
index 44981a3177b0e5553f389df0dd80a8bd6281952e..5bfd01d461c1b2b0f30b09a5723133f4d62a54b7 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -29,7 +29,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        action_draw.c
        action_edit.c
        action_ops.c
@@ -39,4 +39,4 @@ SET(SRC
        action_intern.h
 )
 
-BLENDERLIB(bf_editor_space_action "${SRC}" "${INC}")
+blenderlib(bf_editor_space_action "${SRC}" "${INC}")
index 5436d8207c55021a01bd69fe887c03dbf7e61b3a..fc20f8f98952d5962068ebd32cfd2822089865d0 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -29,9 +29,9 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        space.c
        spacetypes.c
 )
 
-BLENDERLIB(bf_editor_space_api "${SRC}" "${INC}")
+blenderlib(bf_editor_space_api "${SRC}" "${INC}")
index 47152bea9f0b4ef8d04d970db56c1354c3734655..767536e38146ac7cb63f3a0891d0d5db273db660 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -29,7 +29,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        buttons_context.c
        buttons_header.c
        buttons_ops.c
@@ -38,4 +38,4 @@ SET(SRC
        buttons_intern.h
 )
 
-BLENDERLIB(bf_editor_space_buttons "${SRC}" "${INC}")
+blenderlib(bf_editor_space_buttons "${SRC}" "${INC}")
index 75eb20dfdc13c5c09a7ce0f48edcb30786b55996..fe475b88092039ab00153e3430ffe4e98481e088 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenfont
        ../../blenkernel
@@ -31,7 +31,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        console_draw.c
        console_ops.c
        space_console.c
@@ -39,8 +39,8 @@ SET(SRC
        console_intern.h
 )
 
-IF(WITH_PYTHON)
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
+if(WITH_PYTHON)
+       add_definitions(-DWITH_PYTHON)
+endif()
 
-BLENDERLIB(bf_editor_space_console "${SRC}" "${INC}")
+blenderlib(bf_editor_space_console "${SRC}" "${INC}")
index d4e5d599c523662c2932588188e1448884c2e9ad..b4a70917ca80db0872583cf8c09599021e5c2d6b 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenfont
        ../../blenkernel
@@ -33,7 +33,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        file_draw.c
        file_ops.c
        file_panels.c
@@ -47,28 +47,28 @@ SET(SRC
        fsmenu.h
 )
 
-IF(WITH_IMAGE_OPENEXR)
-       ADD_DEFINITIONS(-DWITH_OPENEXR)
-ENDIF(WITH_IMAGE_OPENEXR)
+if(WITH_IMAGE_OPENEXR)
+       add_definitions(-DWITH_OPENEXR)
+endif()
 
-IF(WITH_IMAGE_TIFF)
-       ADD_DEFINITIONS(-DWITH_TIFF)
-ENDIF(WITH_IMAGE_TIFF)
+if(WITH_IMAGE_TIFF)
+       add_definitions(-DWITH_TIFF)
+endif()
 
-IF(WITH_IMAGE_OPENJPEG)
-       ADD_DEFINITIONS(-DWITH_OPENJPEG)
-ENDIF(WITH_IMAGE_OPENJPEG)
+if(WITH_IMAGE_OPENJPEG)
+       add_definitions(-DWITH_OPENJPEG)
+endif()
 
-IF(WITH_IMAGE_DDS)
-       ADD_DEFINITIONS(-DWITH_DDS)
-ENDIF(WITH_IMAGE_DDS)
+if(WITH_IMAGE_DDS)
+       add_definitions(-DWITH_DDS)
+endif()
 
-IF(WITH_IMAGE_CINEON)
-       ADD_DEFINITIONS(-DWITH_CINEON)
-ENDIF(WITH_IMAGE_CINEON)
+if(WITH_IMAGE_CINEON)
+       add_definitions(-DWITH_CINEON)
+endif()
 
-IF(WITH_IMAGE_HDR)
-       ADD_DEFINITIONS(-DWITH_HDR)
-ENDIF(WITH_IMAGE_HDR)
+if(WITH_IMAGE_HDR)
+       add_definitions(-DWITH_HDR)
+endif()
 
-BLENDERLIB(bf_editor_space_file "${SRC}" "${INC}")
+blenderlib(bf_editor_space_file "${SRC}" "${INC}")
index 2c1bdbed2108845a25190655e4798ba30f02711a..248bc9c76c5cf5dff61f3be8bdad2c038bb751d2 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -30,7 +30,7 @@ SET(INC
        ../../../../intern/audaspace/intern
 )
 
-SET(SRC
+set(SRC
        graph_buttons.c
        graph_draw.c
        graph_edit.c
@@ -42,4 +42,4 @@ SET(SRC
        graph_intern.h
 )
 
-BLENDERLIB(bf_editor_space_graph "${SRC}" "${INC}")
+blenderlib(bf_editor_space_graph "${SRC}" "${INC}")
index 67639539c4013ddc18a4ddcd70423f46c15c5b46..31c2e9568ae80fc8ed62cb98471f0a29e3858e7f 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenfont
        ../../blenkernel
@@ -32,7 +32,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        image_buttons.c
        image_draw.c
        image_header.c
@@ -43,25 +43,25 @@ SET(SRC
        image_intern.h
 )
 
-IF(WITH_IMAGE_OPENJPEG)
-       ADD_DEFINITIONS(-DWITH_OPENJPEG)
-ENDIF(WITH_IMAGE_OPENJPEG)
+if(WITH_IMAGE_OPENJPEG)
+       add_definitions(-DWITH_OPENJPEG)
+endif()
 
-IF(WITH_IMAGE_OPENEXR)
-       ADD_DEFINITIONS(-DWITH_OPENEXR)
-ENDIF(WITH_IMAGE_OPENEXR)
+if(WITH_IMAGE_OPENEXR)
+       add_definitions(-DWITH_OPENEXR)
+endif()
 
-IF(WITH_IMAGE_TIFF)
-       ADD_DEFINITIONS(-DWITH_TIFF)
-ENDIF(WITH_IMAGE_TIFF)
+if(WITH_IMAGE_TIFF)
+       add_definitions(-DWITH_TIFF)
+endif()
 
-IF(WITH_IMAGE_CINEON)
-       ADD_DEFINITIONS(-DWITH_CINEON)
-ENDIF(WITH_IMAGE_CINEON)
+if(WITH_IMAGE_CINEON)
+       add_definitions(-DWITH_CINEON)
+endif()
 
-IF(WITH_LCMS)
-       SET(INC ${INC} ${LCMS_INCLUDE_DIR})
-       ADD_DEFINITIONS(-DWITH_LCMS)
-ENDIF(WITH_LCMS)
+if(WITH_LCMS)
+       set(INC ${INC} ${LCMS_INCLUDE_DIR})
+       add_definitions(-DWITH_LCMS)
+endif()
 
-BLENDERLIB(bf_editor_space_image "${SRC}" "${INC}")
+blenderlib(bf_editor_space_image "${SRC}" "${INC}")
index 4592a07ed85c2700ca29108000a84e613dede8a2..69748041996b5c9046dece3b3320a32f5650f9b8 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenfont
        ../../blenkernel
@@ -31,7 +31,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        info_ops.c
        info_stats.c
        info_draw.c
@@ -43,4 +43,4 @@ SET(SRC
        textview.h
 )
 
-BLENDERLIB(bf_editor_space_info "${SRC}" "${INC}")
+blenderlib(bf_editor_space_info "${SRC}" "${INC}")
index 7fcacb393af5353270dcc6a9ace986a37ac0253f..18e546a61f59a791699b21daa7448fc64943fa4d 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -30,7 +30,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        logic_buttons.c
        logic_ops.c
        logic_window.c
@@ -39,8 +39,8 @@ SET(SRC
        logic_intern.h
 )
 
-IF(WITH_GAMEENGINE)
-       ADD_DEFINITIONS(-DWITH_GAMEENGINE)
-ENDIF(WITH_GAMEENGINE)
+if(WITH_GAMEENGINE)
+       add_definitions(-DWITH_GAMEENGINE)
+endif()
 
-BLENDERLIB(bf_editor_space_logic "${SRC}" "${INC}")
+blenderlib(bf_editor_space_logic "${SRC}" "${INC}")
index 82d32d8044249ff0f37142524cbc9812f0d3f02d..dcb09a1a654e3e736fdd835f01927dd059f18d77 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -29,7 +29,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        nla_buttons.c
        nla_channels.c
        nla_draw.c
@@ -41,4 +41,4 @@ SET(SRC
        nla_intern.h
 )
 
-BLENDERLIB(bf_editor_space_nla "${SRC}" "${INC}")
+blenderlib(bf_editor_space_nla "${SRC}" "${INC}")
index 1513f688e2c9999db0be0abd92efb2f42d14b99f..45b4341c99dd5e45e7b6cbd3ff528a5940849834 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -33,7 +33,7 @@ SET(INC
        ../../../../intern/opennl/extern
 )
 
-SET(SRC
+set(SRC
        drawnode.c
        node_buttons.c
        node_draw.c
@@ -47,4 +47,4 @@ SET(SRC
        node_intern.h
 )
 
-BLENDERLIB(bf_editor_space_node "${SRC}" "${INC}")
+blenderlib(bf_editor_space_node "${SRC}" "${INC}")
index b9383ef638825a6dab079182c5646f5735571898..dc8e944dbcaea7f64ef16eff350e189e8884fe91 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -31,7 +31,7 @@ SET(INC
        ../../../../intern/opennl/extern
 )
 
-SET(SRC
+set(SRC
        outliner.c
        outliner_ops.c
        space_outliner.c
@@ -39,4 +39,4 @@ SET(SRC
        outliner_intern.h
 )
 
-BLENDERLIB(bf_editor_space_outliner "${SRC}" "${INC}")
+blenderlib(bf_editor_space_outliner "${SRC}" "${INC}")
index da4f90a103f77c566c01c78c1bbba1e8dbba6434..849c4ee4dcd314269382426f1cbe40794c6e761b 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -29,7 +29,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        script_edit.c
        script_header.c
        script_ops.c
@@ -38,9 +38,9 @@ SET(SRC
        script_intern.h
 )
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ${PYTHON_INC} ../../python)
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
+if(WITH_PYTHON)
+       list(APPEND INC ${PYTHON_INC} ../../python)
+       add_definitions(-DWITH_PYTHON)
+endif()
 
-BLENDERLIB(bf_editor_space_script "${SRC}" "${INC}")
+blenderlib(bf_editor_space_script "${SRC}" "${INC}")
index 0fe9cc3580ba181aa337ff96b80669f4ce405be3..721d19a37cf3a519ffb8638982b52b833fed875e 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -31,7 +31,7 @@ SET(INC
        ../../../../intern/audaspace/intern
 )
 
-SET(SRC
+set(SRC
        sequencer_add.c
        sequencer_buttons.c
        sequencer_draw.c
@@ -44,4 +44,4 @@ SET(SRC
        sequencer_intern.h
 )
 
-BLENDERLIB(bf_editor_space_sequencer "${SRC}" "${INC}")
+blenderlib(bf_editor_space_sequencer "${SRC}" "${INC}")
index 90a522b8f3f7e94172be25b33a879aa05b86dbd0..bd60c0feb01fd82b4fbe1f30334408d43420616b 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -29,11 +29,11 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        sound_header.c
        space_sound.c
 
        sound_intern.h
 )
 
-BLENDERLIB(bf_editor_space_sound "${SRC}" "${INC}")
+blenderlib(bf_editor_space_sound "${SRC}" "${INC}")
index acfb2f315f81b285797d108c83a2dcb0994f6949..86e2f3f3ac5abdef9d225393662670ab9221f556 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenfont
        ../../blenkernel
@@ -30,7 +30,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        space_text.c
        text_draw.c
        text_header.c
@@ -40,9 +40,9 @@ SET(SRC
        text_intern.h
 )
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ${PYTHON_INC} ../../python)
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
+if(WITH_PYTHON)
+       list(APPEND INC ${PYTHON_INC} ../../python)
+       add_definitions(-DWITH_PYTHON)
+endif()
 
-BLENDERLIB(bf_editor_text "${SRC}" "${INC}")
+blenderlib(bf_editor_text "${SRC}" "${INC}")
index ad1df116081976e170bbe5036a2d0788b06e6d08..cbfce4c5cc20cf718488ecb0284f8aedb333168a 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -29,11 +29,11 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        space_time.c
        time_ops.c
 
        time_intern.h
 )
 
-BLENDERLIB(bf_editor_space_time "${SRC}" "${INC}")
+blenderlib(bf_editor_space_time "${SRC}" "${INC}")
index d90092f75d002d45e7c7cf85ec27c57af815546b..15ae90056b181f79c0c64f8102e31959ea40df1d 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -29,11 +29,11 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        space_userpref.c
        userpref_ops.c
 
        userpref_intern.h
 )
 
-BLENDERLIB(bf_editor_space_userpref "${SRC}" "${INC}")
+blenderlib(bf_editor_space_userpref "${SRC}" "${INC}")
index 36bc9c037a885c69db97a3376685326f8629b69e..0e4c9ca6aa39e395ee412b1c3f68e707f16ad69c 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenfont
        ../../blenkernel
@@ -34,7 +34,7 @@ SET(INC
        ../../../../intern/smoke/extern
 )
 
-SET(SRC
+set(SRC
        drawanimviz.c
        drawarmature.c
        drawmesh.c
@@ -55,11 +55,11 @@ SET(SRC
        view3d_intern.h
 )
 
-IF(WITH_GAMEENGINE)
-       LIST(APPEND INC ../../../kernel/gen_system)
-       ADD_DEFINITIONS(-DWITH_GAMEENGINE)
-ENDIF(WITH_GAMEENGINE)
+if(WITH_GAMEENGINE)
+       list(APPEND INC ../../../kernel/gen_system)
+       add_definitions(-DWITH_GAMEENGINE)
+endif()
 
-ADD_DEFINITIONS(-DGLEW_STATIC)
+add_definitions(-DGLEW_STATIC)
 
-BLENDERLIB(bf_editor_space_view3d "${SRC}" "${INC}")
+blenderlib(bf_editor_space_view3d "${SRC}" "${INC}")
index 6f4d1ff3aaa01b9cb720b1ec0d066e3707e0aaa9..5e759bf1ee0c8c7cf2605c4e6bfdf10864f34ee3 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -29,7 +29,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        transform.c
        transform_constraints.c
        transform_conversions.c
@@ -44,4 +44,4 @@ SET(SRC
        transform.h
 )
 
-BLENDERLIB(bf_editor_transform "${SRC}" "${INC}")
+blenderlib(bf_editor_transform "${SRC}" "${INC}")
index 65b52b876fad657d4b49115ad8115bcd9214604e..61ba1bb6c74950164c5d85b148a6b0eb940e81fe 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -29,7 +29,7 @@ SET(INC
        ../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        ed_util.c
        editmode_undo.c
        numinput.c
@@ -82,4 +82,4 @@ SET(SRC
        ../include/UI_view2d.h
 )
 
-BLENDERLIB(bf_editor_util "${SRC}" "${INC}")
+blenderlib(bf_editor_util "${SRC}" "${INC}")
index 1cec055eb7f3cf483eb69d423306f2d85d3ceb2b..92ee3bea8d53967c2a136e0e280abdc90487cc02 100644 (file)
@@ -19,7 +19,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        ../include
        ../../blenkernel
        ../../blenlib
@@ -30,7 +30,7 @@ SET(INC
        ../../../../intern/opennl/extern
 )
 
-SET(SRC
+set(SRC
        uvedit_draw.c
        uvedit_ops.c
        uvedit_parametrizer.c
@@ -40,4 +40,4 @@ SET(SRC
        uvedit_parametrizer.h
 )
 
-BLENDERLIB(bf_editor_uvedit "${SRC}" "${INC}")
+blenderlib(bf_editor_uvedit "${SRC}" "${INC}")
index 63dedc75226fe5e4f2b85b240f1e496a16d5afe7..54257af6ea99b102f606e30b1d8d08b60caaa82e 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
        ../blenlib
        ../blenkernel
@@ -36,7 +36,7 @@ SET(INC
        ../../../intern/smoke/extern
 )
 
-SET(SRC
+set(SRC
        intern/gpu_buffers.c
        intern/gpu_codegen.c
        intern/gpu_draw.c
@@ -52,7 +52,7 @@ SET(SRC
        intern/gpu_codegen.h
 )
 
-ADD_DEFINITIONS(-DGLEW_STATIC)
+add_definitions(-DGLEW_STATIC)
 
-BLENDERLIB(bf_gpu "${SRC}" "${INC}")
+blenderlib(bf_gpu "${SRC}" "${INC}")
 
index 17e09b460af6b639e289de4df9de3533e2ff9bc1..78f362be117035f1c6545ce1dcc352070d768125 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        ../blenlib
        ../makesdna
        ../blenkernel
@@ -33,7 +33,7 @@ SET(INC
        ../../../intern/iksolver/extern
 )
 
-SET(SRC
+set(SRC
        intern/ikplugin_api.c
        intern/iksolver_plugin.c
 
@@ -43,13 +43,13 @@ SET(SRC
        intern/itasc_plugin.h
 )
 
-IF(WITH_IK_ITASC)
-       ADD_DEFINITIONS(-DWITH_IK_ITASC)
-       LIST(APPEND INC ../../../extern/Eigen2)
-       LIST(APPEND INC ../../../intern/itasc)
-       LIST(APPEND SRC
+if(WITH_IK_ITASC)
+       add_definitions(-DWITH_IK_ITASC)
+       list(APPEND INC ../../../extern/Eigen2)
+       list(APPEND INC ../../../intern/itasc)
+       list(APPEND SRC
                ./intern/itasc_plugin.cpp
        )
-ENDIF(WITH_IK_ITASC)
+endif()
 
-BLENDERLIB(bf_ikplugin "${SRC}" "${INC}")
+blenderlib(bf_ikplugin "${SRC}" "${INC}")
index e68b2d20fa3bf65ac45733b4dbe105ded2db2e18..866a702e43fcec6b56c69a7312a1d4eb3ba16e77 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        .
        ../avi
        ../blenlib
@@ -37,7 +37,7 @@ SET(INC
        ${ZLIB_INC}
 )
 
-SET(SRC
+set(SRC
        intern/allocimbuf.c
        intern/anim_movie.c
        intern/bmp.c
@@ -96,48 +96,48 @@ SET(SRC
        intern/openexr/openexr_multi.h
 )
 
-IF(WITH_IMAGE_OPENEXR)
-       ADD_DEFINITIONS(-DWITH_OPENEXR)
-ENDIF(WITH_IMAGE_OPENEXR)
+if(WITH_IMAGE_OPENEXR)
+       add_definitions(-DWITH_OPENEXR)
+endif()
 
-IF(WITH_IMAGE_TIFF)
-       LIST(APPEND INC ${TIFF_INCLUDE_DIR})
-       ADD_DEFINITIONS(-DWITH_TIFF)
-ENDIF(WITH_IMAGE_TIFF)
+if(WITH_IMAGE_TIFF)
+       list(APPEND INC ${TIFF_INCLUDE_DIR})
+       add_definitions(-DWITH_TIFF)
+endif()
 
-IF(WITH_IMAGE_OPENJPEG)
-       LIST(APPEND INC ${OPENJPEG_INC})
-       ADD_DEFINITIONS(-DWITH_OPENJPEG)
-ENDIF(WITH_IMAGE_OPENJPEG)
+if(WITH_IMAGE_OPENJPEG)
+       list(APPEND INC ${OPENJPEG_INC})
+       add_definitions(-DWITH_OPENJPEG)
+endif()
 
-IF(WITH_IMAGE_REDCODE)
-       LIST(APPEND INC ${REDCODE_INC})
-       ADD_DEFINITIONS(-DWITH_REDCODE)
-ENDIF(WITH_IMAGE_REDCODE)
+if(WITH_IMAGE_REDCODE)
+       list(APPEND INC ${REDCODE_INC})
+       add_definitions(-DWITH_REDCODE)
+endif()
 
-IF(WITH_CODEC_QUICKTIME)
-       LIST(APPEND INC
+if(WITH_CODEC_QUICKTIME)
+       list(APPEND INC
                ../quicktime
                ${QUICKTIME_INC}
        )
-       ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_CODEC_QUICKTIME)
+       add_definitions(-DWITH_QUICKTIME)
+endif()
 
-IF(WITH_CODEC_FFMPEG)
-       LIST(APPEND INC ${FFMPEG_INC})
-       ADD_DEFINITIONS(-DWITH_FFMPEG)
-ENDIF(WITH_CODEC_FFMPEG)
+if(WITH_CODEC_FFMPEG)
+       list(APPEND INC ${FFMPEG_INC})
+       add_definitions(-DWITH_FFMPEG)
+endif()
 
-IF(WITH_IMAGE_DDS)
-       ADD_DEFINITIONS(-DWITH_DDS)
-ENDIF(WITH_IMAGE_DDS)
+if(WITH_IMAGE_DDS)
+       add_definitions(-DWITH_DDS)
+endif()
 
-IF(WITH_IMAGE_CINEON)
-       ADD_DEFINITIONS(-DWITH_CINEON)
-ENDIF(WITH_IMAGE_CINEON)
+if(WITH_IMAGE_CINEON)
+       add_definitions(-DWITH_CINEON)
+endif()
 
-IF(WITH_IMAGE_HDR)
-       ADD_DEFINITIONS(-DWITH_HDR)
-ENDIF(WITH_IMAGE_HDR)
+if(WITH_IMAGE_HDR)
+       add_definitions(-DWITH_HDR)
+endif()
 
-BLENDERLIB(bf_imbuf "${SRC}" "${INC}")
+blenderlib(bf_imbuf "${SRC}" "${INC}")
index f475471976151df37f6249608495698cbd0ecd66..d9cfc04cf8db6747d676d9cec594e424e2af3c55 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
                .
                ..
                ../../
@@ -34,7 +34,7 @@ SET(INC
                ../../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        cineon_dpx.c
        cineonlib.c
        dpxlib.c
@@ -43,4 +43,4 @@ SET(SRC
        logmemfile.c
 )
 
-BLENDERLIB(bf_imbuf_cineon "${SRC}" "${INC}")
+blenderlib(bf_imbuf_cineon "${SRC}" "${INC}")
index 5634368383d76bdcdef2fe6d0df878bceb26b408..44341c7e8616fb91f00a625f00f0c4370fc337ab 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        .
        ..
        ./intern/include
@@ -35,7 +35,7 @@ SET(INC
        ../../../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        BlockDXT.cpp
        ColorBlock.cpp
        DirectDrawSurface.cpp
@@ -45,7 +45,7 @@ SET(SRC
 )
 
 if(WITH_IMAGE_DDS)
-       ADD_DEFINITIONS(-DWITH_DDS)
-ENDIF(WITH_IMAGE_DDS)
+       add_definitions(-DWITH_DDS)
+endif()
 
-BLENDERLIB(bf_imbuf_dds "${SRC}" "${INC}")                 
+blenderlib(bf_imbuf_dds "${SRC}" "${INC}")                 
index edea033bb3a2d2ace04d6222d89927421c5126d8..958abc4d1f68ff494adfb9620ae76e56648d4ffb 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        .
        ../../../blenkernel
        ../../
@@ -36,12 +36,12 @@ SET(INC
        ${OPENEXR_INC}
 )
 
-SET(SRC
+set(SRC
        openexr_api.cpp
 )
 
-IF(WITH_IMAGE_OPENEXR)
-       ADD_DEFINITIONS(-DWITH_OPENEXR)
-ENDIF(WITH_IMAGE_OPENEXR)
+if(WITH_IMAGE_OPENEXR)
+       add_definitions(-DWITH_OPENEXR)
+endif()
 
-BLENDERLIB(bf_imbuf_openexr "${SRC}" "${INC}")                 
+blenderlib(bf_imbuf_openexr "${SRC}" "${INC}")                 
index cb61082000dc83d618a0a1a7a94dc58661496d42..e02b33b92c13ee4e8152617e97c0a74e59e7f761 100644 (file)
@@ -24,4 +24,4 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-ADD_SUBDIRECTORY(intern)
+add_subdirectory(intern)
index ca01b23198271193373155f0b7b237a25da5a2c5..8329c28d42e35cf9d027e655f812bb933ff5d93c 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-INCLUDE_DIRECTORIES(../../../../intern/guardedalloc ..)
+include_directories(../../../../intern/guardedalloc ..)
 
 # Build makesdna executable
-SET(SRC
+set(SRC
        makesdna.c
        ../../../../intern/guardedalloc/intern/mallocn.c
 )
 
-IF(WIN32 AND NOT UNIX)
-       LIST(APPEND SRC
+if(WIN32 AND NOT UNIX)
+       list(APPEND SRC
                ../../../../intern/guardedalloc/intern/mmap_win.c
        )
-ENDIF(WIN32 AND NOT UNIX)
+endif()
 
-SET(SRC_DNA_INC
+set(SRC_DNA_INC
        ../DNA_ID.h
        ../DNA_action_types.h
        ../DNA_actuator_types.h
@@ -98,22 +98,22 @@ SET(SRC_DNA_INC
        ../DNA_world_types.h
 )
 
-ADD_EXECUTABLE(makesdna ${SRC} ${SRC_DNA_INC})
+add_executable(makesdna ${SRC} ${SRC_DNA_INC})
 
 # Output dna.c
-ADD_CUSTOM_COMMAND(
+add_custom_command(
        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
        COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
        DEPENDS makesdna
 )
 
 # Build bf_dna library
-SET(SRC
+set(SRC
        dna_genfile.c
        dna.c
        ${SRC_DNA_INC}
 )
 
-BLENDERLIB(bf_dna "${SRC}" "${INC}")
+blenderlib(bf_dna "${SRC}" "${INC}")
 
-MESSAGE(STATUS "Configuring makesdna")
+message(STATUS "Configuring makesdna")
index ec48240bfc5f18537405e0de3eaf7072904667fb..540597da5787e2598114656dd62ae94769fc05ca 100644 (file)
@@ -24,4 +24,4 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-ADD_SUBDIRECTORY(intern)
+add_subdirectory(intern)
index bf9ba2dcc70457160150d05b003e204a8b4a67b8..3d189edb2f2214ff2ff0e5509496a58f90961ba5 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 # Generated code has some unused vars we can ignore.
-REMOVE_STRICT_FLAGS()
+remove_strict_flags()
 
-MESSAGE(STATUS "Configuring makesrna")
+message(STATUS "Configuring makesrna")
 
-FILE(GLOB DEFSRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
-FILE(GLOB APISRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*_api.c")
-LIST(REMOVE_ITEM DEFSRC rna_access.c rna_define.c makesrna.c)
-LIST(REMOVE_ITEM DEFSRC ${APISRC})
+file(GLOB DEFSRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
+file(GLOB APISRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*_api.c")
+list(REMOVE_ITEM DEFSRC rna_access.c rna_define.c makesrna.c)
+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_SOURCE_FILES_PROPERTIES(GENSRC PROPERTIES GENERATED true)
+string(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}")
+set_source_files_properties(GENSRC PROPERTIES GENERATED true)
 
 
-SET(SRC
+set(SRC
        makesrna.c
        rna_define.c
        ${DEFSRC}
@@ -47,7 +47,7 @@ SET(SRC
        ../../../../intern/guardedalloc/intern/mmap_win.c
 )
 
-INCLUDE_DIRECTORIES(
+include_directories(
        ../../../../intern/audaspace/intern
        ../../../../intern/guardedalloc
        ../../../../intern/memutil
@@ -66,93 +66,93 @@ INCLUDE_DIRECTORIES(
        .
 )
 
-FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
+file(GLOB INC_FILES ../*.h ../../makesdna/*.h)
 
-IF(WITH_PYTHON)
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
+if(WITH_PYTHON)
+       add_definitions(-DWITH_PYTHON)
+endif()
 
-IF(WITH_GAMEENGINE)
-       ADD_DEFINITIONS(-DWITH_GAMEENGINE)
-ENDIF(WITH_GAMEENGINE)
+if(WITH_GAMEENGINE)
+       add_definitions(-DWITH_GAMEENGINE)
+endif()
 
-IF(WITH_IMAGE_OPENEXR)
-       ADD_DEFINITIONS(-DWITH_OPENEXR)
-ENDIF(WITH_IMAGE_OPENEXR)
+if(WITH_IMAGE_OPENEXR)
+       add_definitions(-DWITH_OPENEXR)
+endif()
 
-IF(WITH_IMAGE_TIFF)
-       ADD_DEFINITIONS(-DWITH_TIFF)
-ENDIF(WITH_IMAGE_TIFF)
+if(WITH_IMAGE_TIFF)
+       add_definitions(-DWITH_TIFF)
+endif()
 
-IF(WITH_IMAGE_OPENJPEG)
-       ADD_DEFINITIONS(-DWITH_OPENJPEG)
-ENDIF(WITH_IMAGE_OPENJPEG)
+if(WITH_IMAGE_OPENJPEG)
+       add_definitions(-DWITH_OPENJPEG)
+endif()
 
-IF(WITH_IMAGE_DDS)
-       ADD_DEFINITIONS(-DWITH_DDS)
-ENDIF(WITH_IMAGE_DDS)
+if(WITH_IMAGE_DDS)
+       add_definitions(-DWITH_DDS)
+endif()
 
-IF(WITH_IMAGE_CINEON)
-       ADD_DEFINITIONS(-DWITH_CINEON)
-ENDIF(WITH_IMAGE_CINEON)
+if(WITH_IMAGE_CINEON)
+       add_definitions(-DWITH_CINEON)
+endif()
 
-IF(WITH_IMAGE_HDR)
-       ADD_DEFINITIONS(-DWITH_HDR)
-ENDIF(WITH_IMAGE_HDR)
+if(WITH_IMAGE_HDR)
+       add_definitions(-DWITH_HDR)
+endif()
 
-IF(WITH_CODEC_QUICKTIME)
-       LIST(APPEND INC ../../quicktime)
-       ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_CODEC_QUICKTIME)
+if(WITH_CODEC_QUICKTIME)
+       list(APPEND INC ../../quicktime)
+       add_definitions(-DWITH_QUICKTIME)
+endif()
 
-IF(WITH_CODEC_FFMPEG)
-       LIST(APPEND INC ${FFMPEG_INC})
-       ADD_DEFINITIONS(-DWITH_FFMPEG)
-ENDIF(WITH_CODEC_FFMPEG)
+if(WITH_CODEC_FFMPEG)
+       list(APPEND INC ${FFMPEG_INC})
+       add_definitions(-DWITH_FFMPEG)
+endif()
 
-IF(WITH_LCMS)
-       LIST(APPEND INC ${LCMS_INCLUDE_DIR})
-       ADD_DEFINITIONS(-DWITH_LCMS)
-ENDIF(WITH_LCMS)
+if(WITH_LCMS)
+       list(APPEND INC ${LCMS_INCLUDE_DIR})
+       add_definitions(-DWITH_LCMS)
+endif()
 
-IF(NOT WITH_MOD_FLUID)
-       ADD_DEFINITIONS(-DDISABLE_ELBEEM)
-ENDIF(NOT WITH_MOD_FLUID)
+if(NOT WITH_MOD_FLUID)
+       add_definitions(-DDISABLE_ELBEEM)
+endif()
 
-IF(WITH_FFTW3)
-       ADD_DEFINITIONS(-DFFTW3=1)
-ENDIF(WITH_FFTW3)
+if(WITH_FFTW3)
+       add_definitions(-DFFTW3=1)
+endif()
 
-IF(WITH_SDL)
-       ADD_DEFINITIONS(-DWITH_SDL)
-ENDIF(WITH_SDL)
+if(WITH_SDL)
+       add_definitions(-DWITH_SDL)
+endif()
 
-IF(WITH_OPENAL)
-       ADD_DEFINITIONS(-DWITH_OPENAL)
-ENDIF(WITH_OPENAL)
+if(WITH_OPENAL)
+       add_definitions(-DWITH_OPENAL)
+endif()
 
-IF(WITH_JACK)
-       ADD_DEFINITIONS(-DWITH_JACK)
-ENDIF(WITH_JACK)
+if(WITH_JACK)
+       add_definitions(-DWITH_JACK)
+endif()
 
-IF(WITH_OPENCOLLADA)
-       ADD_DEFINITIONS(-DWITH_COLLADA)
-ENDIF(WITH_OPENCOLLADA)
+if(WITH_OPENCOLLADA)
+       add_definitions(-DWITH_COLLADA)
+endif()
 
 # Build makesrna executable
-ADD_EXECUTABLE(makesrna ${SRC} ${INC_FILES})
-TARGET_LINK_LIBRARIES(makesrna bf_dna)
+add_executable(makesrna ${SRC} ${INC_FILES})
+target_link_libraries(makesrna bf_dna)
 
 # Output rna_*_gen.c
 # note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes
-ADD_CUSTOM_COMMAND(
+add_custom_command(
        OUTPUT ${GENSRC}
        COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesrna ${CMAKE_CURRENT_BINARY_DIR}/
        DEPENDS makesrna
 )
 
 # Build bf_rna
-SET(SRC
+set(SRC
        rna_access.c
        ${GENSRC}
 
@@ -166,4 +166,4 @@ SET(SRC
        rna_nodetree_types.h
 )
 
-BLENDERLIB(bf_rna "${SRC}" "${INC}")
+blenderlib(bf_rna "${SRC}" "${INC}")
index 6bdb3fbc7383e3b25c9daf37ec03e94d87e1da39..9748fadf1d21483c7cbb24e0ac5de7e93bcd27aa 100644 (file)
@@ -473,7 +473,7 @@ static void rna_def_mtex(BlenderRNA *brna)
        prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
        RNA_def_property_float_sdna(prop, NULL, "r");
        RNA_def_property_array(prop, 3);
-       RNA_def_property_ui_text(prop, "Color", "The default color for textures that don't return RGB");
+       RNA_def_property_ui_text(prop, "Color", "The default color for textures that don't return RGB or when RGB to intensity is enabled");
        RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
 
        prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
index c14787aeae7b796e8cdc8b89de5d06ada32e9354..5948c0cca91ae8c8d13d56348ce48e793f5e39fc 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        . ./intern
        ../blenlib
        ../makesdna
@@ -36,7 +36,7 @@ SET(INC
        ${ZLIB_INC}
 )
 
-SET(SRC
+set(SRC
        intern/MOD_armature.c
        intern/MOD_array.c
        intern/MOD_bevel.c
@@ -81,21 +81,21 @@ SET(SRC
        intern/MOD_util.h
 )
 
-IF(WITH_MOD_BOOLEAN)
-       ADD_DEFINITIONS(-DWITH_MOD_BOOLEAN)
-       LIST(APPEND SRC
+if(WITH_MOD_BOOLEAN)
+       add_definitions(-DWITH_MOD_BOOLEAN)
+       list(APPEND SRC
                intern/MOD_boolean_util.c
        )
-       LIST(APPEND INC ../../../intern/bsp/extern)
-ENDIF(WITH_MOD_BOOLEAN)
+       list(APPEND INC ../../../intern/bsp/extern)
+endif()
 
-IF(WITH_MOD_DECIMATE)
-       ADD_DEFINITIONS(-DWITH_MOD_DECIMATE)
-       LIST(APPEND INC ../../../intern/decimation/extern)
-ENDIF(WITH_MOD_DECIMATE)
+if(WITH_MOD_DECIMATE)
+       add_definitions(-DWITH_MOD_DECIMATE)
+       list(APPEND INC ../../../intern/decimation/extern)
+endif()
 
-IF(NOT WITH_MOD_FLUID)
-       ADD_DEFINITIONS(-DDISABLE_ELBEEM)
-ENDIF(NOT WITH_MOD_FLUID)
+if(NOT WITH_MOD_FLUID)
+       add_definitions(-DDISABLE_ELBEEM)
+endif()
 
-BLENDERLIB(bf_modifiers "${SRC}" "${INC}")
+blenderlib(bf_modifiers "${SRC}" "${INC}")
index 3628cb4f7480cc7e301983d2cd97fc86926d8a55..57c8f7bcad4bd919cbbbbf773837852ded8c410d 100644 (file)
@@ -23,7 +23,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        .
        ../blenkernel
        ../blenlib
@@ -37,7 +37,7 @@ SET(INC
        ../../../extern/glew/include
 )
 
-SET(SRC
+set(SRC
        intern/CMP_nodes/CMP_alphaOver.c
        intern/CMP_nodes/CMP_bilateralblur.c
        intern/CMP_nodes/CMP_blur.c
@@ -148,10 +148,10 @@ SET(SRC
        intern/node_util.h
 )
 
-IF(WITH_PYTHON)
-       SET(INC ${INC} ../python ${PYTHON_INC})
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
+if(WITH_PYTHON)
+       set(INC ${INC} ../python ${PYTHON_INC})
+       add_definitions(-DWITH_PYTHON)
+endif()
 
-BLENDERLIB(bf_nodes "${SRC}" "${INC}")
+blenderlib(bf_nodes "${SRC}" "${INC}")
 
index b006e7b0be6d972d03d113dce33abc986bc44dda..fe9e030770337934ec103b00479136f5ad44c5de 100644 (file)
@@ -16,5 +16,5 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-ADD_SUBDIRECTORY(intern)
-ADD_SUBDIRECTORY(generic)
+add_subdirectory(intern)
+add_subdirectory(generic)
index 5f5575f206bdf8af94e37ccff177cc1f15fa3704..5569dda2ce688db19127d8af582a327597cacd65 100644 (file)
@@ -18,7 +18,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        .
        ../../blenlib
        ../../makesdna
@@ -28,7 +28,7 @@ SET(INC
        ${PYTHON_INC}
 )
 
-SET(SRC
+set(SRC
        IDProp.c
        bgl.c
        blf_api.c
@@ -57,4 +57,4 @@ SET(SRC
        py_capi_utils.h
 )
 
-BLENDERLIB(bf_python_ext "${SRC}" "${INC}")
+blenderlib(bf_python_ext "${SRC}" "${INC}")
index b0ef6efb7d4e0fe7e5cb6c7a6007fa21ca148644..86b2e0deb04988261e39896f0fe387eb2480d5fb 100644 (file)
@@ -23,7 +23,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        ../
        ../../blenlib
        ../../makesdna
@@ -36,7 +36,7 @@ SET(INC
        ${PYTHON_INC}
 )
 
-SET(SRC
+set(SRC
        bpy.c
        bpy_app.c
        bpy_driver.c
@@ -62,8 +62,8 @@ SET(SRC
 )
 
 # only to check if buildinfo is available
-IF(WITH_BUILDINFO)
-       ADD_DEFINITIONS(-DBUILD_DATE)
-ENDIF(WITH_BUILDINFO)
+if(WITH_BUILDINFO)
+       add_definitions(-DBUILD_DATE)
+endif()
 
-BLENDERLIB(bf_python "${SRC}" "${INC}")
+blenderlib(bf_python "${SRC}" "${INC}")
index ebb6949e2ce985e5f99cec4a27abdf846656fa99..f5565153a017a851114b393d4d351419969428a2 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-IF(USE_QTKIT)
-       SET(SRC
+if(USE_QTKIT)
+       set(SRC
                apple/qtkit_import.m
                apple/qtkit_export.m
 
                quicktime_export.h
                quicktime_import.h
        )
-ELSE(USE_QTKIT)
-       SET(SRC
+else()
+       set(SRC
                apple/quicktime_import.c
                apple/quicktime_export.c
 
                quicktime_export.h
                quicktime_import.h
        )
-ENDIF(USE_QTKIT)
+endif()
 
-SET(INC 
+set(INC 
        .
        ../quicktime
        ../makesdna
@@ -61,6 +61,6 @@ SET(INC
        ${QUICKTIME_INC}
 )
 
-ADD_DEFINITIONS(-DWITH_QUICKTIME)
+add_definitions(-DWITH_QUICKTIME)
 
-BLENDERLIB(bf_quicktime "${SRC}" "${INC}")
+blenderlib(bf_quicktime "${SRC}" "${INC}")
index 11128274e200c39e3ca7c38c4512637eac679bd6..b6549338fbb87c29573a55d752b2c03f025ea479 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC 
+set(INC 
        .
        ../blenloader
        ../blenloader/intern
@@ -34,10 +34,10 @@ SET(INC
        ../../kernel/gen_messaging
 )
 
-SET(SRC
+set(SRC
        intern/BLO_readblenfile.c
 
        BLO_readblenfile.h
 )
 
-BLENDERLIB(bf_readblenfile "${SRC}" "${INC}")
+blenderlib(bf_readblenfile "${SRC}" "${INC}")
index fd3621a4cf85891f1febbfb78459f45a5d5769f5..779d89829263e45a1f0b9fc0eac7d35690690675 100644 (file)
@@ -25,9 +25,9 @@
 # ***** END GPL LICENSE BLOCK *****
 
 # remove warning until render branch merged.
-REMOVE_STRICT_FLAGS()
+remove_strict_flags()
 
-SET(INC 
+set(INC 
        intern/include
        extern/include
        ../blenlib
@@ -41,7 +41,7 @@ SET(INC
        ../../../intern/guardedalloc
 )
 
-SET(SRC
+set(SRC
        intern/raytrace/rayobject.cpp
        intern/raytrace/rayobject_qbvh.cpp
        intern/raytrace/rayobject_rtbuild.cpp
@@ -111,20 +111,20 @@ SET(SRC
        intern/raytrace/vbvh.h
 )
 
-IF(WITH_IMAGE_OPENEXR)
-       ADD_DEFINITIONS(-DWITH_OPENEXR)
-ENDIF(WITH_IMAGE_OPENEXR)
+if(WITH_IMAGE_OPENEXR)
+       add_definitions(-DWITH_OPENEXR)
+endif()
 
-IF(WITH_CODEC_QUICKTIME)
-       LIST(APPEND INC ../quicktime ${QUICKTIME_INC})
-       ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_CODEC_QUICKTIME)
+if(WITH_CODEC_QUICKTIME)
+       list(APPEND INC ../quicktime ${QUICKTIME_INC})
+       add_definitions(-DWITH_QUICKTIME)
+endif()
 
-IF(APPLE)
-       IF(CMAKE_OSX_ARCHITECTURES MATCHES "i386" OR CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
-               SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mfpmath=sse")
-               SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpmath=sse")
-       ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES "i386" OR CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
-ENDIF(APPLE)
+if(APPLE)
+       if(CMAKE_OSX_ARCHITECTURES MATCHES "i386" OR CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
+               set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mfpmath=sse")
+               set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpmath=sse")
+       endif()
+endif()
 
-BLENDERLIB_NOLIST(bf_render "${SRC}" "${INC}")
+blenderlib_nolist(bf_render "${SRC}" "${INC}")
index b6920a02bfaf42783cb34b04b0650f3047c88205..8f91011b2100c4612c356f6f3e28639a948133f8 100644 (file)
@@ -24,7 +24,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-SET(INC
+set(INC
        .
        ../nodes
        ../gpu
@@ -47,7 +47,7 @@ SET(INC
        ${OPENGL_INCLUDE_DIR}
 )
 
-SET(SRC
+set(SRC
        intern/wm.c
        intern/wm_apple.c
        intern/wm_cursors.c
@@ -75,41 +75,41 @@ SET(SRC
        wm_window.h
 )
 
-ADD_DEFINITIONS(-DGLEW_STATIC)
+add_definitions(-DGLEW_STATIC)
 
-IF(WITH_INTERNATIONAL)
-       ADD_DEFINITIONS(-DINTERNATIONAL)
-ENDIF(WITH_INTERNATIONAL)
+if(WITH_INTERNATIONAL)
+       add_definitions(-DINTERNATIONAL)
+endif()
 
-IF(WITH_OPENCOLLADA)
-       ADD_DEFINITIONS(-DWITH_COLLADA)
-ENDIF(WITH_OPENCOLLADA)
+if(WITH_OPENCOLLADA)
+       add_definitions(-DWITH_COLLADA)
+endif()
 
-IF(WITH_CODEC_QUICKTIME)
-       LIST(APPEND INC ../quicktime ${QUICKTIME_INC})
-       ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_CODEC_QUICKTIME)
+if(WITH_CODEC_QUICKTIME)
+       list(APPEND INC ../quicktime ${QUICKTIME_INC})
+       add_definitions(-DWITH_QUICKTIME)
+endif()
 
-IF(WITH_CODEC_FFMPEG)
-       LIST(APPEND INC ${FFMPEG_INC})
-       ADD_DEFINITIONS(-DWITH_FFMPEG)
-ENDIF(WITH_CODEC_FFMPEG)
+if(WITH_CODEC_FFMPEG)
+       list(APPEND INC ${FFMPEG_INC})
+       add_definitions(-DWITH_FFMPEG)
+endif()
 
-IF(WITH_PYTHON)
-       LIST(APPEND INC ../python ${PYTHON_INC})
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
+if(WITH_PYTHON)
+       list(APPEND INC ../python ${PYTHON_INC})
+       add_definitions(-DWITH_PYTHON)
+endif()
 
-IF(WITH_GAMEENGINE)
-       ADD_DEFINITIONS(-DWITH_GAMEENGINE)
-ENDIF(WITH_GAMEENGINE)
+if(WITH_GAMEENGINE)
+       add_definitions(-DWITH_GAMEENGINE)
+endif()
 
-IF(WITH_COCOA)
-       LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/wm_apple.c")
-ENDIF(WITH_COCOA)
+if(WITH_COCOA)
+       list(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/wm_apple.c")
+endif()
 
-IF(WITH_BUILDINFO)
-       ADD_DEFINITIONS(-DNAN_BUILDINFO)
-ENDIF(WITH_BUILDINFO)
+if(WITH_BUILDINFO)
+       add_definitions(-DNAN_BUILDINFO)
+endif()
 
-BLENDERLIB_NOLIST(bf_windowmanager "${SRC}" "${INC}")
+blenderlib_nolist(bf_windowmanager "${SRC}" "${INC}")
index fa6521e7f8dca1245b9078157c44128aaf3d65f9..46a1d41d0988d1441ecac746aa4b1d6651bd5ddf 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-MESSAGE(STATUS "Configuring blenderplayer")
+message(STATUS "Configuring blenderplayer")
 
-SETUP_LIBDIRS()
+setup_libdirs()
 
-IF(WITH_CODEC_QUICKTIME)
-       ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_CODEC_QUICKTIME)
+if(WITH_CODEC_QUICKTIME)
+       add_definitions(-DWITH_QUICKTIME)
+endif()
 
-IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-       ADD_DEFINITIONS(-DWITH_BINRELOC)
-       INCLUDE_DIRECTORIES(${BINRELOC_INC})
-ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+       add_definitions(-DWITH_BINRELOC)
+       include_directories(${BINRELOC_INC})
+endif()
 
-ADD_CUSTOM_COMMAND(
+add_custom_command(
        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
        COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
        DEPENDS ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna
 )
 
-IF(WIN32 AND NOT UNIX)
-       ADD_EXECUTABLE(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../icons/winblender.rc)
-ELSE(WIN32 AND NOT UNIX)
-       ADD_EXECUTABLE(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
-ENDIF(WIN32 AND NOT UNIX)
+if(WIN32 AND NOT UNIX)
+       add_executable(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../icons/winblender.rc)
+else()
+       add_executable(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
+endif()
 
-ADD_DEPENDENCIES(blenderplayer makesdna)
+add_dependencies(blenderplayer makesdna)
 
-GET_PROPERTY(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
+get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
 
-LIST(APPEND BLENDER_LINK_LIBS
+list(APPEND BLENDER_LINK_LIBS
        ge_player_common
        ge_player_ghost
        blenkernel_blc
 )
 
-IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-       LIST(APPEND BLENDER_LINK_LIBS extern_binreloc)
-ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+       list(APPEND BLENDER_LINK_LIBS extern_binreloc)
+endif()
 
-IF(UNIX)
+if(UNIX)
        # Sort libraries
-       SET(BLENDER_SORTED_LIBS
+       set(BLENDER_SORTED_LIBS
                ge_player_ghost 
                ge_player_common 
                bf_intern_string 
@@ -123,34 +123,34 @@ IF(UNIX)
                bf_blenkernel # duplicate for linking
        )
   
-       IF(WITH_CODEC_QUICKTIME)
-               LIST(APPEND BLENDER_SORTED_LIBS bf_quicktime)
-       ENDIF(WITH_CODEC_QUICKTIME)
-
-       IF(WITH_CXX_GUARDEDALLOC)
-               LIST(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp)
-       ENDIF(WITH_CXX_GUARDEDALLOC)
-
-       FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
-               SET(REMLIB ${SORTLIB})
-               FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS})
-                       IF(${SEARCHLIB} STREQUAL ${SORTLIB})
-                               SET(REMLIB "")
-                       ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
-               ENDFOREACH(SEARCHLIB)
-               IF(REMLIB)
-                       MESSAGE(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured")
-                       LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
-               ENDIF(REMLIB)
-       ENDFOREACH(SORTLIB)
-
-       TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_SORTED_LIBS})
-ELSE(UNIX)
-       TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_LINK_LIBS})
-ENDIF(UNIX)
-
-IF(WITH_PLAYER)
-       ADD_SUBDIRECTORY(bad_level_call_stubs)
-ENDIF(WITH_PLAYER)
-
-SETUP_LIBLINKS(blenderplayer)
+       if(WITH_CODEC_QUICKTIME)
+               list(APPEND BLENDER_SORTED_LIBS bf_quicktime)
+       endif()
+
+       if(WITH_CXX_GUARDEDALLOC)
+               list(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp)
+       endif()
+
+       foreach(SORTLIB ${BLENDER_SORTED_LIBS})
+               set(REMLIB ${SORTLIB})
+               foreach(SEARCHLIB ${BLENDER_LINK_LIBS})
+                       if(${SEARCHLIB} STREQUAL ${SORTLIB})
+                               set(REMLIB "")
+                       endif()
+               endforeach()
+               if(REMLIB)
+                       message(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured")
+                       list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
+               endif()
+       endforeach()
+
+       target_link_libraries(blenderplayer ${BLENDER_SORTED_LIBS})
+else()
+       target_link_libraries(blenderplayer ${BLENDER_LINK_LIBS})
+endif()
+
+if(WITH_PLAYER)
+       add_subdirectory(bad_level_call_stubs)
+endif()
+
+setup_liblinks(blenderplayer)
index 28510b0a113ffb9ef00f9566a6ac1fdf26910299..0974438c2724df2630aa2038daf79413960b54c9 100644 (file)
@@ -25,9 +25,9 @@
 # ***** END GPL LICENSE BLOCK *****
 
 # this warning on generated files gets annoying
-REMOVE_STRICT_FLAGS()
+remove_strict_flags()
 
-SET(INC 
+set(INC 
        .
        .. 
        ../../../intern/guardedalloc
@@ -36,23 +36,23 @@ SET(INC
        ../../../source/blender/blenkernel
 )
 
-SET(SRC
+set(SRC
        stubs.c
 )
 
-IF(WITH_BUILDINFO)
-       ADD_DEFINITIONS(-DBUILD_DATE)
-       LIST(APPEND SRC
+if(WITH_BUILDINFO)
+       add_definitions(-DBUILD_DATE)
+       list(APPEND SRC
                ../../creator/buildinfo.c
        )
-ENDIF(WITH_BUILDINFO)
+endif()
 
-IF(WITH_GAMEENGINE)
-       ADD_DEFINITIONS(-DWITH_GAMEENGINE)
-ENDIF(WITH_GAMEENGINE)
+if(WITH_GAMEENGINE)
+       add_definitions(-DWITH_GAMEENGINE)
+endif()
 
-IF(WITH_INTERNATIONAL)
-       ADD_DEFINITIONS(-DWITH_FREETYPE2)
-ENDIF(WITH_INTERNATIONAL)
+if(WITH_INTERNATIONAL)
+       add_definitions(-DWITH_FREETYPE2)
+endif()
 
-BLENDERLIB_NOLIST(blenkernel_blc "${SRC}" "${INC}")
+blenderlib_nolist(blenkernel_blc "${SRC}" "${INC}")
index 7b9d8421aa566e2a32681b7681b3d6a478884d92..9561cd4831c32aaed758a87586781b60ab8405c5 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 # So BUILDINFO and BLENDERPATH strings are automatically quoted
-CMAKE_POLICY(SET CMP0005 NEW)
+cmake_policy(SET CMP0005 NEW)
 
-SETUP_LIBDIRS()
+setup_libdirs()
 
-INCLUDE_DIRECTORIES(
+include_directories(
        ../../intern/guardedalloc
        ../blender/blenlib
        ../blender/blenkernel
@@ -42,69 +42,69 @@ INCLUDE_DIRECTORIES(
        ../blender/windowmanager
 )
 
-IF(WITH_CODEC_QUICKTIME)
-       ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_CODEC_QUICKTIME)
+if(WITH_CODEC_QUICKTIME)
+       add_definitions(-DWITH_QUICKTIME)
+endif()
 
-IF(WITH_IMAGE_OPENEXR)
-       ADD_DEFINITIONS(-DWITH_OPENEXR)
-ENDIF(WITH_IMAGE_OPENEXR)
+if(WITH_IMAGE_OPENEXR)
+       add_definitions(-DWITH_OPENEXR)
+endif()
 
-IF(WITH_IMAGE_TIFF)
-       ADD_DEFINITIONS(-DWITH_TIFF)
-ENDIF(WITH_IMAGE_TIFF)
+if(WITH_IMAGE_TIFF)
+       add_definitions(-DWITH_TIFF)
+endif()
 
-IF(WITH_IMAGE_DDS)
-       ADD_DEFINITIONS(-DWITH_DDS)
-ENDIF(WITH_IMAGE_DDS)
+if(WITH_IMAGE_DDS)
+       add_definitions(-DWITH_DDS)
+endif()
 
-IF(WITH_IMAGE_CINEON)
-       ADD_DEFINITIONS(-DWITH_CINEON)
-ENDIF(WITH_IMAGE_CINEON)
+if(WITH_IMAGE_CINEON)
+       add_definitions(-DWITH_CINEON)
+endif()
 
-IF(WITH_IMAGE_HDR)
-       ADD_DEFINITIONS(-DWITH_HDR)
-ENDIF(WITH_IMAGE_HDR)
+if(WITH_IMAGE_HDR)
+       add_definitions(-DWITH_HDR)
+endif()
 
-IF(WITH_PYTHON)
-       INCLUDE_DIRECTORIES(../blender/python)
-       ADD_DEFINITIONS(-DWITH_PYTHON)
-ENDIF(WITH_PYTHON)
+if(WITH_PYTHON)
+       include_directories(../blender/python)
+       add_definitions(-DWITH_PYTHON)
+endif()
 
-IF(WITH_GAMEENGINE)
-       INCLUDE_DIRECTORIES(
+if(WITH_GAMEENGINE)
+       include_directories(
                ../kernel/gen_messaging
                ../kernel/gen_system
        )
 
-       ADD_DEFINITIONS(-DWITH_GAMEENGINE)
-ENDIF(WITH_GAMEENGINE)
+       add_definitions(-DWITH_GAMEENGINE)
+endif()
 
-IF(NOT WITH_SDL)
-       ADD_DEFINITIONS(-DDISABLE_SDL)
-ENDIF(NOT WITH_SDL)
+if(NOT WITH_SDL)
+       add_definitions(-DDISABLE_SDL)
+endif()
 
-IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-       ADD_DEFINITIONS(-DWITH_BINRELOC)
-       INCLUDE_DIRECTORIES(${BINRELOC_INC})
-ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+       add_definitions(-DWITH_BINRELOC)
+       include_directories(${BINRELOC_INC})
+endif()
 
 # Setup the exe sources and buildinfo
-SET(SRC
+set(SRC
        creator.c
 )
 
-IF(WIN32 AND NOT UNIX)
-       LIST(APPEND SRC
+if(WIN32 AND NOT UNIX)
+       list(APPEND SRC
                ../icons/winblender.rc
        )
-ENDIF(WIN32 AND NOT UNIX)
+endif()
 
-IF(WITH_BUILDINFO)
-       STRING(REPLACE " " "\ " BUILDINFO_CFLAGS "${CMAKE_C_FLAGS}")
-       STRING(REPLACE " " "\ " BUILDINFO_CXXFLAGS "${CMAKE_CXX_FLAGS}")
-       STRING(REPLACE " " "\ " BUILDINFO_LINKFLAGS "${PLATFORM_LINKFLAGS}")
-       ADD_DEFINITIONS(
+if(WITH_BUILDINFO)
+       string(REPLACE " " "\ " BUILDINFO_CFLAGS "${CMAKE_C_FLAGS}")
+       string(REPLACE " " "\ " BUILDINFO_CXXFLAGS "${CMAKE_CXX_FLAGS}")
+       string(REPLACE " " "\ " BUILDINFO_LINKFLAGS "${PLATFORM_LINKFLAGS}")
+       add_definitions(
                -DBUILD_DATE="${BUILD_DATE}"
                -DBUILD_TIME="${BUILD_TIME}"
                -DBUILD_REV="${BUILD_REV}"
@@ -116,60 +116,60 @@ IF(WITH_BUILDINFO)
                -DBUILD_SYSTEM="CMake"
        )
 
-       LIST(APPEND SRC
+       list(APPEND SRC
                buildinfo.c
        )
-ENDIF(WITH_BUILDINFO)
+endif()
 
-MESSAGE(STATUS "Configuring blender")
+message(STATUS "Configuring blender")
 
-ADD_EXECUTABLE(blender ${EXETYPE} ${SRC})
+add_executable(blender ${EXETYPE} ${SRC})
 
 # Post build steps for bundling/packaging.
 
-SET(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
+set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
 
-IF(WITH_INSTALL)
+if(WITH_INSTALL)
 
-       IF(UNIX)
-               ADD_CUSTOM_COMMAND(TARGET blender
+       if(UNIX)
+               add_custom_command(TARGET blender
                        POST_BUILD
                        MAIN_DEPENDENCY blender
                        #COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/plugins ${TARGETDIR}/
                        #COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/text/* ${TARGETDIR}/
                )
-       ENDIF(UNIX)
+       endif()
 
-       IF(UNIX AND NOT APPLE)
+       if(UNIX AND NOT APPLE)
                
                # Local installation, "make install" can be done after this optionally
                
-               ADD_CUSTOM_COMMAND(
+               add_custom_command(
                        TARGET blender POST_BUILD MAIN_DEPENDENCY blender
                        COMMAND rm -Rf ${TARGETDIR}/${BLENDER_VERSION}
                        COMMAND mkdir ${TARGETDIR}/${BLENDER_VERSION}/
                        COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf ${TARGETDIR}/${BLENDER_VERSION}/
                )
        
-               IF(WITH_INTERNATIONAL)
-                       ADD_CUSTOM_COMMAND(
+               if(WITH_INTERNATIONAL)
+                       add_custom_command(
                                TARGET blender POST_BUILD MAIN_DEPENDENCY blender
                                COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages ${TARGETDIR}/${BLENDER_VERSION}/
                                COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale ${TARGETDIR}/${BLENDER_VERSION}/
                        )
-               ENDIF(WITH_INTERNATIONAL)
+               endif()
        
-               IF(WITH_PYTHON)
-                       ADD_CUSTOM_COMMAND(
+               if(WITH_PYTHON)
+                       add_custom_command(
                                TARGET blender POST_BUILD MAIN_DEPENDENCY blender
                                COMMENT "copying blender scripts..."
                                COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/scripts ${TARGETDIR}/${BLENDER_VERSION}/
                                COMMAND find ${TARGETDIR} -name "*.py?" -prune -exec rm -rf {} "\;"
                        )
-                       IF(WITH_PYTHON_INSTALL)
+                       if(WITH_PYTHON_INSTALL)
                                # Copy the systems python into the install directory
                                # Scons copy in tools/Blender.py
-                               ADD_CUSTOM_COMMAND(
+                               add_custom_command(
                                        TARGET blender POST_BUILD MAIN_DEPENDENCY blender
                                        COMMENT "copying a subset of the systems python..."
 
@@ -191,10 +191,10 @@ IF(WITH_INSTALL)
                                        COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION} -name "*.py?" -exec rm -rf {} "\;"
                                        COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION} -name "*.so"-exec strip -s {} "\;"
                                )
-                       ENDIF(WITH_PYTHON_INSTALL)
-               ENDIF(WITH_PYTHON)
+                       endif()
+       &nbs