mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-17 06:17:50 +08:00
f8ad7dd004
- [X] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md) - [X] SHA512s are updated for each updated download - [ ] ~The "supports" clause reflects platforms that may be fixed by this new version~ - [ ] ~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~ - [ ] ~Any patches that are no longer applied are deleted from the port's directory.~ - [X] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [X] Only one version is added to each modified port's versions file.
47 lines
1.5 KiB
CMake
47 lines
1.5 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO jasper-software/jasper
|
|
REF "version-${VERSION}"
|
|
SHA512 2da4b72e7566fb3f1240fe8e058f2801642d2a2a8bed6e89f1a32209d22d715bff811a99102ba2cfe0eb566f0fb2292bbefffe75a17011995e35ab8f6bc8a417
|
|
HEAD_REF master
|
|
PATCHES
|
|
no_stdc_check.patch
|
|
fix-library-name.patch
|
|
)
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
set(VCPKG_CXX_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_CXX_FLAGS}")
|
|
set(VCPKG_C_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_C_FLAGS}")
|
|
endif()
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" JAS_ENABLE_SHARED)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
opengl JAS_ENABLE_OPENGL
|
|
)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
${FEATURE_OPTIONS}
|
|
-DJAS_ENABLE_LIBHEIF=OFF # found via find_library instead of find_package
|
|
-DJAS_ENABLE_LIBJPEG=ON
|
|
-DJAS_ENABLE_DOC=OFF
|
|
-DJAS_ENABLE_LATEX=OFF
|
|
-DJAS_ENABLE_PROGRAMS=OFF
|
|
-DJAS_ENABLE_SHARED=${JAS_ENABLE_SHARED}
|
|
OPTIONS_DEBUG
|
|
-DCMAKE_DEBUG_POSTFIX=d # Due to CMakes FindJasper; Default for multi config generators.
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_copy_pdbs()
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share")
|
|
|
|
vcpkg_install_copyright(FILE_LIST ${SOURCE_PATH}/LICENSE.txt)
|