Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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

Merged
merged 8 commits into from
Feb 9, 2022
6 changes: 6 additions & 0 deletions ports/jasper/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ 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}
Expand Down
21 changes: 14 additions & 7 deletions ports/jasper/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
{
"name": "jasper",
"version": "2.0.33",
"port-version": 1,
"port-version": 2,
"description": "Open source implementation of the JPEG-2000 Part-1 standard",
"homepage": "https://github.com/mdadams/jasper",
"dependencies": [
{
"name": "freeglut",
"platform": "!osx"
},
"libjpeg-turbo",
"opengl",
{
"name": "vcpkg-cmake",
"host": true
Expand All @@ -19,5 +14,17 @@
"name": "vcpkg-cmake-config",
"host": true
}
]
],
"default-features": [
"opengl"
],
"features": {
"opengl": {
"description": "Enable the use of the OpenGL/GLUT Library",
"dependencies": [
"freeglut",
ras0219-msft marked this conversation as resolved.
Show resolved Hide resolved
"opengl"
]
}
}
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2958,7 +2958,7 @@
},
"jasper": {
"baseline": "2.0.33",
"port-version": 1
"port-version": 2
},
"jbig2dec": {
"baseline": "0.19",
Expand Down
5 changes: 5 additions & 0 deletions versions/j-/jasper.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "59d44227795e2e5e31a0f3e327832e4013b1e255",
"version": "2.0.33",
"port-version": 2
},
{
"git-tree": "6fc7475e9c22dafb473c98e00136e89c03ad8f5b",
"version": "2.0.33",
Expand Down