vcpkg/ports/osgearth/find-package.patch

113 lines
3.5 KiB
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 36ea6c81f..8ed39eb24 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -124,9 +124,9 @@ option(OSGEARTH_ENABLE_GEOCODER "Enable the geocoder (GDAL/OGR must be built wit
# Mobile/GLES:
IF (OSGEARTH_USE_GLES)
- find_package(OpenGLES)
+ find_package(OpenGLES REQUIRED)
ELSE ()
- find_package(OpenGL)
+ find_package(OpenGL REQUIRED)
ENDIF (OSGEARTH_USE_GLES)
@@ -144,35 +144,54 @@ if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
endif()
# required
-find_package(OSG REQUIRED)
+find_package(OSG NAMES unofficial-osg)
+find_path(OSG_INCLUDE_DIR osg/Version) # For detecting the version and setting the plugin path
+set(OSG_INCLUDE_DIRS "")
+set(OSG_LIBRARY unofficial::osg::osg)
+set(OSGUTIL_LIBRARY unofficial::osg::osgUtil)
+set(OSGDB_LIBRARY unofficial::osg::osgDB)
+set(OSGTEXT_LIBRARY unofficial::osg::osgText)
+set(OSGSIM_LIBRARY unofficial::osg::osgSim)
+set(OSGVIEWER_LIBRARY unofficial::osg::osgViewer)
+set(OSGGA_LIBRARY unofficial::osg::osgViewer)
+set(OSGSHADOW_LIBRARY unofficial::osg::osgShadow)
+set(OSGMANIPULATOR_LIBRARY unofficial::osg::osgManipulator)
+set(OPENTHREADS_LIBRARY unofficial::osg::OpenThreads)
find_package(CURL REQUIRED)
find_package(GDAL REQUIRED)
[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
# optional
-find_package(GEOS)
-find_package(Sqlite3)
-find_package(Draco)
-find_package(BASISU)
-find_package(GLEW)
-find_package(Protobuf)
-find_package(WEBP)
-find_package(Blend2D)
-find_package(blosc)
[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
+find_package(GEOS CONFIG REQUIRED)
+set(GEOS_LIBRARY GEOS::geos_c)
+find_package(SQLITE3 NAMES unofficial-sqlite3 REQUIRED)
+set(SQLITE3_LIBRARY unofficial::sqlite3::sqlite3)
+find_package(Draco REQUIRED)
+find_package(BASISU REQUIRED)
+find_package(GLEW REQUIRED)
[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
+find_package(Protobuf REQUIRED)
+find_package(WEBP NAMES WebP CONFIG REQUIRED)
+set(WEBP_LIBRARY WebP::webp)
+if(WITH_BLEND2D)
+ find_package(BLEND2D CONFIG REQUIRED)
+ set(BLEND2D_LIBRARY blend2d::blend2d)
+endif()
+find_package(BLOSC REQUIRED)
if(OSGEARTH_ENABLE_PROFILING)
- find_package(Tracy)
+ find_package(Tracy REQUIRED)
endif()
if(OSGEARTH_BUILD_ZIP_PLUGIN)
- find_package(LIBZIP)
[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
+ find_package(LIBZIP CONFIG REQUIRED)
+ set(LIBZIP_LIBRARY libzip::zip)
endif()
if(OSGEARTH_BUILD_TRITON_NODEKIT)
- find_package(Triton QUIET)
+ find_package(Triton QUIET REQUIRED)
endif()
if(OSGEARTH_BUILD_SILVERLINING_NODEKIT)
- find_package(SilverLining QUIET)
+ find_package(SilverLining QUIET REQUIRED)
endif()
# Sqlite enables the MBTiles format:
@@ -214,7 +233,7 @@ SET (PROTOBUF_USE_DLLS FALSE CACHE BOOL "Set this to true if Protobuf is compile
# Duktape is the JavaScript interpreter
SET (WITH_EXTERNAL_DUKTAPE FALSE CACHE BOOL "Use bundled or system wide version of Duktape")
IF (WITH_EXTERNAL_DUKTAPE)
- find_package(Duktape)
+ find_package(Duktape REQUIRED)
ENDIF (WITH_EXTERNAL_DUKTAPE)
# Whether to install shaders (glsl files).
@@ -225,7 +244,8 @@ OPTION(OSGEARTH_INSTALL_SHADERS "Whether to deploy GLSL shaders when doing a Mak
# TinyXML is an XML parsing library
SET (WITH_EXTERNAL_TINYXML FALSE CACHE BOOL "Use bundled or system wide version of TinyXML")
IF (WITH_EXTERNAL_TINYXML)
- find_package(TinyXML)
[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
+ find_package(TINYXML NAMES tinyxml REQUIRED)
+ set(TINYXML_LIBRARY unofficial-tinyxml::unofficial-tinyxml)
ENDIF (WITH_EXTERNAL_TINYXML)
# postfix settings for various configs
@@ -300,6 +320,7 @@ IF(OSGEARTH_BUILD_SHARED_LIBS)
SET(OSGEARTH_DYNAMIC_OR_STATIC "SHARED")
ELSE()
SET(OSGEARTH_DYNAMIC_OR_STATIC "STATIC")
+ add_definitions(-DOSGEARTH_LIBRARY_STATIC)
ENDIF()