Windows MSVC libraries:
authorThomas Dinges <blender@dingto.org>
Sat, 4 Aug 2012 20:25:04 +0000 (20:25 +0000)
committerThomas Dinges <blender@dingto.org>
Sat, 4 Aug 2012 20:25:04 +0000 (20:25 +0000)
* Some refactor, use set_lib_path macro again, which simplifies the code a bit.

CMakeLists.txt
build_files/cmake/macros.cmake
source/creator/CMakeLists.txt

index ea5a0e7484c1315bdcb7489e6811d89af8b0a6b0..83809e2cd002e043719b62ead2a79dcf0b6a1f8a 100644 (file)
@@ -902,26 +902,22 @@ elseif(WIN32)
                                ${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader/include
                                ${LIBDIR}/opencollada/include/GeneratedSaxParser/include
                        )
-                       if(MSVC2010)
-                               set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/vc2010/lib)
-                       else()
-                               set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-                       endif()
+                       set_lib_path(OPENCOLLADA_LIBPATH "opencollada")
 
                        set(OPENCOLLADA_LIBRARIES
-                               ${OPENCOLLADA_LIBPATH}/OpenCOLLADASaxFrameworkLoader.lib
-                               ${OPENCOLLADA_LIBPATH}/OpenCOLLADAFramework.lib
-                               ${OPENCOLLADA_LIBPATH}/OpenCOLLADABaseUtils.lib
-                               ${OPENCOLLADA_LIBPATH}/OpenCOLLADAStreamWriter.lib
-                               ${OPENCOLLADA_LIBPATH}/MathMLSolver.lib
-                               ${OPENCOLLADA_LIBPATH}/GeneratedSaxParser.lib
-                               ${OPENCOLLADA_LIBPATH}/xml2.lib
-                               ${OPENCOLLADA_LIBPATH}/buffer.lib
-                               ${OPENCOLLADA_LIBPATH}/ftoa.lib
-                               ${OPENCOLLADA_LIBPATH}/UTF.lib
+                               ${OPENCOLLADA_LIBPATH}/lib/OpenCOLLADASaxFrameworkLoader.lib
+                               ${OPENCOLLADA_LIBPATH}/lib/OpenCOLLADAFramework.lib
+                               ${OPENCOLLADA_LIBPATH}/lib/OpenCOLLADABaseUtils.lib
+                               ${OPENCOLLADA_LIBPATH}/lib/OpenCOLLADAStreamWriter.lib
+                               ${OPENCOLLADA_LIBPATH}/lib/MathMLSolver.lib
+                               ${OPENCOLLADA_LIBPATH}/lib/GeneratedSaxParser.lib
+                               ${OPENCOLLADA_LIBPATH}/lib/xml2.lib
+                               ${OPENCOLLADA_LIBPATH}/lib/buffer.lib
+                               ${OPENCOLLADA_LIBPATH}/lib/ftoa.lib
+                               ${OPENCOLLADA_LIBPATH}/lib/UTF.lib
                        )
                        set(PCRE_LIBRARIES
-                               ${OPENCOLLADA_LIBPATH}/pcre.lib
+                               ${OPENCOLLADA_LIBPATH}/lib/pcre.lib
                        )
                        
                        unset(OPENCOLLADA_LIBPATH)
@@ -943,14 +939,9 @@ elseif(WIN32)
                endif()
 
                if(WITH_IMAGE_OPENEXR)
-                       set(OPENEXR ${LIBDIR}/openexr)
-                       if(MSVC10)
-                               set(OPENEXR_INCLUDE_DIR ${OPENEXR}/vc2010/include)
-                               set(OPENEXR_LIBPATH ${OPENEXR}/vc2010/lib)
-                       else()
-                               set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
-                               set(OPENEXR_LIBPATH ${OPENEXR}/lib)
-                       endif()
+                       set_lib_path(OPENEXR "openexr")
+                       set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
+                       set(OPENEXR_LIBPATH ${OPENEXR}/lib)
                        set(OPENEXR_LIBRARIES
                                ${OPENEXR_LIBPATH}/Iex.lib
                                ${OPENEXR_LIBPATH}/Half.lib
@@ -982,13 +973,9 @@ elseif(WIN32)
                if(WITH_PYTHON)
                        # normally cached but not since we include them with blender
                        set(PYTHON_VERSION 3.2) # CACHE STRING)
-                       set(PYTHON ${LIBDIR}/python)
+                       set_lib_path(PYTHON "python")
                        set(PYTHON_INCLUDE_DIR ${PYTHON}/include/python${PYTHON_VERSION})
-                       if(MSVC10)
-                               set(PYTHON_LIBRARY ${PYTHON}/vc2010/lib/python32.lib) #CACHE FILEPATH
-                       else()
-                               set(PYTHON_LIBRARY ${PYTHON}/lib/python32.lib) #CACHE FILEPATH
-                       endif()
+                       set(PYTHON_LIBRARY ${PYTHON}/lib/python32.lib) #CACHE FILEPATH
                        
                        # uncached vars
                        set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
index bceeb5acc8668d819e9c2e1f9cd5ef14e5a9d593..b0e6b936ce0c50c6f5cc3c0b71615c244f13adfb 100644 (file)
@@ -719,12 +719,9 @@ macro(set_lib_path
                lvar
                lproj)
 
-       
-       if(MSVC10 AND EXISTS ${LIBDIR}/vc2010/${lproj})
-               set(${lvar} ${LIBDIR}/vc2010/${lproj})
+       if(MSVC10)
+               set(${lvar} ${LIBDIR}/${lproj}/vc2010)
        else()
                set(${lvar} ${LIBDIR}/${lproj})
        endif()
-
-
 endmacro()
index 0a70aa0ddf1ef3b43fede41a36942a7a6cccb1c7..056c6e32ec2a09bca53e8d0d54ae80a907579f1a 100644 (file)
@@ -475,15 +475,15 @@ elseif(WIN32)
        endif()
 
        if(WITH_PYTHON)
-               set_lib_path(PYLIB "python/lib")
+               set_lib_path(PYLIB "python")
                install(
-                       FILES ${PYLIB}/python32.dll
+                       FILES ${PYLIB}/lib/python32.dll
                        DESTINATION ${TARGETDIR}
                        CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
                )
 
                install(
-                       FILES ${PYLIB}/python32_d.dll
+                       FILES ${PYLIB}/lib/python32_d.dll
                        DESTINATION ${TARGETDIR}
                        CONFIGURATIONS Debug
                )
@@ -627,10 +627,10 @@ elseif(WIN32)
 
        if(WITH_OPENIMAGEIO)
                if(NOT MINGW)
-                       set_lib_path(OIIOBIN "openimageio/bin")
+                       set_lib_path(OIIOBIN "openimageio")
                        install(
                                FILES
-                                       ${OIIOBIN}/OpenImageIO.dll
+                                       ${OIIOBIN}/bin/OpenImageIO.dll
                                DESTINATION ${TARGETDIR}
                        )
                endif()