vcpkg/ports/osgearth/make-all-find-packages-required.patch

96 lines
2.8 KiB
Diff
Raw Normal View History

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7541c8d..b4076fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -122,40 +122,54 @@ 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)
# required
find_package(OSG REQUIRED)
-find_package(CURL REQUIRED)
+find_package(CURL CONFIG REQUIRED)
+set(CURL_LIBRARY CURL::libcurl)
find_package(GDAL REQUIRED)
-
+set(GDAL_LIBRARY ${GDAL_LIBRARIES})
+set(GDAL_FOUND 1)
# 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(geos CONFIG REQUIRED)
+set(GEOS_LIBRARY GEOS::geos GEOS::geos_c)
+set(GEOS_FOUND 1)
+find_package(unofficial-sqlite3 CONFIG REQUIRED)
+set(SQLITE3_FOUND 1)
+set(SQLITE3_LIBRARY unofficial::sqlite3::sqlite3)
+find_package(Draco REQUIRED)
+find_package(BASISU REQUIRED)
+find_package(GLEW REQUIRED)
+set(GLEW_LIBRARIES GLEW::GLEW)
+set(GLEW_FOUND 1)
+find_package(protobuf CONFIG REQUIRED)
+set(Protobuf_LIBRARIES protobuf::libprotoc protobuf::libprotobuf)
+set(Protobuf_FOUND 1)
+find_package(WebP CONFIG REQUIRED)
+set(WEBP_LIBRARY WebP::webp)
+set(WEBP_FOUND 1)
+find_package(Blend2D REQUIRED)
if(OSGEARTH_ENABLE_PROFILING)
- find_package(Tracy)
+ find_package(Tracy REQUIRED)
endif()
if(OSGEARTH_BUILD_ZIP_PLUGIN)
- find_package(LIBZIP)
+ find_package(libzip CONFIG REQUIRED)
+ set(LIBZIP_LIBRARY libzip::zip)
+ set(LIBZIP_FOUND 1)
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:
@@ -193,7 +207,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).
@@ -204,7 +218,9 @@ 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)
+ find_package(tinyxml CONFIG REQUIRED)
+ set(TINYXML_FOUND 1)
+ set(TINYXML_LIBRARY unofficial-tinyxml::unofficial-tinyxml)
ENDIF (WITH_EXTERNAL_TINYXML)
# postfix settings for various configs