aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjasjuang <jasjuang@gmail.com>2017-07-17 15:39:20 -0700
committerjasjuang <jasjuang@gmail.com>2017-07-17 15:39:20 -0700
commit772a226df37ed89b0a8034cff98c2c9b5371bb7e (patch)
tree049ecd0fdc718d05167aa0c726037662749ec2e9
parentb8703d958ae4dd98e88351804d6b6ce16c83adcf (diff)
downloadvcpkg-772a226df37ed89b0a8034cff98c2c9b5371bb7e.tar.gz
vcpkg-772a226df37ed89b0a8034cff98c2c9b5371bb7e.zip
fix cmake error when using find_package in down stream project
-rw-r--r--ports/alembic/portfile.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake
index b57a1232d..c98a84e57 100644
--- a/ports/alembic/portfile.cmake
+++ b/ports/alembic/portfile.cmake
@@ -32,6 +32,16 @@ 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)