CMake: Use proper way to define debug/release libraries for alembic
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 9 Aug 2016 10:29:59 +0000 (12:29 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 9 Aug 2016 10:38:09 +0000 (12:38 +0200)
Please do not spread platform+library specific code all over the CMake file,
we already have sections dedicated to that.

CMakeLists.txt

index 01ca0d014b4da7657c4ae66d0dffd0416976790e..c77975d3b9451a941183b48d1961dad616617d68 100644 (file)
@@ -1683,18 +1683,11 @@ elseif(WIN32)
                endif()
 
                if(WITH_ALEMBIC)
-                       set(ALEMBIC_ROOT_DIR ${LIBDIR}/alembic)
-                       find_package(Alembic)
-
-                       if(WITH_ALEMBIC_HDF5)
-                               set(HDF5_ROOT_DIR ${LIBDIR}/hdf5)
-                               find_package(HDF5)
-                       endif()
-
-                       if(NOT ALEMBIC_FOUND OR (WITH_ALEMBIC_HDF5 AND NOT HDF5_FOUND))
-                               set(WITH_ALEMBIC OFF)
-                               set(WITH_ALEMBIC_HDF5 OFF)
-                       endif()
+                       set(ALEMBIC ${LIBDIR}/alembic)
+                       set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
+                       set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
+                       set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
+                       set(ALEMBIC_LIBRARIES optimized alembic debug alembic_d)
                endif()
 
                if(WITH_MOD_CLOTH_ELTOPO)
@@ -2575,17 +2568,6 @@ else()
        endif()
        unset(_SYSTEM_BIG_ENDIAN)
 endif()
-if(MSVC)
-       if(WITH_ALEMBIC)
-               set(ALEMBIC ${LIBDIR}/alembic)
-               set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
-               set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
-               set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
-               set(ALEMBIC_LIBRARIES
-                       optimized ${ALEMBIC_LIBPATH}/alembic.lib
-                       debug ${ALEMBIC_LIBPATH}/alembic_d.lib)
-       endif(WITH_ALEMBIC)
-endif(MSVC)
 if(WITH_IMAGE_OPENJPEG)
        if(WITH_SYSTEM_OPENJPEG)
                # dealt with above