Cleanup: cmake, indentation, line length
authorCampbell Barton <ideasman42@gmail.com>
Wed, 18 May 2016 01:58:08 +0000 (11:58 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 18 May 2016 01:58:08 +0000 (11:58 +1000)
CMakeLists.txt
source/creator/CMakeLists.txt

index 32c67ba313427a36f3a1c2040673b5f4e2c30162..44a9b687e47a4a7129bec38edae862bcd4bad849 100644 (file)
@@ -519,8 +519,8 @@ if(APPLE)
 
        if(NOT CMAKE_OSX_ARCHITECTURES)
                set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING
-               "Choose the architecture you want to build Blender for: i386, x86_64 or ppc"
-               FORCE)
+                       "Choose the architecture you want to build Blender for: i386, x86_64 or ppc"
+                       FORCE)
        endif()
 
        if(NOT DEFINED OSX_SYSTEM)
@@ -530,15 +530,20 @@ if(APPLE)
                        OUTPUT_STRIP_TRAILING_WHITESPACE)
        endif()
 
-       # workaround for incorrect cmake xcode lookup for developer previews - XCODE_VERSION does not take xcode-select path into accout
-       # but would always look into /Applications/Xcode.app while dev versions are named Xcode<version>-DP<preview_number>
-       execute_process(COMMAND xcode-select --print-path  OUTPUT_VARIABLE XCODE_CHECK OUTPUT_STRIP_TRAILING_WHITESPACE)
+       # workaround for incorrect cmake xcode lookup for developer previews - XCODE_VERSION does not
+       # take xcode-select path into account but would always look  into /Applications/Xcode.app
+       # while dev versions are named Xcode<version>-DP<preview_number>
+       execute_process(
+               COMMAND xcode-select --print-path
+               OUTPUT_VARIABLE XCODE_CHECK OUTPUT_STRIP_TRAILING_WHITESPACE)
        string(REPLACE "/Contents/Developer" "" XCODE_BUNDLE ${XCODE_CHECK}) # truncate to bundlepath in any case
        
        if(${CMAKE_GENERATOR} MATCHES "Xcode")
        
-               if(${XCODE_VERSION} VERSION_GREATER 4.2) # earlier xcode has no bundled developer dir, no sense in getting xcode path from
-                       string(SUBSTRING "${XCODE_CHECK}" 14 6 DP_NAME) # reduce to XCode name without dp extension
+               # earlier xcode has no bundled developer dir, no sense in getting xcode path from
+               if(${XCODE_VERSION} VERSION_GREATER 4.2) 
+                       # reduce to XCode name without dp extension
+                       string(SUBSTRING "${XCODE_CHECK}" 14 6 DP_NAME) 
                        if(${DP_NAME} MATCHES Xcode5)
                                set(XCODE_VERSION 5)
                        endif()
@@ -565,25 +570,30 @@ if(APPLE)
        message(STATUS "Detected OS X ${OSX_SYSTEM} and Xcode ${XCODE_VERSION} at ${XCODE_BUNDLE}")
 
        if(${XCODE_VERSION} VERSION_LESS 4.3)
-               set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE)  # use guaranteed existing sdk
+               # use guaranteed existing sdk
+               set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE)
        else()
-               # note: xcode-select path could be ambigous, cause /Applications/Xcode.app/Contents/Developer or /Applications/Xcode.app would be allowed
+               # note: xcode-select path could be ambigous,
+               # cause /Applications/Xcode.app/Contents/Developer or /Applications/Xcode.app would be allowed
                # so i use a selfcomposed bundlepath here  
                set(OSX_SYSROOT_PREFIX ${XCODE_BUNDLE}/Contents/Developer/Platforms/MacOSX.platform)
                message(STATUS "OSX_SYSROOT_PREFIX: " ${OSX_SYSROOT_PREFIX})
                set(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
                set(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
                if(${CMAKE_GENERATOR} MATCHES "Xcode")
-                       set(CMAKE_XCODE_ATTRIBUTE_SDKROOT macosx${OSX_SYSTEM}) # to silence sdk not found warning, just overrides CMAKE_OSX_SYSROOT
+                       # to silence sdk not found warning, just overrides CMAKE_OSX_SYSROOT
+                       set(CMAKE_XCODE_ATTRIBUTE_SDKROOT macosx${OSX_SYSTEM})
                endif()
        endif()
 
        if(OSX_SYSTEM MATCHES 10.9)
-               set(CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT}) # make sure syslibs and headers are looked up in sdk ( expecially for 10.9 openGL atm. )
+               # make sure syslibs and headers are looked up in sdk ( expecially for 10.9 openGL atm. )
+               set(CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT})
        endif()
 
        if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
-               set(CMAKE_OSX_DEPLOYMENT_TARGET "10.6" CACHE STRING "" FORCE) # 10.6 is our min. target, if you use higher sdk, weak linking happens
+               # 10.6 is our min. target, if you use higher sdk, weak linking happens
+               set(CMAKE_OSX_DEPLOYMENT_TARGET "10.6" CACHE STRING "" FORCE)
        endif()
        
        if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode")
@@ -599,7 +609,10 @@ endif()
 # Check for conflicting/unsupported configurations
 
 if(NOT WITH_BLENDER AND NOT WITH_PLAYER AND NOT WITH_CYCLES_STANDALONE)
-       message(FATAL_ERROR "At least one of WITH_BLENDER or WITH_PLAYER or WITH_CYCLES_STANDALONE must be enabled, nothing to do!")
+       message(FATAL_ERROR
+               "At least one of WITH_BLENDER or WITH_PLAYER or "
+               "WITH_CYCLES_STANDALONE must be enabled, nothing to do!"
+       )
 endif()
 
 if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
@@ -663,7 +676,8 @@ if(NOT WITH_BOOST)
        set_and_warn(WITH_OPENAL         OFF)  # depends on AUDASPACE
        set_and_warn(WITH_GAMEENGINE     OFF)  # depends on AUDASPACE
        set_and_warn(WITH_PLAYER         OFF)  # depends on GAMEENGINE
-elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_AUDASPACE OR WITH_INTERNATIONAL OR WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_MOD_BOOLEAN)
+elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_AUDASPACE OR WITH_INTERNATIONAL OR
+       WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_MOD_BOOLEAN)
        # Keep enabled
 else()
        # New dependency graph needs either Boost or C++11 for function bindings.
@@ -760,18 +774,22 @@ endif()
 
 if(WITH_INTERNATIONAL)
        if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/datafiles/locale/languages")
-               message(WARNING "Translation path '${CMAKE_SOURCE_DIR}/release/datafiles/locale' is missing, "
-                                               "This is a 'git submodule', which are known not to work with bridges to other version "
-                                               "control systems, disabling 'WITH_INTERNATIONAL'.")
+               message(WARNING
+                       "Translation path '${CMAKE_SOURCE_DIR}/release/datafiles/locale' is missing, "
+                       "This is a 'git submodule', which are known not to work with bridges to other version "
+                       "control systems, disabling 'WITH_INTERNATIONAL'."
+               )
                set(WITH_INTERNATIONAL OFF)
        endif()
 endif()
 
 if(WITH_PYTHON)
        if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/scripts/addons/modules")
-               message(WARNING "Addons path '${CMAKE_SOURCE_DIR}/release/scripts/addons' is missing, "
-                                               "This is a 'git submodule', which are known not to work with bridges to other version "
-                                               "control systems: * CONTINUING WITHOUT ADDONS *")
+               message(WARNING
+                       "Addons path '${CMAKE_SOURCE_DIR}/release/scripts/addons' is missing, "
+                       "This is a 'git submodule', which are known not to work with bridges to other version "
+                       "control systems: * CONTINUING WITHOUT ADDONS *"
+               )
        endif()
 endif()
 
@@ -1042,7 +1060,11 @@ if(UNIX AND NOT APPLE)
                        if(${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6")
                                # Note: --whole-archive is needed to force loading of all symbols in liboslexec,
                                # otherwise LLVM is missing the osl_allocate_closure_component function
-                               set(OSL_LIBRARIES ${OSL_OSLCOMP_LIBRARY} -Wl,--whole-archive ${OSL_OSLEXEC_LIBRARY} -Wl,--no-whole-archive ${OSL_OSLQUERY_LIBRARY})
+                               set(OSL_LIBRARIES
+                                       ${OSL_OSLCOMP_LIBRARY}
+                                       -Wl,--whole-archive ${OSL_OSLEXEC_LIBRARY}
+                                       -Wl,--no-whole-archive ${OSL_OSLQUERY_LIBRARY}
+                               )
                        endif()
                else()
                        message(STATUS "OSL not found, disabling it from Cycles")
@@ -1113,7 +1135,13 @@ if(UNIX AND NOT APPLE)
                        set(PUGIXML_LIBRARIES "")
                endif()
 
-               set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES} ${BOOST_LIBRARIES})
+               set(OPENIMAGEIO_LIBRARIES
+                       ${OPENIMAGEIO_LIBRARIES}
+                       ${PNG_LIBRARIES}
+                       ${JPEG_LIBRARIES}
+                       ${ZLIB_LIBRARIES}
+                       ${BOOST_LIBRARIES}
+               )
                set(OPENIMAGEIO_LIBPATH)  # TODO, remove and reference the absolute path everywhere
                set(OPENIMAGEIO_DEFINITIONS "")
 
@@ -1154,7 +1182,9 @@ if(UNIX AND NOT APPLE)
 
        if(WITH_LLVM OR WITH_SDL_DYNLOAD)
                # Fix for conflict with Mesa llvmpipe
-               set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'")
+               set(PLATFORM_LINKFLAGS
+                       "${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'"
+               )
        endif()
 
        if(WITH_OPENSUBDIV)
@@ -1257,7 +1287,10 @@ elseif(WIN32)
                set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
                set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
 
-               list(APPEND PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp)
+               list(APPEND PLATFORM_LINKLIBS
+                       ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32
+                       advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp
+               )
 
                if(WITH_INPUT_IME)
                        list(APPEND PLATFORM_LINKLIBS imm32)
@@ -1295,7 +1328,15 @@ elseif(WIN32)
                set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
                set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MT")
 
-               set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib")
+               set(PLATFORM_LINKFLAGS
+                       "/SUBSYSTEM:CONSOLE "
+                       "/STACK:2097152 "
+                       "/INCREMENTAL:NO "
+                       "/NODEFAULTLIB:msvcrt.lib "
+                       "/NODEFAULTLIB:msvcmrt.lib "
+                       "/NODEFAULTLIB:msvcurt.lib "
+                       "/NODEFAULTLIB:msvcrtd.lib "
+               )
 
                # Ignore meaningless for us linker warnings.
                set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /ignore:4049 /ignore:4217 /ignore:4221")
@@ -1349,9 +1390,9 @@ elseif(WIN32)
                # Add each of our libraries to our cmake_prefix_path so find_package() could work
                file(GLOB children RELATIVE ${LIBDIR} ${LIBDIR}/*)
                foreach(child ${children})
-               if(IS_DIRECTORY ${LIBDIR}/${child})
-                       list(APPEND CMAKE_PREFIX_PATH  ${LIBDIR}/${child})
-               endif()
+                       if(IS_DIRECTORY ${LIBDIR}/${child})
+                               list(APPEND CMAKE_PREFIX_PATH  ${LIBDIR}/${child})
+                       endif()
                endforeach()
 
                set(ZLIB_INCLUDE_DIRS ${LIBDIR}/zlib/include)
@@ -1456,23 +1497,28 @@ elseif(WIN32)
                                set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR}/include/OpenEXR)
                                set(OPENEXR_LIBPATH ${OPENEXR}/lib)
                                set(OPENEXR_LIBRARIES
-                                       optimized ${OPENEXR_LIBPATH}/Iex-2_2.lib debug ${OPENEXR_LIBPATH}/Iex-2_2_d.lib
-                                       optimized ${OPENEXR_LIBPATH}/Half.lib debug ${OPENEXR_LIBPATH}/Half_d.lib
-                                       optimized ${OPENEXR_LIBPATH}/IlmImf-2_2.lib debug ${OPENEXR_LIBPATH}/IlmImf-2_2_d.lib
-                                       optimized ${OPENEXR_LIBPATH}/Imath-2_2.lib debug ${OPENEXR_LIBPATH}/Imath-2_2_d.lib
-                                       optimized ${OPENEXR_LIBPATH}/IlmThread-2_2.lib debug ${OPENEXR_LIBPATH}/IlmThread-2_2_d.lib
+                                       optimized ${OPENEXR_LIBPATH}/Iex-2_2.lib
+                                       optimized ${OPENEXR_LIBPATH}/Half.lib
+                                       optimized ${OPENEXR_LIBPATH}/IlmImf-2_2.lib
+                                       optimized ${OPENEXR_LIBPATH}/Imath-2_2.lib
+                                       optimized ${OPENEXR_LIBPATH}/IlmThread-2_2.lib
+                                       debug ${OPENEXR_LIBPATH}/Iex-2_2_d.lib
+                                       debug ${OPENEXR_LIBPATH}/Half_d.lib
+                                       debug ${OPENEXR_LIBPATH}/IlmImf-2_2_d.lib
+                                       debug ${OPENEXR_LIBPATH}/Imath-2_2_d.lib
+                                       debug ${OPENEXR_LIBPATH}/IlmThread-2_2_d.lib
                                )
                        endif()
                endif()
 
                if(WITH_IMAGE_TIFF)
-               # Try to find tiff first then complain and set static and maybe wrong paths
-               find_package(TIFF)
-               if(NOT TIFF_FOUND)
-                       message(WARNING "Using HARDCODED libtiff locations")
-                       set(TIFF_LIBRARY ${LIBDIR}/tiff/lib/libtiff.lib)
-                       set(TIFF_INCLUDE_DIR ${LIBDIR}/tiff/include)
-               endif()
+                       # Try to find tiff first then complain and set static and maybe wrong paths
+                       find_package(TIFF)
+                       if(NOT TIFF_FOUND)
+                               message(WARNING "Using HARDCODED libtiff locations")
+                               set(TIFF_LIBRARY ${LIBDIR}/tiff/lib/libtiff.lib)
+                               set(TIFF_INCLUDE_DIR ${LIBDIR}/tiff/include)
+                       endif()
                endif()
 
                if(WITH_JACK)
@@ -1527,12 +1573,17 @@ elseif(WIN32)
                                        set(BOOST_DEBUG_POSTFIX "vc140-mt-sgd-1_60.lib")
                                endif()
                                set(BOOST_LIBRARIES
-                                       optimized libboost_date_time-${BOOST_POSTFIX} optimized libboost_filesystem-${BOOST_POSTFIX}
+                                       optimized libboost_date_time-${BOOST_POSTFIX}
+                                       optimized libboost_filesystem-${BOOST_POSTFIX}
                                        optimized libboost_regex-${BOOST_POSTFIX}
-                                       optimized libboost_system-${BOOST_POSTFIX} optimized libboost_thread-${BOOST_POSTFIX}
-                                       debug libboost_date_time-${BOOST_DEBUG_POSTFIX} debug libboost_filesystem-${BOOST_DEBUG_POSTFIX}
+                                       optimized libboost_system-${BOOST_POSTFIX}
+                                       optimized libboost_thread-${BOOST_POSTFIX}
+                                       debug libboost_date_time-${BOOST_DEBUG_POSTFIX}
+                                       debug libboost_filesystem-${BOOST_DEBUG_POSTFIX}
                                        debug libboost_regex-${BOOST_DEBUG_POSTFIX}
-                                       debug libboost_system-${BOOST_DEBUG_POSTFIX} debug libboost_thread-${BOOST_DEBUG_POSTFIX})
+                                       debug libboost_system-${BOOST_DEBUG_POSTFIX}
+                                       debug libboost_thread-${BOOST_DEBUG_POSTFIX}
+                               )
                                if(WITH_CYCLES_OSL)
                                        set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
                                                optimized libboost_wave-${BOOST_POSTFIX}
@@ -1661,7 +1712,8 @@ elseif(WIN32)
                        #endif
                        int main(void) { return 0; }
                        " 
-                       WITH_MINGW64)
+                       WITH_MINGW64
+               )
                
                if(NOT DEFINED LIBDIR)
                        if(WITH_MINGW64)
@@ -1682,7 +1734,10 @@ elseif(WIN32)
                        message(FATAL_ERROR "Windows requires pre-compiled libs at: '${LIBDIR}'")
                endif()
 
-               list(APPEND PLATFORM_LINKLIBS -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi -ldbghelp)
+               list(APPEND PLATFORM_LINKLIBS
+                       -lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32
+                       -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi -ldbghelp
+               )
 
                if(WITH_INPUT_IME)
                        list(APPEND PLATFORM_LINKLIBS -limm32)
@@ -1751,7 +1806,14 @@ elseif(WIN32)
                                ${OPENCOLLADA}/include/opencollada/GeneratedSaxParser
                        )
                        set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib/opencollada)
-                       set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver buffer ftoa xml)
+                       set(OPENCOLLADA_LIBRARIES
+                               OpenCOLLADAStreamWriter
+                               OpenCOLLADASaxFrameworkLoader
+                               OpenCOLLADAFramework
+                               OpenCOLLADABaseUtils
+                               GeneratedSaxParser
+                               UTF MathMLSolver buffer ftoa xml
+                       )
                        set(PCRE_LIBRARIES pcre)
                endif()
 
@@ -1824,12 +1886,14 @@ elseif(WIN32)
                        if(WITH_INTERNATIONAL)
                                set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
                                        optimized boost_locale-${BOOST_POSTFIX}
-                                       debug boost_locale-${BOOST_DEBUG_POSTFIX}) 
+                                       debug boost_locale-${BOOST_DEBUG_POSTFIX}
+                               )
                        endif()
                        if(WITH_CYCLES_OSL)
                                set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
                                        optimized boost_wave-${BOOST_POSTFIX}
-                                       debug boost_wave-${BOOST_DEBUG_POSTFIX}) 
+                                       debug boost_wave-${BOOST_DEBUG_POSTFIX}
+                               )
                        endif()
                        set(BOOST_LIBPATH ${BOOST}/lib)
                        set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB -DBOOST_THREAD_USE_LIB ")
@@ -1938,7 +2002,14 @@ elseif(WIN32)
                find_library(OSL_LIB_EXEC_DEBUG NAMES oslexec_d PATHS ${CYCLES_OSL}/lib)
                find_library(OSL_LIB_COMP_DEBUG NAMES oslcomp_d PATHS ${CYCLES_OSL}/lib)
                find_library(OSL_LIB_QUERY_DEBUG NAMES oslquery_d PATHS ${CYCLES_OSL}/lib)
-               list(APPEND OSL_LIBRARIES optimized ${OSL_LIB_COMP} optimized ${OSL_LIB_EXEC} optimized ${OSL_LIB_QUERY} debug ${OSL_LIB_EXEC_DEBUG} debug ${OSL_LIB_COMP_DEBUG} debug ${OSL_LIB_QUERY_DEBUG})
+               list(APPEND OSL_LIBRARIES
+                       optimized ${OSL_LIB_COMP}
+                       optimized ${OSL_LIB_EXEC}
+                       optimized ${OSL_LIB_QUERY}
+                       debug ${OSL_LIB_EXEC_DEBUG}
+                       debug ${OSL_LIB_COMP_DEBUG}
+                       debug ${OSL_LIB_QUERY_DEBUG}
+               )
                find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
                find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
        
@@ -2011,11 +2082,15 @@ elseif(APPLE)
                        # set(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
                else()
                        # module must be compiled against Python framework
-                       set(PYTHON_INCLUDE_DIR "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/include/python${PYTHON_VERSION}m")
-                       set(PYTHON_EXECUTABLE "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/bin/python${PYTHON_VERSION}m")
+                       set(_py_framework "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}")
+
+                       set(PYTHON_INCLUDE_DIR "${_py_framework}/include/python${PYTHON_VERSION}m")
+                       set(PYTHON_EXECUTABLE "${_py_framework}/bin/python${PYTHON_VERSION}m")
+                       set(PYTHON_LIBPATH "${_py_framework}/lib/python${PYTHON_VERSION}/config-${PYTHON_VERSION}m")
                        #set(PYTHON_LIBRARY python${PYTHON_VERSION})
-                       set(PYTHON_LIBPATH "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config-${PYTHON_VERSION}m")
                        #set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python")  # won't  build with this enabled
+
+                       unset(_py_framework)
                endif()
                
                # uncached vars
@@ -2057,7 +2132,10 @@ elseif(APPLE)
        if(WITH_CODEC_FFMPEG)
                set(FFMPEG ${LIBDIR}/ffmpeg)
                set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
-               set(FFMPEG_LIBRARIES avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg)
+               set(FFMPEG_LIBRARIES
+                       avcodec avdevice avformat avutil
+                       mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg
+               )
                set(FFMPEG_LIBPATH ${FFMPEG}/lib)
        endif()
 
@@ -2072,7 +2150,17 @@ elseif(APPLE)
        endif()
 
        set(PLATFORM_CFLAGS "-pipe -funsigned-char")
-       set(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio")
+       set(PLATFORM_LINKFLAGS
+               "-fexceptions -framework CoreServices "
+               "-framework Foundation "
+               "-framework IOKit "
+               "-framework AppKit "
+               "-framework Cocoa "
+               "-framework Carbon "
+               "-framework AudioUnit "
+               "-framework AudioToolbox "
+               "-framework CoreAudio "
+       )
        if(WITH_CODEC_QUICKTIME)
                set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QTKit")
                if(CMAKE_OSX_ARCHITECTURES MATCHES i386)
@@ -2110,7 +2198,8 @@ elseif(APPLE)
        endif()
        
        if(WITH_PYTHON_MODULE OR WITH_PYTHON_FRAMEWORK)
-               set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/Python")# force cmake to link right framework
+               # force cmake to link right framework
+               set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/Python")
        endif()
        
        if(WITH_OPENCOLLADA)
@@ -2125,10 +2214,18 @@ elseif(APPLE)
                )
 
                set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-               set(OPENCOLLADA_LIBRARIES "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lxml2 -lbuffer -lftoa")
+               set(OPENCOLLADA_LIBRARIES
+                       OpenCOLLADASaxFrameworkLoader
+                       -lOpenCOLLADAFramework
+                       -lOpenCOLLADABaseUtils
+                       -lOpenCOLLADAStreamWriter
+                       -lMathMLSolver
+                       -lGeneratedSaxParser
+                       -lxml2 -lbuffer -lftoa
+               )
                # Use UTF functions from collada if LLVM is not enabled
                if(NOT WITH_LLVM)
-                       set(OPENCOLLADA_LIBRARIES "${OPENCOLLADA_LIBRARIES} -lUTF")
+                       list(APPEND OPENCOLLADA_LIBRARIES -lUTF)
                endif()
                # pcre is bundled with openCollada
                #set(PCRE ${LIBDIR}/pcre)
@@ -2170,7 +2267,14 @@ elseif(APPLE)
        if(WITH_BOOST)
                set(BOOST ${LIBDIR}/boost)
                set(BOOST_INCLUDE_DIR ${BOOST}/include)
-               set(BOOST_LIBRARIES boost_date_time-mt boost_filesystem-mt boost_regex-mt boost_system-mt boost_thread-mt boost_wave-mt)
+               set(BOOST_LIBRARIES
+                       boost_date_time-mt
+                       boost_filesystem-mt
+                       boost_regex-mt
+                       boost_system-mt
+                       boost_thread-mt
+                       boost_wave-mt
+               )
                if(WITH_INTERNATIONAL)
                        list(APPEND BOOST_LIBRARIES boost_locale-mt)
                endif()
@@ -2191,8 +2295,22 @@ elseif(APPLE)
        if(WITH_OPENIMAGEIO)
                set(OPENIMAGEIO ${LIBDIR}/openimageio)
                set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
-               set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO}/lib/libOpenImageIO.a ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARY} ${OPENEXR_LIBRARIES} ${ZLIB_LIBRARIES})
-               set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib ${JPEG_LIBPATH} ${PNG_LIBPATH} ${TIFF_LIBPATH} ${OPENEXR_LIBPATH} ${ZLIB_LIBPATH})
+               set(OPENIMAGEIO_LIBRARIES
+                       ${OPENIMAGEIO}/lib/libOpenImageIO.a
+                       ${PNG_LIBRARIES}
+                       ${JPEG_LIBRARIES}
+                       ${TIFF_LIBRARY}
+                       ${OPENEXR_LIBRARIES}
+                       ${ZLIB_LIBRARIES}
+               )
+               set(OPENIMAGEIO_LIBPATH
+                       ${OPENIMAGEIO}/lib
+                       ${JPEG_LIBPATH}
+                       ${PNG_LIBPATH}
+                       ${TIFF_LIBPATH}
+                       ${OPENEXR_LIBPATH}
+                       ${ZLIB_LIBPATH}
+               )
                set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
                set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
        endif()
@@ -2285,8 +2403,14 @@ elseif(APPLE)
                                include_directories(${LIBDIR}/openmp/include)
                                link_directories(${LIBDIR}/openmp/lib)
                                # This is a workaround for our helperbinaries ( datatoc, masgfmt, ... ),
-                               # They are linked also to omp lib, so we need it in builddir for runtime exexcution, TODO: remove all unneeded dependencies from these
-                               execute_process(COMMAND ditto -arch ${CMAKE_OSX_ARCHITECTURES} ${LIBDIR}/openmp/lib/libiomp5.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libiomp5.dylib) # for intermediate binaries, in respect to lib ID
+                               # They are linked also to omp lib, so we need it in builddir for runtime exexcution,
+                               # TODO: remove all unneeded dependencies from these
+
+                               # for intermediate binaries, in respect to lib ID
+                               execute_process(
+                                       COMMAND ditto -arch ${CMAKE_OSX_ARCHITECTURES}
+                                       ${LIBDIR}/openmp/lib/libiomp5.dylib
+                                       ${CMAKE_BINARY_DIR}/Resources/lib/libiomp5.dylib)
                        endif()
                endif()
        endif()
@@ -2312,7 +2436,10 @@ elseif(APPLE)
                set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=1024")
        endif()
        # Get rid of eventually clashes, we export some symbols explicite as local
-       set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker ${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map")
+       set(PLATFORM_LINKFLAGS
+               "${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list "
+               "-Xlinker ${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map"
+       )
 
        if(WITH_CXX11)
                set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
@@ -2335,22 +2462,34 @@ endif()
 
 if(WITH_CYCLES)
        if(NOT WITH_OPENIMAGEIO)
-               message(FATAL_ERROR "Cycles requires WITH_OPENIMAGEIO, the library may not have been found. Configure OIIO or disable WITH_CYCLES")
+               message(FATAL_ERROR
+                       "Cycles requires WITH_OPENIMAGEIO, the library may not have been found. "
+                       "Configure OIIO or disable WITH_CYCLES"
+               )
        endif()
        if(NOT WITH_BOOST)
-               message(FATAL_ERROR "Cycles requires WITH_BOOST, the library may not have been found. Configure BOOST or disable WITH_CYCLES")
+               message(FATAL_ERROR
+                       "Cycles requires WITH_BOOST, the library may not have been found. "
+                       "Configure BOOST or disable WITH_CYCLES"
+               )
        endif()
 
        if(WITH_CYCLES_OSL)
                if(NOT WITH_LLVM)
-                       message(FATAL_ERROR "Cycles OSL requires WITH_LLVM, the library may not have been found. Configure LLVM or disable WITH_CYCLES_OSL")
+                       message(FATAL_ERROR
+                               "Cycles OSL requires WITH_LLVM, the library may not have been found. "
+                               "Configure LLVM or disable WITH_CYCLES_OSL"
+                       )
                endif()
        endif()
 endif()
 
 if(WITH_INTERNATIONAL)
        if(NOT WITH_BOOST)
-               message(FATAL_ERROR "Internationalization requires WITH_BOOST, the library may not have been found. Configure BOOST or disable WITH_INTERNATIONAL")
+               message(FATAL_ERROR
+                       "Internationalization requires WITH_BOOST, the library may not have been found. "
+                       "Configure BOOST or disable WITH_INTERNATIONAL"
+               )
        endif()
 endif()
 
@@ -2436,7 +2575,10 @@ if(WITH_GL_PROFILE_COMPAT OR WITH_GL_PROFILE_CORE)
 elseif(WITH_GL_PROFILE_ES20)
        if(WITH_SYSTEM_GLES)
                if(NOT OPENGLES_LIBRARY)
-                       message(FATAL_ERROR "Unable to find OpenGL ES libraries.  Install them or disable WITH_SYSTEM_GLES.")
+                       message(FATAL_ERROR
+                               "Unable to find OpenGL ES libraries. "
+                               "Install them or disable WITH_SYSTEM_GLES."
+                       )
                endif()
 
                list(APPEND BLENDER_GL_LIBRARIES OPENGLES_LIBRARY)
@@ -2448,7 +2590,10 @@ elseif(WITH_GL_PROFILE_ES20)
                list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}")
 
                if(NOT OPENGLES_LIBRARY)
-                       message(FATAL_ERROR "To compile WITH_GL_EGL you need to set OPENGLES_LIBRARY to the file path of an OpenGL ES 2.0 library.")
+                       message(FATAL_ERROR
+                               "To compile WITH_GL_EGL you need to set OPENGLES_LIBRARY "
+                               "to the file path of an OpenGL ES 2.0 library."
+                       )
                endif()
 
        endif()
@@ -2460,7 +2605,10 @@ elseif(WITH_GL_PROFILE_ES20)
                mark_as_advanced(OPENGLES_DLL)
 
                if(NOT OPENGLES_DLL)
-                       message(FATAL_ERROR "To compile WITH_GL_PROFILE_ES20 you need to set OPENGLES_DLL to the file path of an OpenGL ES 2.0 runtime dynamic link library (DLL).")
+                       message(FATAL_ERROR
+                               "To compile WITH_GL_PROFILE_ES20 you need to set OPENGLES_DLL to the file "
+                               "path of an OpenGL ES 2.0 runtime dynamic link library (DLL)."
+                       )
                endif()
 
                if(WITH_GL_ANGLE)
@@ -2474,7 +2622,10 @@ elseif(WITH_GL_PROFILE_ES20)
                        mark_as_advanced(D3DCOMPILER_DLL)
 
                        if(D3DCOMPILER_DLL STREQUAL "")
-                               message(FATAL_ERROR "To compile WITH_GL_ANGLE you need to set D3DCOMPILER_DLL to the file path of a copy of the DirectX redistributable DLL file: D3DCompiler_46.dll")
+                               message(FATAL_ERROR
+                                       "To compile WITH_GL_ANGLE you need to set D3DCOMPILER_DLL to the file "
+                                       "path of a copy of the DirectX redistributable DLL file: D3DCompiler_46.dll"
+                               )
                        endif()
 
                endif()
@@ -2488,7 +2639,10 @@ if(WITH_GL_EGL)
 
        if(WITH_SYSTEM_GLES)
                if(NOT OPENGLES_EGL_LIBRARY)
-                       message(FATAL_ERROR "Unable to find OpenGL ES libraries.  Install them or disable WITH_SYSTEM_GLES.")
+                       message(FATAL_ERROR
+                               "Unable to find OpenGL ES libraries. "
+                               "Install them or disable WITH_SYSTEM_GLES."
+                       )
                endif()
 
                list(APPEND BLENDER_GL_LIBRARIES OPENGLES_EGL_LIBRARY)
@@ -2500,7 +2654,10 @@ if(WITH_GL_EGL)
                list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}" "${OPENGLES_EGL_LIBRARY}")
 
                if(NOT OPENGLES_EGL_LIBRARY)
-                       message(FATAL_ERROR "To compile WITH_GL_EGL you need to set OPENGLES_EGL_LIBRARY to the file path of an EGL library.")
+                       message(FATAL_ERROR
+                               "To compile WITH_GL_EGL you need to set OPENGLES_EGL_LIBRARY "
+                               "to the file path of an EGL library."
+                       )
                endif()
 
        endif()
@@ -2512,7 +2669,10 @@ if(WITH_GL_EGL)
                mark_as_advanced(OPENGLES_EGL_DLL)
 
                if(NOT OPENGLES_EGL_DLL)
-                       message(FATAL_ERROR "To compile WITH_GL_EGL you need to set OPENGLES_EGL_DLL to the file path of an EGL runtime dynamic link library (DLL).")
+                       message(FATAL_ERROR
+                               "To compile WITH_GL_EGL you need to set OPENGLES_EGL_DLL "
+                               "to the file path of an EGL runtime dynamic link library (DLL)."
+                       )
                endif()
 
        endif()
@@ -2894,10 +3054,12 @@ endif()
 # be most problematic.
 if(WITH_PYTHON)
        if(NOT EXISTS "${PYTHON_INCLUDE_DIR}/Python.h")
-               message(FATAL_ERROR "Missing: \"${PYTHON_INCLUDE_DIR}/Python.h\",\n"
-                                                       "Set the cache entry 'PYTHON_INCLUDE_DIR' to point "
-                                                       "to a valid python include path. Containing "
-                                                       "Python.h for python version \"${PYTHON_VERSION}\"")
+               message(FATAL_ERROR
+                       "Missing: \"${PYTHON_INCLUDE_DIR}/Python.h\",\n"
+                       "Set the cache entry 'PYTHON_INCLUDE_DIR' to point "
+                       "to a valid python include path. Containing "
+                       "Python.h for python version \"${PYTHON_VERSION}\""
+               )
        endif()
 
        if(WIN32 OR APPLE)
@@ -3035,7 +3197,7 @@ if(FIRST_RUN)
                string(LENGTH "${_msg}" _len)
                while("32" GREATER "${_len}")
                        set(_msg "${_msg} ")
-                        math(EXPR _len "${_len} + 1")
+                       math(EXPR _len "${_len} + 1")
                endwhile()
 
                set(_config_msg "${_config_msg}\n${_msg}${${_setting}}" PARENT_SCOPE)
index daba01e33c728b8a66735a9df70e116c5b5984e1..e3cbfbf838bdb8efa851fd7cb19e60b20fd0d251 100644 (file)
@@ -408,7 +408,8 @@ if("${CMAKE_GENERATOR}" MATCHES ".*Makefiles.*")
        # message after building.
        add_custom_command(
                TARGET blender POST_BUILD MAIN_DEPENDENCY blender
-               COMMAND ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime files and scripts to ${TARGETDIR_VER}'
+               COMMAND ${CMAKE_COMMAND} -E
+                       echo 'now run: \"make install\" to copy runtime files and scripts to ${TARGETDIR_VER}'
        )
 endif()
 
@@ -556,9 +557,6 @@ if(UNIX AND NOT APPLE)
                        )
                        unset(_py_inc_suffix)
 
-                       # # doesnt work, todo
-                       # install(CODE "execute_process(COMMAND find ${CMAKE_INSTALL_PREFIX}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
-
                        if(WITH_PYTHON_INSTALL_NUMPY)
                                # Install to the same directory as the source, so debian-like
                                # distros are happy with their policy.
@@ -576,7 +574,7 @@ if(UNIX AND NOT APPLE)
                                        PATTERN "oldnumeric" EXCLUDE            # ./oldnumeric
                                        PATTERN "doc" EXCLUDE                   # ./doc
                                        PATTERN "tests" EXCLUDE                 # ./tests
-                                       PATTERN "f2py" EXCLUDE                  # ./f2py - fortran/python interface code, not fun for blender devs.
+                                       PATTERN "f2py" EXCLUDE                  # ./f2py - fortran/python interface code, not for blender.
                                        PATTERN "include" EXCLUDE               # include dirs all over, we wont use NumPy/CAPI
                                        PATTERN "*.h" EXCLUDE                   # some includes are not in include dirs
                                        PATTERN "*.a" EXCLUDE                   # ./core/lib/libnpymath.a - for linking, we dont need.
@@ -617,7 +615,7 @@ if(UNIX AND NOT APPLE)
                                                FILES ${PYTHON_REQUESTS_PATH}/six.py
                                                DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}/python${PYTHON_VERSION}/${_suffix}
                                        )
-                                       endif()
+                               endif()
                                unset(_requests_dep)
                                unset(_requests_deps)
                                unset(_suffix)
@@ -695,16 +693,26 @@ elseif(WIN32)
 
                        if(WITH_PYTHON_INSTALL_NUMPY)
                                add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages
-                                       COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages)
-
-                               add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy
-                                       COMMAND ${CMAKE_COMMAND} -E tar xzvf "${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}_numpy_1.9.tar.gz"
-                                       DEPENDS ${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}_numpy_1.9.tar.gz
+                                       COMMAND ${CMAKE_COMMAND} -E
+                                               make_directory ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages)
+
+                               add_custom_command(
+                                       OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy
+                                       COMMAND ${CMAKE_COMMAND} -E
+                                               tar xzvf "${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}_numpy_1.9.tar.gz"
+                                       DEPENDS
+                                               ${LIBDIR}/release/python${_PYTHON_VERSION_NO_DOTS}_numpy_1.9.tar.gz
                                                ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages
-                                       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages)
-                               add_custom_target(python_numpy ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy)
-                               install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy
-                                               DESTINATION ${BLENDER_VERSION}/python/lib/site-packages)
+                                       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages
+                               )
+                               add_custom_target(
+                                       python_numpy ALL
+                                       DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy
+                               )
+                               install(
+                                       DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages/numpy
+                                       DESTINATION ${BLENDER_VERSION}/python/lib/site-packages
+                               )
                        endif()
 
 
@@ -923,7 +931,8 @@ elseif(APPLE)
        OUTPUT_STRIP_TRAILING_WHITESPACE)
 
        # Give the bundle actual creation/modification date
-       execute_process(COMMAND SetFile -d ${SETFILE_DATE} -m ${SETFILE_DATE} ${EXECUTABLE_OUTPUT_PATH}/blender.app)
+       execute_process(COMMAND SetFile -d ${SETFILE_DATE} -m ${SETFILE_DATE}
+                       ${EXECUTABLE_OUTPUT_PATH}/blender.app)
 
        install(
                TARGETS blender
@@ -1025,7 +1034,8 @@ elseif(APPLE)
                )
 
                # Give the bundle actual creation/modification date
-               execute_process(COMMAND SetFile -d ${SETFILE_DATE} -m ${SETFILE_DATE} ${EXECUTABLE_OUTPUT_PATH}/blenderplayer.app)
+               execute_process(COMMAND SetFile -d ${SETFILE_DATE} -m ${SETFILE_DATE}
+                               ${EXECUTABLE_OUTPUT_PATH}/blenderplayer.app)
 
                install(
                        FILES ${OSX_APP_PLAYER_SOURCEDIR}/Contents/PkgInfo
@@ -1038,10 +1048,10 @@ elseif(APPLE)
                )
 
                if(WITH_OPENMP AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
-               install(
-               FILES ${LIBDIR}/openmp/lib/libiomp5.dylib
-               DESTINATION blenderplayer.app/Contents/Resources/lib/
-               )
+                       install(
+                               FILES ${LIBDIR}/openmp/lib/libiomp5.dylib
+                               DESTINATION blenderplayer.app/Contents/Resources/lib/
+                       )
                endif()
 
 
@@ -1112,9 +1122,11 @@ setup_liblinks(blender)
 # Setup launcher
 
 if(WIN32 AND NOT WITH_PYTHON_MODULE)
-       install(TARGETS blender
-                       COMPONENT Blender
-                       DESTINATION ".")
+       install(
+               TARGETS blender
+               COMPONENT Blender
+               DESTINATION "."
+       )
 
        if(MSVC12_REDIST_DIR)
                if(CMAKE_CL_64)
@@ -1123,13 +1135,16 @@ if(WIN32 AND NOT WITH_PYTHON_MODULE)
                        set(_WIN_PLATFORM x86)
                endif()
                install(
-                       FILES ${MSVC12_REDIST_DIR}/${_WIN_PLATFORM}/Microsoft.VC120.CRT/msvcp120.dll
-                                 ${MSVC12_REDIST_DIR}/${_WIN_PLATFORM}/Microsoft.VC120.CRT/msvcr120.dll
-               DESTINATION ".")
+                       FILES
+                               ${MSVC12_REDIST_DIR}/${_WIN_PLATFORM}/Microsoft.VC120.CRT/msvcp120.dll
+                               ${MSVC12_REDIST_DIR}/${_WIN_PLATFORM}/Microsoft.VC120.CRT/msvcr120.dll
+                       DESTINATION "."
+               )
                if(WITH_OPENMP)
                        install(
                                FILES ${MSVC12_REDIST_DIR}/${_WIN_PLATFORM}/Microsoft.VC120.OpenMP/vcomp120.dll
-                               DESTINATION ".")
+                               DESTINATION "."
+                       )
                endif()
        endif()
 endif()