2017-07-10 13:36:14 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2017-07-12 05:55:24 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
message(STATUS "Alembic does not support static linkage. Building dynamically.")
|
|
|
|
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
|
|
|
endif()
|
|
|
|
|
2017-07-10 13:36:14 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO alembic/alembic
|
2018-03-25 14:53:08 +08:00
|
|
|
REF 1.7.7
|
|
|
|
SHA512 0ebcf6b9304e84bc60f1c146d0b5e5c5b1de43974ec0725293c444b48b22640945f5883eb9afd46c1ac9f0c260d6f22ff29b4866d6525c416339877be984b149
|
2017-07-10 13:36:14 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2017-07-27 01:36:27 +08:00
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-07-30 08:19:13 +08:00
|
|
|
PATCHES
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/fix-hdf5link.patch
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/bypass-findhdf5.patch
|
2017-07-27 01:36:27 +08:00
|
|
|
)
|
|
|
|
|
2017-07-10 13:36:14 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-07-30 08:19:13 +08:00
|
|
|
OPTIONS
|
|
|
|
-DUSE_HDF5=ON
|
|
|
|
-DHDF5_ROOT=${CURRENT_INSTALLED_DIR}
|
2017-07-10 13:36:14 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/Alembic")
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
2017-07-10 22:58:52 +08:00
|
|
|
file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
|
|
|
file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
|
|
|
file(REMOVE ${EXE})
|
|
|
|
file(REMOVE ${DEBUG_EXE})
|
2017-07-10 13:36:14 +08:00
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/bin/Alembic.dll)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/Alembic.dll)
|
|
|
|
|
2017-07-18 06:39:20 +08:00
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-debug.cmake DEBUG_CONFIG)
|
|
|
|
string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/Alembic.dll"
|
2017-11-22 09:18:12 +08:00
|
|
|
"\${_IMPORT_PREFIX}/debug/bin/Alembic.dll" DEBUG_CONFIG "${DEBUG_CONFIG}")
|
2017-07-18 06:39:20 +08:00
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-debug.cmake "${DEBUG_CONFIG}")
|
|
|
|
|
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-release.cmake RELEASE_CONFIG)
|
|
|
|
string(REPLACE "\${_IMPORT_PREFIX}/lib/Alembic.dll"
|
2017-11-22 09:18:12 +08:00
|
|
|
"\${_IMPORT_PREFIX}/bin/Alembic.dll" RELEASE_CONFIG "${RELEASE_CONFIG}")
|
2017-07-18 06:39:20 +08:00
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-release.cmake "${RELEASE_CONFIG}")
|
|
|
|
|
2017-07-10 13:36:14 +08:00
|
|
|
# Put the license file where vcpkg expects it
|
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/Alembic/)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/Alembic/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/Alembic/copyright)
|