mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-22 10:37:10 +01:00
[osg] Add feature examples and plugins, fix configure options (#10082)
* [osg] Add feature examples and plugins, fix configure options * [osg] Add feature tools, packages and docs * [osgearth] Set dependency to osg[plugins] * [osgearth] bump version * [osg] Fix dependency * [osg] Remove feature plugins dependency nvtt * [osg] Remove empty folder * [osg] Fix dependency sdl and liblas * [osg] Fix install issue * [osg] Fix dependency nvtt * [osg] Re-fix dependency nvtt * [osg] Fix judgment when selecting nvtt * [osg] Create tools folder based on conditions * [osg] Fix typo * update baseline * re-trigger ci test * re-trigger ci test
This commit is contained in:
parent
29c933ddb6
commit
b12256a4af
@ -1,9 +1,27 @@
|
|||||||
Source: osg
|
Source: osg
|
||||||
Version: 3.6.4-1
|
Version: 3.6.4-2
|
||||||
Homepage: https://github.com/openscenegraph/OpenSceneGraph
|
Homepage: https://github.com/openscenegraph/OpenSceneGraph
|
||||||
Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit.
|
Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit.
|
||||||
Build-Depends: freetype, jasper, openexr, zlib, gdal, giflib, libjpeg-turbo, libpng, tiff, fontconfig, sdl2, boost-asio (!windows), libxml2 (windows), giflib (windows), freeglut (windows), expat (windows), libiconv (windows)
|
Build-Depends: zlib, fontconfig, boost-asio (!windows), freeglut (windows), expat (windows), openimageio (osx)
|
||||||
|
|
||||||
Feature: collada
|
Feature: collada
|
||||||
Description: Support for Collada (.dae) files
|
Description: Support for Collada (.dae) files
|
||||||
Build-Depends: collada-dom
|
Build-Depends: collada-dom
|
||||||
|
|
||||||
|
Feature: tools
|
||||||
|
Description: Enable to build OSG Applications (e.g. osgviewer)
|
||||||
|
Build-Depends: freetype, sdl1, curl, libjpeg-turbo, libpng, libiconv (windows)
|
||||||
|
|
||||||
|
Feature: examples
|
||||||
|
Description: Enable to build OSG Examples
|
||||||
|
Build-Depends: freetype, sdl1, sdl2, libiconv (windows)
|
||||||
|
|
||||||
|
Feature: plugins
|
||||||
|
Description: Build OSG Plugins - Disable for compile testing examples on a time limit
|
||||||
|
Build-Depends: freetype, sdl1, curl, openexr, ilmbase, gdal, giflib (windows), jasper, libjpeg-turbo, libpng, tiff, libxml2 (windows), libiconv (windows), libgta, liblas, nvtt
|
||||||
|
|
||||||
|
Feature: packages
|
||||||
|
Description: Set to ON to generate CPack configuration files and packaging targets
|
||||||
|
|
||||||
|
Feature: docs
|
||||||
|
Description: Build OpenSceneGraph reference documentation using doxygen (use: make doc_openscenegraph doc_openthreads
|
16
ports/osg/fix-liblas.patch
Normal file
16
ports/osg/fix-liblas.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index b84fa06..a991670 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -765,7 +765,10 @@ ELSE()
|
||||||
|
ENDIF()
|
||||||
|
FIND_PACKAGE(ZeroConf)
|
||||||
|
|
||||||
|
- FIND_PACKAGE(LIBLAS)
|
||||||
|
+ FIND_PACKAGE(liblas CONFIG)
|
||||||
|
+ set(LIBLAS_FOUND ${liblas_FOUND})
|
||||||
|
+ set(LIBLAS_LIBRARY liblas)
|
||||||
|
+ set(LIBLASC_LIBRARY liblas_c)
|
||||||
|
|
||||||
|
IF (NOT(OSG_USE_LOCAL_LUA_SOURCE))
|
||||||
|
FIND_PACKAGE(Lua52)
|
14
ports/osg/fix-nvtt.patch
Normal file
14
ports/osg/fix-nvtt.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index a991670..5b530c5 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -759,7 +759,9 @@ ELSE()
|
||||||
|
FIND_PACKAGE(RSVG)
|
||||||
|
FIND_PACKAGE(GtkGl)
|
||||||
|
FIND_PACKAGE(DirectInput)
|
||||||
|
+ if (ENABLE_NVTT)
|
||||||
|
FIND_PACKAGE(NVTT)
|
||||||
|
+ endif()
|
||||||
|
IF (NOT WIN32)
|
||||||
|
FIND_PACKAGE(Asio)
|
||||||
|
ENDIF()
|
@ -1,5 +1,5 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index 81328ea..2566b48 100644
|
index 81328ea..c735419 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -755,8 +755,6 @@ ELSE()
|
@@ -755,8 +755,6 @@ ELSE()
|
||||||
@ -11,15 +11,14 @@ index 81328ea..2566b48 100644
|
|||||||
FIND_PACKAGE(Poppler-glib)
|
FIND_PACKAGE(Poppler-glib)
|
||||||
FIND_PACKAGE(RSVG)
|
FIND_PACKAGE(RSVG)
|
||||||
FIND_PACKAGE(GtkGl)
|
FIND_PACKAGE(GtkGl)
|
||||||
@@ -775,6 +773,11 @@ ELSE()
|
@@ -775,6 +773,10 @@ ELSE()
|
||||||
FIND_PACKAGE(Lua51)
|
FIND_PACKAGE(Lua51)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
+
|
+
|
||||||
+ find_package(SDL)
|
+ find_package(SDL)
|
||||||
+ if (NOT SDL_FOUND)
|
+ find_package(SDL2 CONFIG)
|
||||||
+ find_package(SDL2)
|
+ set(SDL2_LIBRARY SDL2::SDL2 SDL2::SDL2main)
|
||||||
+ endif()
|
|
||||||
|
|
||||||
# V8 and Python plugins are tests for linking against these libraries but aren't functionality beyond this.
|
# V8 and Python plugins are tests for linking against these libraries but aren't functionality beyond this.
|
||||||
# FIND_PACKAGE(V8)
|
# FIND_PACKAGE(V8)
|
||||||
|
@ -14,6 +14,8 @@ vcpkg_from_github(
|
|||||||
disable-present3d-staticview-in-linux.patch #Due to some link error we cannot solve yet, disable them in linux.
|
disable-present3d-staticview-in-linux.patch #Due to some link error we cannot solve yet, disable them in linux.
|
||||||
fix-curl.patch
|
fix-curl.patch
|
||||||
remove-prefix.patch # Remove this patch when cmake fix Findosg_functions.cmake
|
remove-prefix.patch # Remove this patch when cmake fix Findosg_functions.cmake
|
||||||
|
fix-liblas.patch
|
||||||
|
fix-nvtt.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||||
@ -42,16 +44,32 @@ list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_GLIB=ON)
|
|||||||
list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_SDL=ON)
|
list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_SDL=ON)
|
||||||
list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_LIBLAS=ON)
|
list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_LIBLAS=ON)
|
||||||
|
|
||||||
|
# Due to nvtt CRT linkage error, we can only enable static builds here
|
||||||
|
set(ENABLE_NVTT ON)
|
||||||
|
if (VCPKG_TARGET_IS_WINDOWS AND OSG_DYNAMIC)
|
||||||
|
set(ENABLE_NVTT OFF)
|
||||||
|
endif()
|
||||||
|
list(APPEND OPTIONS -DENABLE_NVTT=${ENABLE_NVTT})
|
||||||
|
|
||||||
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||||
|
tools BUILD_OSG_APPLICATIONS
|
||||||
|
examples BUILD_OSG_EXAMPLES
|
||||||
|
plugins BUILD_OSG_PLUGINS
|
||||||
|
packages BUILD_OSG_PACKAGES
|
||||||
|
docs BUILD_DOCUMENTATION
|
||||||
|
docs BUILD_REF_DOCS_SEARCHENGINE
|
||||||
|
docs BUILD_REF_DOCS_TAGFILE
|
||||||
|
)
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
OPTIONS
|
OPTIONS ${FEATURE_OPTIONS}
|
||||||
-DOSG_USE_UTF8_FILENAME=${OSG_USE_UTF8_FILENAME}
|
-DOSG_USE_UTF8_FILENAME=${OSG_USE_UTF8_FILENAME}
|
||||||
-DDYNAMIC_OPENSCENEGRAPH=${OSG_DYNAMIC}
|
-DDYNAMIC_OPENSCENEGRAPH=${OSG_DYNAMIC}
|
||||||
-DDYNAMIC_OPENTHREADS=${OSG_DYNAMIC}
|
-DDYNAMIC_OPENTHREADS=${OSG_DYNAMIC}
|
||||||
-DBUILD_OSG_PLUGINS=ON # it should always be ON due to osgerath need this
|
-DBUILD_DASHBOARD_REPORTS=OFF
|
||||||
-DBUILD_OSG_EXAMPLES=ON
|
|
||||||
-DBUILD_OSG_APPLICATIONS=ON
|
|
||||||
-DCMAKE_CXX_STANDARD=11
|
-DCMAKE_CXX_STANDARD=11
|
||||||
|
${OPTIONS}
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
@ -62,31 +80,53 @@ vcpkg_copy_pdbs()
|
|||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||||
|
|
||||||
set(OSG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
set(OSG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
||||||
file(MAKE_DIRECTORY ${OSG_TOOL_PATH})
|
|
||||||
|
|
||||||
file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
||||||
file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH})
|
if (OSG_TOOLS)
|
||||||
file(REMOVE_RECURSE ${OSG_TOOLS})
|
file(MAKE_DIRECTORY ${OSG_TOOL_PATH})
|
||||||
file(GLOB OSG_TOOLS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH})
|
||||||
file(REMOVE_RECURSE ${OSG_TOOLS_DBG})
|
file(REMOVE_RECURSE ${OSG_TOOLS})
|
||||||
|
file(GLOB OSG_TOOLS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
||||||
|
file(REMOVE_RECURSE ${OSG_TOOLS_DBG})
|
||||||
|
endif()
|
||||||
|
file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/share/OpenSceneGraph/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
|
||||||
|
if (OSG_TOOLS)
|
||||||
|
file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH})
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/OpenSceneGraph)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||||
file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/*${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX})
|
file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/*)
|
||||||
|
if (OSG_PLUGINS_DBG)
|
||||||
file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/osgPlugins-${OSG_VER})
|
file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/osgPlugins-${OSG_VER})
|
||||||
file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/*${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX})
|
endif()
|
||||||
|
file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/*)
|
||||||
|
if (OSG_PLUGINS_REL)
|
||||||
|
if (NOT EXISTS ${OSG_TOOL_PATH})
|
||||||
|
file(MAKE_DIRECTORY ${OSG_TOOL_PATH})
|
||||||
|
endif()
|
||||||
file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-${OSG_VER})
|
file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-${OSG_VER})
|
||||||
|
endif()
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/ ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/ ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/osgPlugins-${OSG_VER}/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX})
|
file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/*)
|
||||||
file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/osgPlugins-${OSG_VER})
|
if (OSG_PLUGINS_DBG)
|
||||||
file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/lib/osgPlugins-${OSG_VER}/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX})
|
file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/osgPlugins-${OSG_VER})
|
||||||
file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-${OSG_VER})
|
endif()
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/osgPlugins-${OSG_VER}/ ${CURRENT_PACKAGES_DIR}/debug/lib/osgPlugins-${OSG_VER}/)
|
|
||||||
|
file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/*)
|
||||||
|
if (OSG_PLUGINS_REL)
|
||||||
|
if (NOT EXISTS ${OSG_TOOL_PATH})
|
||||||
|
file(MAKE_DIRECTORY ${OSG_TOOL_PATH})
|
||||||
|
endif()
|
||||||
|
file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-${OSG_VER})
|
||||||
|
endif()
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/ ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/)
|
||||||
|
|
||||||
#Cleanup
|
#Cleanup
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
|
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Source: osgearth
|
Source: osgearth
|
||||||
Version: 2.10.2
|
Version: 2.10.2-1
|
||||||
Description: osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping.
|
Description: osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping.
|
||||||
Build-Depends: osg
|
Build-Depends: osg[plugins]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user