Skip to content

Commit

Permalink
[osg] Added OPENGL_PROFILE option to osg port as a triplet variable. (#…
Browse files Browse the repository at this point in the history
…24108)

* Updated osg port to be able to set the OPENGL_PROFILE setting via
a triplet variable.

* Format osg/ports/vcpkg.json

* Added osg port version 12
  • Loading branch information
jasonbeverage committed Apr 14, 2022
1 parent 0472781 commit bb584d3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
10 changes: 10 additions & 0 deletions ports/osg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ if(VCPKG_TARGET_IS_WINDOWS)
set(BUILD_OSG_PLUGIN_RESTHTTPDEVICE OFF)
endif()

# The package osg can be configured to use different OpenGL profiles via a custom triplet file:
# Possible values are GLCORE, GL2, GL3, GLES1, GLES2, GLES3, and GLES2+GLES3
if(NOT DEFINED osg_OPENGL_PROFILE)
set(osg_OPENGL_PROFILE "GL3")
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS ${FEATURE_OPTIONS}
Expand All @@ -89,6 +95,7 @@ vcpkg_configure_cmake(
-DBUILD_OSG_PLUGIN_SVG=OFF
-DBUILD_OSG_PLUGIN_VNC=OFF
-DBUILD_OSG_PLUGIN_LUA=OFF
-DOPENGL_PROFILE=${osg_OPENGL_PROFILE}
-DBUILD_OSG_PLUGIN_RESTHTTPDEVICE=${BUILD_OSG_PLUGIN_RESTHTTPDEVICE}
-DBUILD_OSG_PLUGIN_ZEROCONFDEVICE=OFF
-DBUILD_DASHBOARD_REPORTS=OFF
Expand Down Expand Up @@ -161,3 +168,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/)
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

vcpkg_fixup_pkgconfig()

# Handle usage
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
4 changes: 4 additions & 0 deletions ports/osg/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The package osg can be configured to use different OpenGL profiles via a custom triplet file.
Possible values are GLCORE, GL2, GL3, GLES1, GLES2, GLES3 and GLES2+GLES3.
The default value is GL3.
set(osg_OPENGL_PROFILE GL2)
5 changes: 3 additions & 2 deletions ports/osg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "osg",
"version-string": "3.6.5",
"port-version": 11,
"version": "3.6.5",
"port-version": 12,
"description": "The OpenSceneGraph is an open source high performance 3D graphics toolkit.",
"homepage": "https://github.com/openscenegraph/OpenSceneGraph",
"dependencies": [
Expand All @@ -13,6 +13,7 @@
"name": "fontconfig",
"platform": "!windows"
},
"opengl-registry",
{
"name": "openimageio",
"platform": "osx"
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5226,7 +5226,7 @@
},
"osg": {
"baseline": "3.6.5",
"port-version": 11
"port-version": 12
},
"osg-qt": {
"baseline": "Qt5",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/osg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f438ec006b58ffd222b0f3bdce8d05b21611204e",
"version": "3.6.5",
"port-version": 12
},
{
"git-tree": "456c4454eee9f4a24916992b0870067f703ef374",
"version-string": "3.6.5",
Expand Down

0 comments on commit bb584d3

Please sign in to comment.