vcpkg/ports/jasper/portfile.cmake
Sylvain Prevost 5434c95a88
[jasper]: Move opengl & freeglut dependencies under default-features in order to enable flexibility to not require any of those when importing jasper package (via default-features=false). (#22895)
* [jasper]: Move opengl & freeglut dependencies under default-features in order to enable flexibility to not require any of those when importing jasper package (via default-features=false).

* [jasper]: Move opengl & freeglut dependencies under default-features in order to enable flexibility to not require any of those when importing jasper package (via default-features=false).

* [x264]: enable cross-compilation for linux arm64 target.

* [x264]: enable cross-compilation for linux arm64 target.

* Revert "[x264]: enable cross-compilation for linux arm64 target."

This reverts commit 8d60d79e90.

Revert "[x264]: enable cross-compilation for linux arm64 target."

This reverts commit f828a420ff.

* Update ports/jasper/vcpkg.json

Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>

* Remove moot freeglut platform constraint.

* Update jasper port hash.

Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
2022-02-08 21:32:47 -08:00

43 lines
1.4 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mdadams/jasper
REF fe00207dc10db1d7cc6f2757961c5c6bdfd10973 # version-2.0.33
SHA512 887bb8e6096b41d5b61970d70b0e7b9cc1c31dd63467386aa35003c146d200bbae9ad46825a3313aeed403ac6fb26d504f489386cbc7ca364d95deeb5a94af46
HEAD_REF master
)
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
-DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF
-DJAS_ENABLE_LIBJPEG=ON
-DJAS_ENABLE_OPENGL=${JAS_ENABLE_OPENGL}
-DJAS_ENABLE_DOC=OFF
-DJAS_ENABLE_PROGRAMS=OFF
-DJAS_ENABLE_SHARED=${JAS_ENABLE_SHARED}
OPTIONS_DEBUG
-DCMAKE_DEBUG_POSTFIX=d # Due to CMakes FindJasper
)
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")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)