diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-10-24 14:47:30 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-10-24 14:47:30 -0700 |
| commit | 2998ea214884e9df1731d75281b8822ce9521715 (patch) | |
| tree | 090b66cb392d6dc4dfedc1c7cd27ebe01d486e6e | |
| parent | 616abfc2c91d53bd7472f7a983c152e0b4a305b4 (diff) | |
| parent | 7658d318366ac149285617d41cf97d63a2cb9adc (diff) | |
| download | vcpkg-2998ea214884e9df1731d75281b8822ce9521715.tar.gz vcpkg-2998ea214884e9df1731d75281b8822ce9521715.zip | |
Merge branch 'add-openjpeg' of https://github.com/traversaro/vcpkg into traversaro-add-openjpeg
| -rw-r--r-- | ports/openjpeg/CONTROL | 3 | ||||
| -rw-r--r-- | ports/openjpeg/portfile.cmake | 35 |
2 files changed, 38 insertions, 0 deletions
diff --git a/ports/openjpeg/CONTROL b/ports/openjpeg/CONTROL new file mode 100644 index 000000000..f137d0ebc --- /dev/null +++ b/ports/openjpeg/CONTROL @@ -0,0 +1,3 @@ +Source: openjpeg +Version: 2.1.2 +Description: JPEG 2000 image library diff --git a/ports/openjpeg/portfile.cmake b/ports/openjpeg/portfile.cmake new file mode 100644 index 000000000..70700ed9d --- /dev/null +++ b/ports/openjpeg/portfile.cmake @@ -0,0 +1,35 @@ +include(${CMAKE_TRIPLET_FILE}) +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openjpeg-2.1.2) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/uclouvain/openjpeg/archive/v2.1.2.zip" + FILENAME "openjpeg-2.1.2.zip" + SHA512 45518b92b2a8e7218ab3efdebe1acf0437c01ab2e4d5769da17103a76ba38a7305fb36d0ceeca0576d53c071a3482d2d3f01d6e48a569191290bfba9274ef7b4 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DBUILD_CODEC:BOOL=OFF + -DOPENJPEG_INSTALL_PACKAGE_DIR=share/openjpeg +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle debug cmake config files (see https://github.com/Microsoft/vcpkg/issues/77) +file(READ ${CURRENT_PACKAGES_DIR}/debug/share/openjpeg/OpenJPEGTargets-debug.cmake OPENJPEG_DEBUG_MODULE) +string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" OPENJPEG_DEBUG_MODULE "${OPENJPEG_DEBUG_MODULE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/openjpeg/OpenJPEGTargets-debug.cmake "${OPENJPEG_DEBUG_MODULE}") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Cleanup Visual C++ Redistributable runtime +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/msvcp140.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/vcruntime140.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/msvcp140.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vcruntime140.dll) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openjpeg) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/openjpeg/LICENSE ${CURRENT_PACKAGES_DIR}/share/openjpeg/copyright) |
