2016-10-23 22:25:31 +02:00
|
|
|
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}
|
2017-03-05 12:52:49 +01:00
|
|
|
PREFER_NINJA
|
2016-10-23 22:25:31 +02:00
|
|
|
OPTIONS -DBUILD_CODEC:BOOL=OFF
|
2016-10-24 23:04:00 +02:00
|
|
|
-DOPENJPEG_INSTALL_PACKAGE_DIR=share/openjpeg
|
2016-10-23 22:25:31 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
|
|
|
# Handle debug cmake config files (see https://github.com/Microsoft/vcpkg/issues/77)
|
2016-10-24 23:04:00 +02:00
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/debug/share/openjpeg/OpenJPEGTargets-debug.cmake OPENJPEG_DEBUG_MODULE)
|
2016-10-23 22:25:31 +02:00
|
|
|
string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" OPENJPEG_DEBUG_MODULE "${OPENJPEG_DEBUG_MODULE}")
|
2016-10-24 23:04:00 +02:00
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/openjpeg/OpenJPEGTargets-debug.cmake "${OPENJPEG_DEBUG_MODULE}")
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
|
2016-10-23 22:25:31 +02:00
|
|
|
# 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)
|
2016-10-31 12:34:04 -07:00
|
|
|
|
2017-03-05 12:52:49 +01:00
|
|
|
vcpkg_copy_pdbs()
|