vcpkg/ports/jasper/portfile.cmake

45 lines
1.4 KiB
CMake
Raw Normal View History

2017-06-01 21:42:52 +08:00
include(vcpkg_common_functions)
2017-11-08 01:15:17 +08:00
2017-06-01 21:42:52 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mdadams/jasper
2017-11-08 01:15:17 +08:00
REF version-2.0.14
SHA512 6b270cb1eb55f777f30016f3258e5e2297627e7d086334814c308464f5a4552c23241b0fdbc81ea715a6f4746294657f96c1cb6ceb320629ce57db7e81d84940
2017-06-01 21:42:52 +08:00
HEAD_REF master)
2017-11-08 01:15:17 +08:00
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/jasper-fix-uwp.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(JAS_ENABLE_SHARED ON)
else()
set(JAS_ENABLE_SHARED OFF)
2017-06-01 21:42:52 +08:00
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF
-DJAS_ENABLE_LIBJPEG=ON
-DJAS_ENABLE_OPENGL=OFF # not needed for the library
-DJAS_ENABLE_DOC=OFF
2017-11-08 01:15:17 +08:00
-DJAS_ENABLE_PROGRAMS=OFF
-DJAS_ENABLE_SHARED=${JAS_ENABLE_SHARED}
)
2017-06-01 21:42:52 +08:00
vcpkg_install_cmake()
2017-11-08 01:15:17 +08:00
vcpkg_copy_pdbs()
2017-06-01 21:42:52 +08:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
2017-11-08 01:15:17 +08:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share)
2017-06-01 21:42:52 +08:00
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jasper)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/jasper/LICENSE ${CURRENT_PACKAGES_DIR}/share/jasper/copyright)