formatting edits only
authorCampbell Barton <ideasman42@gmail.com>
Fri, 30 Sep 2011 15:51:58 +0000 (15:51 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 30 Sep 2011 15:51:58 +0000 (15:51 +0000)
CMakeLists.txt
build_files/cmake/macros.cmake
source/creator/CMakeLists.txt

index 0d48cba..43ecdaa 100644 (file)
@@ -26,8 +26,8 @@
 # ***** END GPL LICENSE BLOCK *****
 
 #-----------------------------------------------------------------------------
-# We don't allow in-source builds. This causes no end of troubles because 
-# all out-of-source builds will use the CMakeCache.txt file there and even 
+# We don't allow in-source builds. This causes no end of troubles because
+# all out-of-source builds will use the CMakeCache.txt file there and even
 # build the libs and objects in it.
 
 if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
@@ -197,7 +197,7 @@ option(WITH_LZMA          "Enable best LZMA compression, (used for pointcache)"
 
 # Misc
 option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
-option(WITH_RAYOPTIMIZATION    "Enable use of SIMD (SSE) optimizations for the raytracer" ON) 
+option(WITH_RAYOPTIMIZATION    "Enable use of SIMD (SSE) optimizations for the raytracer" ON)
 if(UNIX AND NOT APPLE)
        option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
 endif()
@@ -286,7 +286,7 @@ endif()
 # linux only, not cached
 set(WITH_BINRELOC OFF)
 
-# MAXOSX only, set to avoid uninitialized 
+# MAXOSX only, set to avoid uninitialized
 set(EXETYPE)
 
 # C/C++ flags
@@ -311,13 +311,13 @@ set(PLATFORM_LINKFLAGS_DEBUG)
 # 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: 
+# On Unix:
 #   cmake ../blender \
 #         -D PYTHON_VERSION=3.2 \
 #         -D PYTHON_INCLUDE_DIR=/opt/py32/include/python3.2d \
 #         -D PYTHON_LIBRARY=/opt/py32/lib/libpython3.2d.so
 #
-# On Macs: 
+# On Macs:
 #   cmake ../blender \
 #         -D PYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2 \
 #         -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config \
@@ -329,7 +329,7 @@ set(PLATFORM_LINKFLAGS_DEBUG)
 #Platform specifics
 
 if(UNIX AND NOT APPLE)
-       
+
        # needed for ubuntu 11.04
        if(EXISTS "/usr/lib/x86_64-linux-gnu")
                set(CMAKE_LIBRARY_PATH "/usr/lib/x86_64-linux-gnu;${CMAKE_LIBRARY_PATH}")
@@ -381,10 +381,12 @@ if(UNIX AND NOT APPLE)
 
        if(WITH_SDL)
                find_package(SDL)
-               mark_as_advanced(SDLMAIN_LIBRARY)
-               mark_as_advanced(SDL_INCLUDE_DIR)
-               mark_as_advanced(SDL_LIBRARY)
-               mark_as_advanced(SDL_LIBRARY_TEMP)
+               mark_as_advanced(
+                       SDLMAIN_LIBRARY
+                       SDL_INCLUDE_DIR
+                       SDL_LIBRARY
+                       SDL_LIBRARY_TEMP
+               )
                # unset(SDLMAIN_LIBRARY CACHE)
                if(NOT SDL_FOUND)
                        set(WITH_SDL OFF)
@@ -428,8 +430,10 @@ if(UNIX AND NOT APPLE)
                        PATHS
                        /sw/lib
                )
-               mark_as_advanced(ICONV_LIBRARY)
-               mark_as_advanced(INTL_LIBRARY)
+               mark_as_advanced(
+                       ICONV_LIBRARY
+                       INTL_LIBRARY
+               )
 
                if(INTL_LIBRARY AND ICONV_LIBRARY)
                        set(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
@@ -519,16 +523,16 @@ if(UNIX AND NOT APPLE)
        # Intel C++ Compiler
        elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
                # think these next two are broken
-               find_program(XIAR xiar) 
-               if(XIAR) 
+               find_program(XIAR xiar)
+               if(XIAR)
                        set(CMAKE_AR "${XIAR}")
-               endif() 
+               endif()
                mark_as_advanced(XIAR)
 
-               find_program(XILD xild) 
-               if(XILD) 
+               find_program(XILD xild)
+               if(XILD)
                        set(CMAKE_LINKER "${XILD}")
-               endif() 
+               endif()
                mark_as_advanced(XILD)
 
                set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel")
@@ -551,7 +555,7 @@ elseif(WIN32)
                message("64 bit compiler detected.")
                set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
        endif()
-       
+
        add_definitions(-DWIN32)
 
        if(WITH_INTERNATIONAL)
@@ -576,7 +580,7 @@ elseif(WIN32)
        set(JPEG_INCLUDE_DIR "${JPEG}/include")
        set(JPEG_LIBPATH ${JPEG}/lib) # not cmake defined
 
-       set(WINTAB_INC ${LIBDIR}/wintab/include) 
+       set(WINTAB_INC ${LIBDIR}/wintab/include)
 
        if(WITH_OPENAL)
                set(OPENAL ${LIBDIR}/openal)
@@ -684,7 +688,7 @@ elseif(WIN32)
                                ${LIBDIR}/opencollada/include/COLLADABaseUtils/include
                                ${LIBDIR}/opencollada/include/COLLADAFramework/include
                                ${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader/include
-                               ${LIBDIR}/opencollada/include/GeneratedSaxParser/include                        
+                               ${LIBDIR}/opencollada/include/GeneratedSaxParser/include
                        )
 
                        set(OPENCOLLADA_LIBRARIES
@@ -817,7 +821,7 @@ elseif(WIN32)
                set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
                set(PTHREADS_LIBPATH ${PTHREADS}/lib)
                set(PTHREADS_LIBRARIES pthreadGC2)
-               
+
                set(FREETYPE ${LIBDIR}/gcc/freetype)
                set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
                set(FREETYPE_LIBPATH ${FREETYPE}/lib)
@@ -837,13 +841,13 @@ elseif(WIN32)
                                ${LIBDIR}/gcc/opencollada/include/COLLADABaseUtils/include
                                ${LIBDIR}/gcc/opencollada/include/COLLADAFramework/include
                                ${LIBDIR}/gcc/opencollada/include/COLLADASaxFrameworkLoader/include
-                               ${LIBDIR}/gcc/opencollada/include/GeneratedSaxParser/include                    
+                               ${LIBDIR}/gcc/opencollada/include/GeneratedSaxParser/include
                        )
                        set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
                        set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
                        set(PCRE_LIBRARIES pcre)
                endif()
-               
+
                if(WITH_CODEC_FFMPEG)
                        set(FFMPEG ${LIBDIR}/ffmpeg)
                        set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include ${FFMPEG}/include)
@@ -870,7 +874,7 @@ elseif(WIN32)
                        set(JACK_INCLUDE_DIRS ${JACK}/include/jack ${JACK}/include)
                        set(JACK_LIBRARIES jack)
                        set(JACK_LIBPATH ${JACK}/lib)
-                       
+
                        # TODO, gives linking errors, force off
                        set(WITH_JACK OFF)
                endif()
@@ -908,7 +912,7 @@ elseif(APPLE)
                        set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.0.0-powerpc)
                endif()
        endif()
-       
+
 
        if(WITH_OPENAL)
                find_package(OpenAL)
@@ -998,9 +1002,9 @@ elseif(APPLE)
                set(SAMPLERATE_LIBPATH ${SAMPLERATE}/lib)
        endif()
 
-       find_library(SYSTEMSTUBS_LIBRARY 
-               NAMES 
-               SystemStubs 
+       find_library(SYSTEMSTUBS_LIBRARY
+               NAMES
+               SystemStubs
                PATHS
        )
        mark_as_advanced(SYSTEMSTUBS_LIBRARY)
@@ -1018,13 +1022,13 @@ elseif(APPLE)
                        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 
+                               #libSDL still needs 32bit carbon quicktime
                        endif()
                elseif(WITH_CODEC_QUICKTIME)
                        set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime")
                endif()
 
-               # XXX - SOME MAC DEV PLEASE TEST WITH THE SDK INSTALLED! 
+               # XXX - SOME MAC DEV PLEASE TEST WITH THE SDK INSTALLED!
                # ALSO SHOULD BE MOVED INTO OWN MODULE WHEN FUNCTIONAL
                if(WITH_INPUT_NDOF)
                        # This thread it *should* work and check the framework - campbell
@@ -1184,7 +1188,7 @@ endif()
 #-----------------------------------------------------------------------------
 # Blender WebPlugin
 
-if(WITH_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")
 
@@ -1196,13 +1200,13 @@ endif()
 # Configure OpenGL.
 find_package(OpenGL)
 blender_include_dirs_sys("${OPENGL_INCLUDE_DIR}")
-# unset(OPENGL_LIBRARIES CACHE) # not compat with older cmake 
-# unset(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake 
+# 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)    
+       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}")
@@ -1214,9 +1218,11 @@ if(WITH_OPENMP)
                set(WITH_OPENMP OFF)
        endif()
 
-       mark_as_advanced(OpenMP_C_FLAGS)
-       mark_as_advanced(OpenMP_CXX_FLAGS)
-endif() 
+       mark_as_advanced(
+               OpenMP_C_FLAGS
+               OpenMP_CXX_FLAGS
+       )
+endif()
 
 #-----------------------------------------------------------------------------
 # Configure GLEW
@@ -1231,8 +1237,10 @@ else()
                message(FATAL_ERROR "GLEW is required to build blender, install it or use WITH_BUILTIN_GLEW")
        endif()
 
-       mark_as_advanced(GLEW_LIBRARY)
-       mark_as_advanced(GLEW_INCLUDE_PATH)
+       mark_as_advanced(
+               GLEW_LIBRARY
+               GLEW_INCLUDE_PATH
+       )
 endif()
 
 #-----------------------------------------------------------------------------
@@ -1240,7 +1248,7 @@ endif()
 
 if(WITH_PYTHON_MODULE)
        add_definitions(-DPy_ENABLE_SHARED)
-endif() 
+endif()
 
 #-----------------------------------------------------------------------------
 # Extra compile flags
@@ -1249,7 +1257,7 @@ 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")
-       
+
        # assert() checks for this.
        set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")
        set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -DNDEBUG")
@@ -1399,8 +1407,8 @@ if(FIRST_RUN)
        macro(info_cfg_text
                _text)
                set(_config_msg "${_config_msg}\n\n  ${_text}")
-               
-               
+
+
        endmacro()
 
        info_cfg_text("Build Options:")
index 8a66540..e279249 100644 (file)
@@ -335,14 +335,14 @@ macro(TEST_SSE_SUPPORT)
                        #include <xmmintrin.h>
                        int main() { __m128 v = _mm_setzero_ps(); return 0; }"
                SUPPORT_SSE_BUILD)
-               
+
                if(SUPPORT_SSE_BUILD)
                        message(STATUS "SSE Support: detected.")
                else()
                        message(STATUS "SSE Support: missing.")
                endif()
                set(${SUPPORT_SSE_BUILD} ${SUPPORT_SSE_BUILD} CACHE INTERNAL "SSE Test")
-       endif() 
+       endif()
 
        if(NOT DEFINED ${SUPPORT_SSE2_BUILD})
                check_c_source_runs("
@@ -354,7 +354,7 @@ macro(TEST_SSE_SUPPORT)
                        message(STATUS "SSE2 Support: detected.")
                else()
                        message(STATUS "SSE2 Support: missing.")
-               endif() 
+               endif()
                set(${SUPPORT_SSE2_BUILD} ${SUPPORT_SSE2_BUILD} CACHE INTERNAL "SSE2 Test")
        endif()
 
@@ -493,7 +493,7 @@ endmacro()
 
 
 # hacks to override initial project settings
-# these macros must be called directly before/after project(Blender) 
+# these macros must be called directly before/after project(Blender)
 macro(blender_project_hack_pre)
        # ----------------
        # MINGW HACK START
@@ -535,8 +535,10 @@ macro(blender_project_hack_post)
                # have libs we define and that cmake & scons builds match.
                set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
                set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
-               mark_as_advanced(CMAKE_C_STANDARD_LIBRARIES)
-               mark_as_advanced(CMAKE_CXX_STANDARD_LIBRARIES)
+               mark_as_advanced(
+                       CMAKE_C_STANDARD_LIBRARIES
+                       CMAKE_CXX_STANDARD_LIBRARIES
+               )
        endif()
        unset(_reset_standard_libraries)
 
index 28a621c..86aebe4 100644 (file)
@@ -125,7 +125,7 @@ if(WIN32 AND NOT UNIX)
                        -DBLEN_VER_RC_4=0
                )
        endif()
-       
+
 
        list(APPEND SRC
                ../icons/winblender.rc
@@ -198,16 +198,16 @@ if(WITH_PYTHON_MODULE)
                        LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
                        RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin  # only needed on windows
        )
-       
+
        if(WIN32)
                # python modules use this
                set_target_properties(
                        blender
                        PROPERTIES
                        SUFFIX ".pyd"
-               )       
+               )
        endif()
-       
+
 else()
        add_executable(blender ${EXETYPE} ${SRC})
 endif()
@@ -687,14 +687,14 @@ elseif(APPLE)
                        DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/python)
 
                set(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip")
-                       
+
                add_custom_command(
                        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python
                        COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/python/
                        COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/python/
                        COMMAND unzip -q ${LIBDIR}/release/${PYTHON_ZIP} -d ${CMAKE_CURRENT_BINARY_DIR}/python/
                        DEPENDS ${LIBDIR}/release/${PYTHON_ZIP})
-               
+
                add_dependencies(blender extractpyzip)
 
                # copy extracted python files
@@ -728,7 +728,7 @@ elseif(APPLE)
                        FILES ${PLAYER_SOURCEDIR}/Contents/PkgInfo
                        DESTINATION ${TARGETDIR}/blenderplayer.app/Contents
                )
-       
+
                install_dir(
                        ${PLAYER_SOURCEDIR}/Contents/Resources
                        \${TARGETDIR}/blenderplayer.app/Contents/
@@ -742,7 +742,7 @@ elseif(APPLE)
                                COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/python/
                                COMMAND unzip -q ${LIBDIR}/release/${PYTHON_ZIP} -d ${CMAKE_CURRENT_BINARY_DIR}/python/
                                DEPENDS ${LIBDIR}/release/${PYTHON_ZIP})
-       
+
                        # copy extracted python files
                        install_dir(
                                ${CMAKE_CURRENT_BINARY_DIR}/python
@@ -917,12 +917,12 @@ endif()
                message(STATUS "Blender Skipping: (${REM_MSG})")
        endif()
        target_link_libraries(blender ${BLENDER_SORTED_LIBS})
-       
+
        unset(SEARCHLIB)
        unset(SORTLIB)
        unset(REMLIB)
        unset(REM_MSG)
-       
+
 #else()
 #      target_link_libraries(blender ${BLENDER_LINK_LIBS})
 #endif()