diff options
author | Thomas Dinges <blender@dingto.org> | 2012-08-05 00:25:04 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2012-08-05 00:25:04 +0400 |
commit | ab1badf9a2df33a8d5750c42187100c76703069d (patch) | |
tree | 6760de1283edc789648fcc80fcb945685f545a9d | |
parent | 2044b62370f3e26037699577824201fb684578a1 (diff) |
Windows MSVC libraries:
* Some refactor, use set_lib_path macro again, which simplifies the code a bit.
-rw-r--r-- | CMakeLists.txt | 47 | ||||
-rw-r--r-- | build_files/cmake/macros.cmake | 7 | ||||
-rw-r--r-- | source/creator/CMakeLists.txt | 10 |
3 files changed, 24 insertions, 40 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ea5a0e7484c..83809e2cd00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index bceeb5acc86..b0e6b936ce0 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -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() diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 0a70aa0ddf1..056c6e32ec2 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -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() |