vcpkg/ports/osg/unofficial-export.patch

68 lines
3.0 KiB
Diff
Raw Normal View History

[osg] Cleanup, export unofficial config (#24720) * Revise portfile * Plugins are a default feature; fix disabling * Remove line continuations from pc file vcpkg_fixup_pkgconfig cannot handle it. * Control nvtt plugin via feature * Control dae plugin, not find_package * Control fontconfig via feature Use CMake's (3.14) find module for which vcpkg provides a wrapper. OSG links to Fontconfig::Fontconfig. OSG default is to use Fontconfig except for ios and android. * Control freetype via feature Use CMake's find module for which vcpkg provides a wrapper. OSG links to FREETYPE_LIBRARIES. * Control RestHttpDevice via feature Only this plugin needs boost. * Drop unused liblas dependency * Drop unused coin dependency Coin was meant to be used for the inventor plugin, but this plugin is disabled. * Control sdl1 via feature * Enable apps on linux * Disable apps and docs for debug * Drop example application patch * Use option, not patch, to disable DLL versioning * Fix osg plugin PDB installation * Prefer <Pkg>_LIBRARIES for linking <Pkg>_LIBRARIES carries debug+release config and transitive usage requirements. * Curl patches are obsolete now. We leverage CURL_LIBRARIES via link-libraries.patch. * Add unofficial config export * Use toolchain's windows version Fixes mingw build. * Avoid extra dependency lookups * Silence warnings about plugin control variables * Define OSG_LIBRARY_STATIC * Revise copying of plugins * Control OpenEXR via feature Unblock uwp. * Allow jasper without opengl * [osgearth] Remove obsolete geos patching The build uses exported geos config. * [osgearth] Serialize linking to avoid OOM errors * [osgearth] Fix minor portfile issues * [osgearth] Prefer <Pkg>_LIBRARIES for linking <Pkg>_LIBRARIES carries debug+release config and transitive usage requirements. * [osgearth] Use unofficial osg config * [osgearth] Fix lib installation dir * [osgearth] Revise OSGEARTH_LIBRARY_STATIC * [osgearth] Revise find_package patching * [osgearth] Revise copying of plugins * [osgearth] Disable tools for debug variant * [osgearth] Control Blend2D via feature * Update versions * Fix plugin lookup * Update versions * CR request * Update versions * [osgearth] Remove tools from default features * Update versions
2022-06-21 04:49:37 +08:00
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c975d78..cc53332 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1374,3 +1374,6 @@ ADD_CUSTOM_TARGET(uninstall
#
include(FeatureSummary)
feature_summary(WHAT ALL)
+
+INSTALL(EXPORT osg-targets NAMESPACE unofficial::osg:: DESTINATION share/unofficial-osg)
+INSTALL(EXPORT osg-plugins NAMESPACE unofficial::osg:: DESTINATION share/unofficial-osg)
diff --git a/CMakeModules/ModuleInstall.cmake b/CMakeModules/ModuleInstall.cmake
index f6714c5..d58f6fd 100644
--- a/CMakeModules/ModuleInstall.cmake
+++ b/CMakeModules/ModuleInstall.cmake
@@ -27,6 +27,7 @@ ENDIF()
INSTALL(
TARGETS ${LIB_NAME}
+ EXPORT osg-targets
RUNTIME DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph
LIBRARY DESTINATION ${INSTALL_LIBDIR} COMPONENT libopenscenegraph
ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-dev
diff --git a/CMakeModules/OsgMacroUtils.cmake b/CMakeModules/OsgMacroUtils.cmake
index dcc1fe3..a12fcf1 100644
--- a/CMakeModules/OsgMacroUtils.cmake
+++ b/CMakeModules/OsgMacroUtils.cmake
@@ -345,6 +345,7 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME)
#the installation path are differentiated for win32 that install in bib versus other architecture that install in lib${LIB_POSTFIX}/${OSG_PLUGINS}
IF(WIN32)
INSTALL(TARGETS ${TARGET_TARGETNAME}
+ EXPORT osg-plugins
RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT}
ARCHIVE DESTINATION lib/${OSG_PLUGINS} COMPONENT libopenscenegraph-dev
LIBRARY DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT})
@@ -354,6 +355,7 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME)
ENDIF(MSVC AND DYNAMIC_OPENSCENEGRAPH)
ELSE(WIN32)
INSTALL(TARGETS ${TARGET_TARGETNAME}
+ EXPORT osg-plugins
RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT}
ARCHIVE DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} COMPONENT libopenscenegraph-dev
LIBRARY DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT})
diff --git a/src/OpenThreads/pthreads/CMakeLists.txt b/src/OpenThreads/pthreads/CMakeLists.txt
index e18969c..5a8ad62 100644
--- a/src/OpenThreads/pthreads/CMakeLists.txt
+++ b/src/OpenThreads/pthreads/CMakeLists.txt
@@ -157,6 +157,7 @@ ELSE()
INSTALL(
TARGETS OpenThreads
+ EXPORT osg-targets
ARCHIVE DESTINATION lib${LIB_POSTFIX} COMPONENT libopenthreads-dev
LIBRARY DESTINATION lib${LIB_POSTFIX} COMPONENT libopenthreads
RUNTIME DESTINATION bin COMPONENT libopenthreads
diff --git a/src/OpenThreads/win32/CMakeLists.txt b/src/OpenThreads/win32/CMakeLists.txt
index 0e816f7..0c083fd 100644
--- a/src/OpenThreads/win32/CMakeLists.txt
+++ b/src/OpenThreads/win32/CMakeLists.txt
@@ -45,6 +45,7 @@ ENDIF()
INSTALL(
TARGETS OpenThreads
+ EXPORT osg-targets
ARCHIVE DESTINATION lib COMPONENT libopenthreads-dev
LIBRARY DESTINATION lib COMPONENT libopenthreads
RUNTIME DESTINATION bin COMPONENT libopenthreads