aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
Diffstat (limited to 'ports')
-rw-r--r--ports/alembic/CONTROL2
-rw-r--r--ports/alembic/portfile.cmake60
2 files changed, 40 insertions, 22 deletions
diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL
index c55df2df9..54442f2e4 100644
--- a/ports/alembic/CONTROL
+++ b/ports/alembic/CONTROL
@@ -1,5 +1,5 @@
Source: alembic
-Version: 1.7.12
+Version: 1.7.12-1
Build-Depends: ilmbase, hdf5
Description: Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications.
Homepage: https://alembic.io/
diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake
index 370e058b6..ecd197494 100644
--- a/ports/alembic/portfile.cmake
+++ b/ports/alembic/portfile.cmake
@@ -13,11 +13,22 @@ vcpkg_from_github(
fix-find-openexr-ilmbase.patch
)
+if(NOT VCPKG_TARGET_IS_WINDOWS)
+ # In debug mode with g++, alembic defines -Werror
+ # so we need to disable some warnings to avoid build errors
+ list(APPEND GXX_DEBUG_FLAGS
+ -DCMAKE_CXX_FLAGS_DEBUG=-Wno-deprecated
+ -DCMAKE_CXX_FLAGS_DEBUG=-Wno-error=implicit-fallthrough
+ )
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
- -DUSE_HDF5=ON
+ -DUSE_HDF5=ON
+ OPTIONS_DEBUG
+ ${GXX_DEBUG_FLAGS}
)
vcpkg_install_cmake()
@@ -28,23 +39,30 @@ vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-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})
-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)
-
-file(READ ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-debug.cmake DEBUG_CONFIG)
-string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/Alembic.dll"
- "\${_IMPORT_PREFIX}/debug/bin/Alembic.dll" DEBUG_CONFIG "${DEBUG_CONFIG}")
-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"
- "\${_IMPORT_PREFIX}/bin/Alembic.dll" RELEASE_CONFIG "${RELEASE_CONFIG}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/Alembic/AlembicTargets-release.cmake "${RELEASE_CONFIG}")
-
-# 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)
+
+if(VCPKG_TARGET_IS_WINDOWS)
+ 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})
+
+ 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)
+
+ file(READ ${CURRENT_PACKAGES_DIR}/share/alembic/AlembicTargets-debug.cmake DEBUG_CONFIG)
+ string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/Alembic.dll"
+ "\${_IMPORT_PREFIX}/debug/bin/Alembic.dll" DEBUG_CONFIG "${DEBUG_CONFIG}")
+ 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"
+ "\${_IMPORT_PREFIX}/bin/Alembic.dll" RELEASE_CONFIG "${RELEASE_CONFIG}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/alembic/AlembicTargets-release.cmake "${RELEASE_CONFIG}")
+else()
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/alembic)
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/alembic RENAME copyright)