[osgearth] Fix core installation (#31125)

* [osgearth] Test core

* [osgearth] Fix core

* Require C++11

* Finish PR
This commit is contained in:
Kai Pastor 2023-04-27 02:08:20 +02:00 committed by GitHub
parent 7ec2e3fde0
commit e8e206e64f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 15 deletions

View File

@ -14,7 +14,7 @@ index 36ea6c81f..8ed39eb24 100755
ENDIF (OSGEARTH_USE_GLES)
@@ -144,35 +144,52 @@ if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
@@ -144,35 +144,54 @@ if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
endif()
# required
@ -55,8 +55,10 @@ index 36ea6c81f..8ed39eb24 100755
+find_package(Protobuf REQUIRED)
+find_package(WEBP NAMES WebP CONFIG REQUIRED)
+set(WEBP_LIBRARY WebP::webp)
+find_package(BLEND2D CONFIG REQUIRED)
+set(BLEND2D_LIBRARY blend2d::blend2d)
+if(WITH_BLEND2D)
+ find_package(BLEND2D CONFIG REQUIRED)
+ set(BLEND2D_LIBRARY blend2d::blend2d)
+endif()
+find_package(BLOSC REQUIRED)
if(OSGEARTH_ENABLE_PROFILING)
@ -81,7 +83,7 @@ index 36ea6c81f..8ed39eb24 100755
endif()
# Sqlite enables the MBTiles format:
@@ -214,7 +231,7 @@ SET (PROTOBUF_USE_DLLS FALSE CACHE BOOL "Set this to true if Protobuf is compile
@@ -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)
@ -90,7 +92,7 @@ index 36ea6c81f..8ed39eb24 100755
ENDIF (WITH_EXTERNAL_DUKTAPE)
# Whether to install shaders (glsl files).
@@ -225,7 +242,8 @@ OPTION(OSGEARTH_INSTALL_SHADERS "Whether to deploy GLSL shaders when doing a Mak
@@ -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)
@ -100,11 +102,11 @@ index 36ea6c81f..8ed39eb24 100755
ENDIF (WITH_EXTERNAL_TINYXML)
# postfix settings for various configs
@@ -300,6 +318,7 @@ IF(OSGEARTH_BUILD_SHARED_LIBS)
@@ -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)
+ add_definitions(-DOSGEARTH_LIBRARY_STATIC)
ENDIF()

View File

@ -33,11 +33,12 @@ if("tools" IN_LIST FEATURES)
endif()
file(REMOVE
"${SOURCE_PATH}/CMakeModule/FindGEOS.cmake"
"${SOURCE_PATH}/CMakeModule/FindLibZip.cmake"
"${SOURCE_PATH}/CMakeModule/FindOSG.cmake"
"${SOURCE_PATH}/CMakeModule/FindSqlite3.cmake"
"${SOURCE_PATH}/CMakeModule/FindWEBP.cmake"
"${SOURCE_PATH}/CMakeModules/FindBlend2D.cmake"
"${SOURCE_PATH}/CMakeModules/FindGEOS.cmake"
"${SOURCE_PATH}/CMakeModules/FindLibZip.cmake"
"${SOURCE_PATH}/CMakeModules/FindOSG.cmake"
"${SOURCE_PATH}/CMakeModules/FindSqlite3.cmake"
"${SOURCE_PATH}/CMakeModules/FindWEBP.cmake"
"${SOURCE_PATH}/src/osgEarth/tinyxml.h" # https://github.com/gwaldron/osgearth/issues/1002
)
@ -46,7 +47,7 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tools OSGEARTH_BUILD_TOOLS
blend2d CMAKE_REQUIRE_FIND_PACKAGE_BLEND2D
blend2d WITH_BLEND2D
)
vcpkg_cmake_configure(
@ -54,6 +55,7 @@ vcpkg_cmake_configure(
OPTIONS
${FEATURE_OPTIONS}
-DLIB_POSTFIX=
-DCMAKE_CXX_STANDARD=11
-DOSGEARTH_BUILD_SHARED_LIBS=${BUILD_SHARED}
-DOSGEARTH_BUILD_EXAMPLES=OFF
-DOSGEARTH_BUILD_TESTS=OFF

View File

@ -1,7 +1,7 @@
{
"name": "osgearth",
"version": "3.3",
"port-version": 5,
"port-version": 6,
"description": "osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2021 Pelican Mapping.",
"homepage": "https://github.com/gwaldron/osgearth",
"license": "LGPL-3.0-or-later",

View File

@ -5966,7 +5966,7 @@
},
"osgearth": {
"baseline": "3.3",
"port-version": 5
"port-version": 6
},
"osi": {
"baseline": "0.108.6",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "93f980541af3527f2940eede908836a7cfc63166",
"version": "3.3",
"port-version": 6
},
{
"git-tree": "606bbaf1456dc9d5a6f5ef879a54b894c4ace5b3",
"version": "3.3",