Cmake / Windows Libraries:
authorThomas Dinges <blender@dingto.org>
Sat, 4 Aug 2012 12:43:45 +0000 (12:43 +0000)
committerThomas Dinges <blender@dingto.org>
Sat, 4 Aug 2012 12:43:45 +0000 (12:43 +0000)
* Some more fixes for OpenEXR, works now (tested with cv2008 x64 and x32)
* Some more changes to have libs in lib/win*/libname/vc2010 folder. Commit to libs itself to change that will follow.

CMakeLists.txt

index eb29df7d341d88ce09071dba16dc53b4fe8c8d22..ea5a0e7484c1315bdcb7489e6811d89af8b0a6b0 100644 (file)
@@ -853,7 +853,7 @@ elseif(WIN32)
                if(WITH_MOD_CLOTH_ELTOPO)
                        set(LAPACK ${LIBDIR}/lapack)
                        # set(LAPACK_INCLUDE_DIR ${LAPACK}/include)
-                       set_lib_path(LAPACK_LIBPATH ${LAPACK}/lib)      
+                       set(LAPACK_LIBPATH ${LAPACK}/lib)       
                        set(LAPACK_LIBRARIES
                                ${LIBDIR}/lapack/lib/libf2c.lib
                                ${LIBDIR}/lapack/lib/clapack_nowrap.lib
@@ -893,6 +893,7 @@ elseif(WIN32)
                endif()
 
                if(WITH_OPENCOLLADA)
+                       set(OPENCOLLADA ${LIBDIR}/opencollada)
 
                        set(OPENCOLLADA_INCLUDE_DIRS
                                ${LIBDIR}/opencollada/include/COLLADAStreamWriter/include
@@ -901,8 +902,11 @@ elseif(WIN32)
                                ${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader/include
                                ${LIBDIR}/opencollada/include/GeneratedSaxParser/include
                        )
-                       
-                       set_lib_path(OPENCOLLADA_LIBPATH "opencollada/lib")
+                       if(MSVC2010)
+                               set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/vc2010/lib)
+                       else()
+                               set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
+                       endif()
 
                        set(OPENCOLLADA_LIBRARIES
                                ${OPENCOLLADA_LIBPATH}/OpenCOLLADASaxFrameworkLoader.lib
@@ -939,17 +943,27 @@ elseif(WIN32)
                endif()
 
                if(WITH_IMAGE_OPENEXR)
+                       set(OPENEXR ${LIBDIR}/openexr)
                        if(MSVC10)
-                               set(OPENEXR ${LIBDIR}/openexr)
-                               set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/vc2010/include)
-                               set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
+                               set(OPENEXR_INCLUDE_DIR ${OPENEXR}/vc2010/include)
                                set(OPENEXR_LIBPATH ${OPENEXR}/vc2010/lib)
                        else()
-                               set(OPENEXR ${LIBDIR}/openexr)
-                               set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include)
-                               set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
+                               set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
                                set(OPENEXR_LIBPATH ${OPENEXR}/lib)
                        endif()
+                       set(OPENEXR_LIBRARIES
+                               ${OPENEXR_LIBPATH}/Iex.lib
+                               ${OPENEXR_LIBPATH}/Half.lib
+                               ${OPENEXR_LIBPATH}/IlmImf.lib
+                               ${OPENEXR_LIBPATH}/Imath.lib
+                               ${OPENEXR_LIBPATH}/IlmThread.lib
+                       )
+                       set(OPENEXR_INCLUDE_DIRS
+                               ${OPENEXR_INCLUDE_DIR}
+                               ${OPENEXR_INCLUDE_DIR}/IlmImf
+                               ${OPENEXR_INCLUDE_DIR}/Iex
+                               ${OPENEXR_INCLUDE_DIR}/Imath
+                       )
                endif()
 
                if(WITH_IMAGE_TIFF)
@@ -968,8 +982,13 @@ elseif(WIN32)
                if(WITH_PYTHON)
                        # normally cached but not since we include them with blender
                        set(PYTHON_VERSION 3.2) # CACHE STRING)
-                       set_lib_path(PYTHON_INCLUDE_DIR "python/include/python${PYTHON_VERSION}")
-                       set_lib_path(PYTHON_LIBRARY "python/lib/python32.lib") #CACHE FILEPATH)
+                       set(PYTHON ${LIBDIR}/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()
                        
                        # uncached vars
                        set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
@@ -1000,7 +1019,7 @@ elseif(WIN32)
                        set(OPENIMAGEIO ${LIBDIR}/openimageio)
                        set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
                        set(OPENIMAGEIO_LIBRARIES OpenImageIO)
-                       set_lib_path(OPENIMAGEIO_LIBPATH "openimageio/lib")
+                       set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
                        set(OPENIMAGEIO_DEFINITIONS)
                endif()