diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d462347889..b5d38ca0e0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,19 +1,12 @@
-# required:
-add_subdirectory(osgEarth)
-add_subdirectory(osgEarthDrivers)
-set_property(TARGET osgEarth PROPERTY FOLDER "Core")
+
#optionals:
if(OSGEARTH_BUILD_PROCEDURAL_NODEKIT)
- add_definitions(-DHAVE_OSGEARTHPROCEDURAL)
- set(OSGEARTHPROCEDURAL_LIBRARY osgEarthProcedural)
add_subdirectory(osgEarthProcedural)
endif()
-if (CESIUM_NATIVE_FOUND)
+if(OSGEARTH_BUILD_CESIUM_NODEKIT)
add_subdirectory(osgEarthCesium)
- add_definitions(-DHAVE_OSGEARTHCESIUM)
- set(OSGEARTHCESIUM_LIBRARY osgEarthCesium)
endif()
if(OSGEARTH_BUILD_TRITON_NODEKIT)
@@ -35,3 +28,11 @@ endif()
if(OSGEARTH_BUILD_LEGACY_SPLAT_NODEKIT)
add_subdirectory(osgEarthSplat)
endif()
+
+# plugins:
+add_subdirectory(osgEarthDrivers)
+
+# Do this LAST since we are generating the BuildConfig header
+# based on everything that's happened so far
+add_subdirectory(osgEarth)
+set_property(TARGET osgEarth PROPERTY FOLDER "Core")
diff --git a/src/osgEarth/BuildConfig.in b/src/osgEarth/BuildConfig.in
index 68fa3f1d31..cd84556b82 100644
--- a/src/osgEarth/BuildConfig.in
+++ b/src/osgEarth/BuildConfig.in
@@ -1,14 +1,23 @@
// BuildConfig - Generated by CMake
#pragma once
-#cmakedefine OSGEARTH_HAVE_MVT
-#cmakedefine OSGEARTH_HAVE_MBTILES
-#cmakedefine OSGEARTH_HAVE_PROTOBUF
+#cmakedefine OSGEARTH_HAVE_BLEND2D
#cmakedefine OSGEARTH_HAVE_GEOS
#cmakedefine OSGEARTH_HAVE_GEOCODER
-#cmakedefine OSGEARTH_HAVE_BLEND2D
+#cmakedefine OSGEARTH_HAVE_IMGUI
#cmakedefine OSGEARTH_HAVE_MESH_OPTIMIZER
-#cmakedefine OSGEARTH_HAVE_BASISU
+#cmakedefine OSGEARTH_HAVE_MBTILES
+#cmakedefine OSGEARTH_HAVE_MVT
+#cmakedefine OSGEARTH_HAVE_PROTOBUF
#cmakedefine OSGEARTH_HAVE_SPDLOG
#cmakedefine OSGEARTH_HAVE_SQLITE3
-#cmakedefine OSGEARTH_HAVE_IMGUI
+#cmakedefine OSGEARTH_HAVE_TINYXML
+#cmakedefine OSGEARTH_HAVE_TRACY
+
+#cmakedefine OSGEARTH_HAVE_CESIUM_NODEKIT
+#cmakedefine OSGEARTH_HAVE_PROCEDURAL_NODEKIT
+#cmakedefine OSGEARTH_HAVE_TRITON_NODEKIT
+#cmakedefine OSGEARTH_HAVE_SILVERLINING_NODEKIT
+
+#cmakedefine OSGEARTH_HAVE_LEGACY_SPLAT_NODEKIT
+#cmakedefine OSGEARTH_HAVE_LEGACY_CONTROLS_API
diff --git a/src/osgEarth/CMakeLists.txt b/src/osgEarth/CMakeLists.txt
index bb6814a0fd..186882e163 100644
--- a/src/osgEarth/CMakeLists.txt
+++ b/src/osgEarth/CMakeLists.txt
@@ -23,43 +23,6 @@ find_package(blosc)
find_package(spdlog)
find_package(meshoptimizer)
-
-# Configure OSGEARTH_HAVE_XXX variables for the BuildConfig generated header
-
-if(Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE)
- SET(OSGEARTH_HAVE_MVT ON)
-endif()
-
-if(SQLite3_FOUND)
- set(OSGEARTH_HAVE_SQLITE3 ON)
- set(OSGEARTH_HAVE_MBTILES ON)
-endif()
-
-if(Protobuf_FOUND)
- set(OSGEARTH_HAVE_PROTOBUF ON)
- set(PROTOBUF_USE_DLLS FALSE CACHE BOOL "Set this to true if Protobuf is compiled as dll")
-endif()
-
-if(geos_FOUND)
- set(OSGEARTH_HAVE_GEOS ON)
-endif()
-
-if (meshoptimizer_FOUND)
- set(OSGEARTH_HAVE_MESH_OPTIMIZER ON)
-endif()
-
-if(OSGEARTH_BUILD_CESIUM_NODEKIT)
- find_package(CesiumNative)
-endif()
-
-if(OSGEARTH_BUILD_TRITON_NODEKIT)
- find_package(Triton)
-endif()
-
-if(OSGEARTH_BUILD_SILVERLINING_NODEKIT)
- find_package(SilverLining)
-endif()
-
if(OSGEARTH_ENABLE_PROFILING)
find_package(Tracy)
endif()
@@ -68,30 +31,13 @@ if(OSGEARTH_BUILD_ZIP_PLUGIN)
find_package(LibZip)
endif()
-# Logging SDK
-if(spdlog_FOUND)
- set(OSGEARTH_HAVE_SPDLOG ON)
-endif()
-
-# # Tracy is a profiler
-# if(TRACY_FOUND AND OSGEARTH_ENABLE_PROFILING)
- # ADD_DEFINITIONS(-DOSGEARTH_PROFILING)
-# endif()
-
-if(OSGEARTH_ENABLE_GEOCODER)
- set(OSGEARTH_HAVE_GEOCODER ON)
-endif()
-
-if(blend2d_FOUND)
- set(OSGEARTH_HAVE_BLEND2D ON)
-endif()
-
# Other options ...................................................
# support for the old Controls API (superceded by imgui)
if(OSGEARTH_BUILD_LEGACY_CONTROLS_API)
- add_definitions(-DOSGEARTH_HAVE_CONTROLS_API)
+ set(OSGEARTH_HAVE_LEGACY_CONTROLS_API) # for BuildConfig
+ add_definitions(-DOSGEARTH_HAVE_CONTROLS_API) # for backwards compat
endif()
# Builds the HTTPClient with WIN_INET instead of CURL
@@ -102,23 +48,6 @@ if (OSGEARTH_ENABLE_WININET_FOR_HTTP)
endif()
-# TinyXML should use STL containers:
-add_definitions(-DTIXML_USE_STL)
-
-
-# Files generated from templates ..................................
-
-# Generate the Version header.
-set(OSGEARTH_VERSION_HEADER "${OSGEARTH_BUILDTIME_INCLUDE_DIR}/osgEarth/Version")
-message(STATUS "Creating ${OSGEARTH_VERSION_HEADER}")
-configure_file(Version.in ${OSGEARTH_VERSION_HEADER})
-
-# Generate the BuildConfig header.
-set(OSGEARTH_BUILDCONFIG_HEADER "${OSGEARTH_BUILDTIME_INCLUDE_DIR}/osgEarth/BuildConfig")
-message(STATUS "Creating ${OSGEARTH_BUILDCONFIG_HEADER}")
-configure_file(BuildConfig.in ${OSGEARTH_BUILDCONFIG_HEADER})
-
-
# Source code .....................................................
# Name all the library files
@@ -554,23 +483,6 @@ if(OSGEARTH_BUILD_LEGACY_CONTROLS_API)
MouseCoordsTool)
endif()
-# IF (NOT TINYXML_FOUND)
- # SET(TARGET_H
- # ${TARGET_H}
- # tinystr.h
- # tinyxml.h
- # )
-# ENDIF (NOT TINYXML_FOUND)
-
-# IF (NOT TINYXML_FOUND)
- # SET(TINYXML_SRC
- # tinystr.cpp
- # tinyxml.cpp
- # tinyxmlerror.cpp
- # tinyxmlparser.cpp
- # )
-# ENDIF (NOT TINYXML_FOUND)
-
set(TARGET_SRC
AltitudeFilter.cpp
AltitudeSymbol.cpp
@@ -901,29 +813,20 @@ if(OSGEARTH_BUILD_LEGACY_CONTROLS_API)
MouseCoordsTool.cpp)
endif()
-# Generate the protobuf headers and sources
-IF(Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE)
- include_directories(${Protobuf_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
-
- PROTOBUF_GENERATE_CPP(PROTO_VECTOR_TILE_CPP PROTO_VECTOR_TILE_H vector_tile.proto)
-
- PROTOBUF_GENERATE_CPP(PROTO_GLYPHS_CPP PROTO_GLYPHS_H glyphs.proto)
-
- SET(TARGET_H
- ${TARGET_H}
- ${PROTO_VECTOR_TILE_H}
- ${PROTO_GLYPHS_H}
- )
- SET(TARGET_SRC
- ${TARGET_SRC}
- ${PROTO_VECTOR_TILE_CPP}
- ${PROTO_GLYPHS_CPP}
- )
-ENDIF()
+# generate the google protocol buffers headers and sources
+if(Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE)
+
+ PROTOBUF_GENERATE_CPP(PROTO_VECTOR_TILE_CPP PROTO_VECTOR_TILE_H vector_tile.proto)
+ PROTOBUF_GENERATE_CPP(PROTO_GLYPHS_CPP PROTO_GLYPHS_H glyphs.proto)
+
+ list(APPEND TARGET_H ${PROTO_VECTOR_TILE_H} ${PROTO_GLYPHS_H})
+ list(APPEND TARGET_SRC ${PROTO_VECTOR_TILE_CPP} ${PROTO_GLYPHS_CPP})
+endif()
if(OSGEARTH_ENABLE_GEOCODER)
- set(TARGET_SRC ${TARGET_SRC} Geocoder.cpp)
- set(TARGET_H ${TARGET_H} Geocoder)
+ set(OSGEARTH_HAVE_GEOCODER ON)
+ list(APPEND TARGET_H GeoCoder)
+ list(APPEND TARGET_SRC GeoCoder.cpp)
endif()
message(STATUS "Building ${LIB_NAME} as a ${OSGEARTH_DYNAMIC_OR_STATIC} library")
@@ -938,72 +841,80 @@ add_osgearth_library(
TEMPLATES ${TARGET_IN} )
+# google protocol buffers
+if(Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE)
+ set(OSGEARTH_HAVE_PROTOBUF ON)
+ set(OSGEARTH_HAVE_MVT ON)
+
+ set(PROTOBUF_USE_DLLS FALSE CACHE BOOL "Set this to true if Protobuf is compiled as dll")
+ if(PROTOBUF_USE_DLLS)
+ add_definitions(-DPROTOBUF_USE_DLLS)
+ endif()
+
+ include_directories(${Protobuf_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+ target_link_libraries(${LIB_NAME} PRIVATE protobuf::libprotobuf)
+endif()
+
# spdlog support?
if (spdlog_FOUND)
+ set(OSGEARTH_HAVE_SPDLOG ON)
target_link_libraries(${LIB_NAME} PRIVATE spdlog::spdlog)
- message(STATUS "Linking osgEarth with spdlog")
endif()
# TinyXML support?
if (TinyXML_FOUND)
+ set(OSGEARTH_HAVE_TINYXML ON)
include_directories(${TinyXML_INCLUDE_DIRS})
target_link_libraries(${LIB_NAME} PRIVATE ${TinyXML_LIBRARIES})
- message(STATUS "Linking osgEarth with tinyxml")
+ add_definitions(-DTIXML_USE_STL)
endif()
# MBTiles support?
-if(SQLITE3_FOUND)
+if(SQLite3_FOUND)
+ set(OSGEARTH_HAVE_SQLITE3 ON)
+ set(OSGEARTH_HAVE_MBTILES ON)
include_directories(${SQLITE3_INCLUDE_DIR})
target_link_libraries(${LIB_NAME} PRIVATE ${SQLite3_LIBRARIES})
- message(STATUS "Linking osgEarth with sqlite3")
endif()
# Blosc support?
if(blosc_FOUND)
+ set(OSGEARTH_HAVE_BLOSC ON)
include_directories(${BLOSC_INCLUDE_DIR})
target_link_libraries(${LIB_NAME} PRIVATE blosc_shared)
- message(STATUS "Linking osgEarth with blosc")
endif()
# GEOS support?
if(geos_FOUND)
+ set(OSGEARTH_HAVE_GEOS ON)
include_directories(${GEOS_INCLUDE_DIR})
target_link_libraries(${LIB_NAME} PRIVATE GEOS::geos_c)
- message(STATUS "Linking osgEarth with geos_c")
-endif()
-
-# Protobuf/MVT?
-if(Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE)
- if(PROTOBUF_USE_DLLS)
- add_definitions(-DPROTOBUF_USE_DLLS)
- endif()
- target_link_libraries(${LIB_NAME} PRIVATE protobuf::libprotobuf)
- message(STATUS "Linking osgEarth with protobuf")
endif()
# Blend2D?
-IF(blend2d_FOUND)
+if(blend2d_FOUND)
+ set(OSGEARTH_HAVE_BLEND2D ON)
include_directories(${BLEND2D_INCLUDES})
target_link_libraries(${LIB_NAME} PRIVATE blend2d::blend2d)
- message(STATUS "Linking osgEarth with blend2d")
-ENDIF()
+endif()
# Tracy?
-IF (TRACY_FOUND)
+if (TRACY_FOUND AND OSGEARTH_ENABLE_PROFILING)
+ set(OSGEARTH_HAVE_TRACY ON)
+ add_definitions(-DOSGEARTH_PROFILING)
include_directories(${TRACY_INCLUDE_DIR})
- LINK_WITH_VARIABLES(${LIB_NAME} TRACY_LIBRARY)
- message(STATUS "Linking osgEarth with tracy")
-ENDIF(TRACY_FOUND)
-
-# pthreads?
-if(UNIX)
- target_link_libraries(${LIB_NAME} PUBLIC Threads::Threads)
+ target_link_libraries(${LIB_NAME} PRIVATE ${TRACY_LIBRARIES})
endif()
# mesh optimizer optional library?
if(meshoptimizer_FOUND)
+ set(OSGEARTH_HAVE_MESH_OPTIMIZER ON)
target_link_libraries(${LIB_NAME} PRIVATE meshoptimizer::meshoptimizer)
- message(STATUS "Linking osgEarth with meshoptimizer")
+endif()
+
+# pthreads?
+if(UNIX)
+ target_link_libraries(${LIB_NAME} PUBLIC Threads::Threads)
endif()
# special purpose - do not remove
@@ -1025,3 +936,18 @@ else()
OpenGL::GL CURL::libcurl GDAL::GDAL
${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} ${TIFF_LIBRARY} ${PROJ4_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY})
endif()
+
+
+
+# Files generated from templates ..................................
+
+# Generate the Version header.
+set(OSGEARTH_VERSION_HEADER "${OSGEARTH_BUILDTIME_INCLUDE_DIR}/osgEarth/Version")
+message(STATUS "Creating ${OSGEARTH_VERSION_HEADER}")
+configure_file(Version.in ${OSGEARTH_VERSION_HEADER})
+
+# Generate the BuildConfig header.
+set(OSGEARTH_BUILDCONFIG_HEADER "${OSGEARTH_BUILDTIME_INCLUDE_DIR}/osgEarth/BuildConfig")
+message(STATUS "Creating ${OSGEARTH_BUILDCONFIG_HEADER}")
+configure_file(BuildConfig.in ${OSGEARTH_BUILDCONFIG_HEADER})
+
diff --git a/src/osgEarth/ImGui/LayersGUI b/src/osgEarth/ImGui/LayersGUI
index 96466fbbfd..7761a35a9a 100644
--- a/src/osgEarth/ImGui/LayersGUI
+++ b/src/osgEarth/ImGui/LayersGUI
@@ -16,8 +16,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see
*/
-#ifndef OSGEARTH_IMGUI_MAP_LAYERS_GUI
-#define OSGEARTH_IMGUI_MAP_LAYERS_GUI
+#pragma once
#include "ImGui"
#include
@@ -35,7 +34,7 @@
#include
#include
-#ifdef HAVE_OSGEARTHCESIUM
+#ifdef OSGEARTH_HAVE_CESIUM_NODEKIT
#include
#endif
@@ -61,7 +60,7 @@
#include
#endif
-#ifdef HAVE_OSGEARTHPROCEDURAL
+#ifdef OSGEARTH_HAVE_PROCEDURAL_NODEKIT
#include
#include
#include
@@ -520,7 +519,7 @@ namespace osgEarth
for (auto& layer : _layers)
{
-#ifdef HAVE_OSGEARTHPROCEDURAL
+#ifdef OSGEARTH_HAVE_PROCEDURAL_NODEKIT
if (dynamic_cast(layer.get()) ||
dynamic_cast(layer.get()) ||
dynamic_cast(layer.get()) ||
@@ -698,7 +697,7 @@ namespace osgEarth
}
}
-#ifdef HAVE_OSGEARTHCESIUM
+#ifdef OSGEARTH_HAVE_CESIUM_NODEKIT
auto cesiumNativeLayer = dynamic_cast(layer);
if (cesiumNativeLayer)
{
@@ -1136,5 +1135,3 @@ namespace osgEarth
};
}
}
-
-#endif // OSGEARTH_IMGUI_MAP_LAYERS_GUI
diff --git a/src/osgEarthCesium/CMakeLists.txt b/src/osgEarthCesium/CMakeLists.txt
index 11b00fee6a..b8a7c0c529 100644
--- a/src/osgEarthCesium/CMakeLists.txt
+++ b/src/osgEarthCesium/CMakeLists.txt
@@ -1,92 +1,92 @@
-if(CESIUM_NATIVE_FOUND)
+find_package(CesiumNative REQUIRED)
- set(LIB_NAME osgEarthCesium)
+set(LIB_NAME osgEarthCesium)
- if(OSGEARTH_BUILD_SHARED_LIBS)
- ass_definitions(-DOSGEARTHCESIUM_LIBRARY)
- else()
- ass_definitions(-DOSGEARTHCESIUM_LIBRARY_STATIC)
- endif()
+set(OSGEARTH_HAVE_CESIUM_NODEKIT ON PARENT_SCOPE) # for BuildConfig
- # Add definitions for linking against async++ and spdlog. Found in the cesium-omniverse project.
- ass_definitions(-DSPDLOG_COMPILED_LIB -DLIBASYNC_STATIC -DGLM_FORCE_XYZW_ONLY -DGLM_FORCE_EXPLICIT_CTOR -DGLM_FORCE_SIZE_T_LENGTH)
+if(OSGEARTH_BUILD_SHARED_LIBS)
+ add_definitions(-DOSGEARTHCESIUM_LIBRARY)
+else()
+ add_definitions(-DOSGEARTHCESIUM_LIBRARY_STATIC)
+endif()
- set(TARGET_SRC
- AssetAccessor.cpp
- CesiumIon.cpp
- CesiumCreditsNode.cpp
- CesiumTilesetNode.cpp
- CesiumLayer.cpp
- Context.cpp
- PrepareRenderResources.cpp
- Settings.cpp
- TaskProcessor.cpp)
-
- set(TARGET_H
- CesiumTilesetNode
- CesiumCreditsNode
- CesiumLayer
- CesiumIon
- Context
- Export
- Settings
- AssetAccessor
- PrepareRenderResources
- TaskProcessor)
+# Add definitions for linking against async++ and spdlog. Found in the cesium-omniverse project.
+add_definitions(-DSPDLOG_COMPILED_LIB -DLIBASYNC_STATIC -DGLM_FORCE_XYZW_ONLY -DGLM_FORCE_EXPLICIT_CTOR -DGLM_FORCE_SIZE_T_LENGTH)
- # ImGui headers:
- if(OSGEARTH_HAVE_IMGUI)
- set(TARGET_H_IMGUI ImGui/CesiumIonGUI)
- endif()
+set(TARGET_SRC
+ AssetAccessor.cpp
+ CesiumIon.cpp
+ CesiumCreditsNode.cpp
+ CesiumTilesetNode.cpp
+ CesiumLayer.cpp
+ Context.cpp
+ PrepareRenderResources.cpp
+ Settings.cpp
+ TaskProcessor.cpp)
+
+set(TARGET_H
+ CesiumTilesetNode
+ CesiumCreditsNode
+ CesiumLayer
+ CesiumIon
+ Context
+ Export
+ Settings
+ AssetAccessor
+ PrepareRenderResources
+ TaskProcessor)
- set(CMAKE_CXX_STANDARD 17)
+# ImGui headers:
+if(OSGEARTH_HAVE_IMGUI)
+ set(TARGET_H_IMGUI ImGui/CesiumIonGUI)
+endif()
- add_osgearth_library(
- TARGET ${LIB_NAME}
- PUBLIC_HEADERS ${TARGET_H}
- IMGUI_HEADERS ${TARGET_H_IMGUI}
- SOURCES ${TARGET_SRC}
- SHADERS ${TARGET_GLSL}
- TEMPLATES ${TARGET_IN} )
+set(CMAKE_CXX_STANDARD 17)
- # Include the Cesium Native headers BEFORE anything else to ensure that dependencies that might be duplicated like spdlog are included from the Cesium Native headers.
- include_directories(BEFORE ${CESIUM_NATIVE_INCLUDE_DIR})
-
- target_link_libraries(${LIB_NAME}
- PUBLIC
- osgEarth ${OPENSCENEGRAPH_LIBRARIES}
- PRIVATE
- ${CESIUM_NATIVE_3DTILES_SELECTION_LIBRARY}
- ${CESIUM_NATIVE_3DTILES_CONTENT_LIBRARY}
- ${CESIUM_NATIVE_3DTILES_LIBRARY}
- ${CESIUM_NATIVE_RASTER_OVERLAYS_LIBRARY}
- ${CESIUM_NATIVE_GLTF_CONTENT_LIBRARY}
-
- ${CESIUM_NATIVE_GLTF_READER_LIBRARY}
- ${CESIUM_NATIVE_3DTILES_READER_LIBRARY}
- ${CESIUM_NATIVE_ION_CLIENT_LIBRARY}
- ${CESIUM_NATIVE_GEOSPATIAL_LIBRARY}
- ${CESIUM_NATIVE_GLTF_LIBRARY}
- ${CESIUM_NATIVE_GEOMETRY_LIBRARY}
- ${CESIUM_NATIVE_ASYNC_LIBRARY}
- ${CESIUM_NATIVE_UTILITY_LIBRARY}
+add_osgearth_library(
+ TARGET ${LIB_NAME}
+ PUBLIC_HEADERS ${TARGET_H}
+ IMGUI_HEADERS ${TARGET_H_IMGUI}
+ SOURCES ${TARGET_SRC}
+ SHADERS ${TARGET_GLSL}
+ TEMPLATES ${TARGET_IN} )
- ${CESIUM_NATIVE_KTX_READ_LIBRARY}
- ${CESIUM_NATIVE_DRACO_LIBRARY}
- ${CESIUM_NATIVE_MESHOPTIMIZER_LIBRARY}
- ${CESIUM_NATIVE_SPDLOG_LIBRARY}
- ${CESIUM_NATIVE_ASYNC++_LIBRARY}
- ${CESIUM_NATIVE_WEBPDECODER_LIBRARY}
- ${CESIUM_NATIVE_URIPARSER_LIBRARY}
- ${CESIUM_NATIVE_TURBOJPEG_LIBRARY}
- ${CESIUM_NATIVE_CSPRNG_LIBRARY}
- ${CESIUM_NATIVE_MODPB64_LIBRARY}
- ${CESIUM_NATIVE_JSONREADER_LIBRARY}
- ${CESIUM_NATIVE_S2GEOMETRY_LIBRARY}
- ${CESIUM_NATIVE_TINYXML2_LIBRARY})
+# Include the Cesium Native headers BEFORE anything else to ensure that dependencies that might be duplicated like spdlog are included from the Cesium Native headers.
+include_directories(BEFORE ${CESIUM_NATIVE_INCLUDE_DIR})
+target_link_libraries(${LIB_NAME}
+ PUBLIC
+ osgEarth ${OPENSCENEGRAPH_LIBRARIES}
+ PRIVATE
+ ${CESIUM_NATIVE_3DTILES_SELECTION_LIBRARY}
+ ${CESIUM_NATIVE_3DTILES_CONTENT_LIBRARY}
+ ${CESIUM_NATIVE_3DTILES_LIBRARY}
+ ${CESIUM_NATIVE_RASTER_OVERLAYS_LIBRARY}
+ ${CESIUM_NATIVE_GLTF_CONTENT_LIBRARY}
+
+ ${CESIUM_NATIVE_GLTF_READER_LIBRARY}
+ ${CESIUM_NATIVE_3DTILES_READER_LIBRARY}
+ ${CESIUM_NATIVE_ION_CLIENT_LIBRARY}
+ ${CESIUM_NATIVE_GEOSPATIAL_LIBRARY}
+ ${CESIUM_NATIVE_GLTF_LIBRARY}
+ ${CESIUM_NATIVE_GEOMETRY_LIBRARY}
+ ${CESIUM_NATIVE_ASYNC_LIBRARY}
+ ${CESIUM_NATIVE_UTILITY_LIBRARY}
- # Add this project to the NodeKits solution folder
- set_property( TARGET ${LIB_NAME} PROPERTY FOLDER "NodeKits" )
-
-endif(CESIUM_NATIVE_FOUND)
+ ${CESIUM_NATIVE_KTX_READ_LIBRARY}
+ ${CESIUM_NATIVE_DRACO_LIBRARY}
+ ${CESIUM_NATIVE_MESHOPTIMIZER_LIBRARY}
+ ${CESIUM_NATIVE_SPDLOG_LIBRARY}
+ ${CESIUM_NATIVE_ASYNC++_LIBRARY}
+ ${CESIUM_NATIVE_WEBPDECODER_LIBRARY}
+ ${CESIUM_NATIVE_URIPARSER_LIBRARY}
+ ${CESIUM_NATIVE_TURBOJPEG_LIBRARY}
+ ${CESIUM_NATIVE_CSPRNG_LIBRARY}
+ ${CESIUM_NATIVE_MODPB64_LIBRARY}
+ ${CESIUM_NATIVE_JSONREADER_LIBRARY}
+ ${CESIUM_NATIVE_S2GEOMETRY_LIBRARY}
+ ${CESIUM_NATIVE_TINYXML2_LIBRARY})
+
+
+# Add this project to the NodeKits solution folder
+set_property( TARGET ${LIB_NAME} PROPERTY FOLDER "NodeKits" )
diff --git a/src/osgEarthProcedural/CMakeLists.txt b/src/osgEarthProcedural/CMakeLists.txt
index 25d0e1e1a7..1f579c76d6 100644
--- a/src/osgEarthProcedural/CMakeLists.txt
+++ b/src/osgEarthProcedural/CMakeLists.txt
@@ -9,6 +9,8 @@ endif()
SET(LIB_NAME osgEarthProcedural)
+set(OSGEARTH_HAVE_PROCEDURAL_NODEKIT ON PARENT_SCOPE) # for BuildConfig
+
# temporary... for devel only...
set(CLIPPER2_INCLUDE_DIR "H:/devel/clipper2/install/include")
if (EXISTS ${CLIPPER2_INCLUDE_DIR})
diff --git a/src/osgEarthSilverLining/CMakeLists.txt b/src/osgEarthSilverLining/CMakeLists.txt
index 053c868ca4..12610403a8 100644
--- a/src/osgEarthSilverLining/CMakeLists.txt
+++ b/src/osgEarthSilverLining/CMakeLists.txt
@@ -1,55 +1,54 @@
-if(SILVERLINING_FOUND)
-
- set(LIB_NAME osgEarthSilverLining)
-
- if(OSGEARTH_BUILD_SHARED_LIBS)
- add_definitions(-DOSGEARTHSILVERLINING_LIBRARY)
- else()
- add_definitions(-DOSGEARTHSILVERLINING_LIBRARY_STATIC)
- endif()
+find_package(SilverLining REQUIRED)
+
+set(LIB_NAME osgEarthSilverLining)
+
+set(OSGEARTH_HAVE_SILVERLINING_NODEKIT ON PARENT_SCOPE) # for BuildConfig
+
+if(OSGEARTH_BUILD_SHARED_LIBS)
+ add_definitions(-DOSGEARTHSILVERLINING_LIBRARY)
+else()
+ add_definitions(-DOSGEARTHSILVERLINING_LIBRARY_STATIC)
+endif()
+
+option(SILVERLINING_USE_PRE_5_079_API "Whether to use the pre-5.079 API due to an API change" OFF)
+if (SILVERLINING_USE_PRE_5_079_API)
+ add_definitions(-DOSGEARTH_SILVERLINING_USE_PRE_5_079_API)
+endif()
+
+SET(HEADER_PATH ${OSGEARTH_SOURCE_DIR}/include/${LIB_NAME})
+
+SET(TARGET_H
+# header files go here
+ Common
+ Export
+ SilverLiningOptions
+ SilverLiningNode
+ SilverLiningContext
+ SilverLiningSkyDrawable
+ SilverLiningCloudsDrawable
+ SilverLiningAPIWrapper
+ SilverLiningCallback
+ SilverLiningContextNode
+)
+
+set(TARGET_SRC
+ SilverLiningNode.cpp
+ SilverLiningContext.cpp
+ SilverLiningSkyDrawable.cpp
+ SilverLiningCloudsDrawable.cpp
+ SilverLiningAPIWrapper.cpp
+ SilverLiningContextNode.cpp)
+
+add_osgearth_library(
+ TARGET ${LIB_NAME}
+ SOURCES ${TARGET_SRC}
+ PUBLIC_HEADERS ${TARGET_H} )
+
+include_directories(
+ ${SILVERLINING_INCLUDE_DIR})
- option(SILVERLINING_USE_PRE_5_079_API "Whether to use the pre-5.079 API due to an API change" OFF)
- if (SILVERLINING_USE_PRE_5_079_API)
- add_definitions(-DOSGEARTH_SILVERLINING_USE_PRE_5_079_API)
- endif()
-
- SET(HEADER_PATH ${OSGEARTH_SOURCE_DIR}/include/${LIB_NAME})
-
- SET(TARGET_H
- # header files go here
- Common
- Export
- SilverLiningOptions
- SilverLiningNode
- SilverLiningContext
- SilverLiningSkyDrawable
- SilverLiningCloudsDrawable
- SilverLiningAPIWrapper
- SilverLiningCallback
- SilverLiningContextNode
- )
-
- set(TARGET_SRC
- SilverLiningNode.cpp
- SilverLiningContext.cpp
- SilverLiningSkyDrawable.cpp
- SilverLiningCloudsDrawable.cpp
- SilverLiningAPIWrapper.cpp
- SilverLiningContextNode.cpp)
-
- add_osgearth_library(
- TARGET ${LIB_NAME}
- SOURCES ${TARGET_SRC}
- PUBLIC_HEADERS ${TARGET_H} )
-
- include_directories(
- ${SILVERLINING_INCLUDE_DIR})
-
- target_link_libraries(${LIB_NAME}
- PUBLIC osgEarth ${OPENSCENEGRAPH_LIBRARIES} ${SILVERLINING_LIBRARY})
-
- # Add this project to the NodeKits solution folder
- set_property( TARGET ${LIB_NAME} PROPERTY FOLDER "NodeKits" )
-
-
-endif(SILVERLINING_FOUND)
+target_link_libraries(${LIB_NAME}
+ PUBLIC osgEarth ${OPENSCENEGRAPH_LIBRARIES} ${SILVERLINING_LIBRARY})
+
+# Add this project to the NodeKits solution folder
+set_property( TARGET ${LIB_NAME} PROPERTY FOLDER "NodeKits" )
diff --git a/src/osgEarthSplat/CMakeLists.txt b/src/osgEarthSplat/CMakeLists.txt
index c209300539..eb15aa4465 100644
--- a/src/osgEarthSplat/CMakeLists.txt
+++ b/src/osgEarthSplat/CMakeLists.txt
@@ -3,6 +3,8 @@
#
SET(LIB_NAME osgEarthSplat)
+set(OSGEARTH_HAVE_SPLAT_NODEKIT ON PARENT_SCOPE) # for BuildConfig
+
if(OSGEARTH_BUILD_SHARED_LIBS)
ADD_DEFINITIONS(-DOSGEARTHSPLAT_LIBRARY)
else()
diff --git a/src/osgEarthTriton/CMakeLists.txt b/src/osgEarthTriton/CMakeLists.txt
index a054f0295b..4615450397 100644
--- a/src/osgEarthTriton/CMakeLists.txt
+++ b/src/osgEarthTriton/CMakeLists.txt
@@ -1,51 +1,50 @@
-if(TRITON_FOUND)
-
- set(LIB_NAME osgEarthTriton)
-
- if(OSGEARTH_BUILD_SHARED_LIBS)
- add_definitions(-DOSGEARTHTRITON_LIBRARY)
- else()
- add_definitions(-DOSGEARTHTRITON_LIBRARY_STATIC)
- endif()
-
- set(HEADER_PATH ${OSGEARTH_SOURCE_DIR}/include/${LIB_NAME})
-
- SET(TARGET_H
- Common
- Export
- TritonContext
- TritonDrawable
- TritonAPIWrapper
- TritonCallback
- TritonLayer
- TritonHeightMap
- TritonIntersections
- )
-
- set(TARGET_SRC
- TritonContext.cpp
- TritonDrawable.cpp
- TritonAPIWrapper.cpp
- TritonLayer.cpp
- TritonHeightMap.cpp
- TritonIntersections.cpp)
-
- add_osgearth_library(
- TARGET ${LIB_NAME}
- SOURCES ${TARGET_SRC}
- PUBLIC_HEADERS ${TARGET_H} )
-
- include_directories(
- ${OSG_INCLUDE_DIR}
- ${OSGEARTH_SOURCE_DIR}
- ${TRITON_INCLUDE_DIR}
- )
-
- target_link_libraries(${LIB_NAME}
- PUBLIC osgEarth ${OPENSCENEGRAPH_LIBRARIES} ${TRITON_LIBRARY})
-
- # Add this project to the NodeKits solution folder
- set_property( TARGET ${LIB_NAME} PROPERTY FOLDER "NodeKits" )
-
-
-endif(TRITON_FOUND)
+find_package(Triton REQUIRED)
+
+set(LIB_NAME osgEarthTriton)
+
+set(OSGEARTH_HAVE_TRITON_NODEKIT ON PARENT_SCOPE) # BuildConfig
+
+if(OSGEARTH_BUILD_SHARED_LIBS)
+ add_definitions(-DOSGEARTHTRITON_LIBRARY)
+else()
+ add_definitions(-DOSGEARTHTRITON_LIBRARY_STATIC)
+endif()
+
+set(HEADER_PATH ${OSGEARTH_SOURCE_DIR}/include/${LIB_NAME})
+
+SET(TARGET_H
+ Common
+ Export
+ TritonContext
+ TritonDrawable
+ TritonAPIWrapper
+ TritonCallback
+ TritonLayer
+ TritonHeightMap
+ TritonIntersections
+)
+
+set(TARGET_SRC
+ TritonContext.cpp
+ TritonDrawable.cpp
+ TritonAPIWrapper.cpp
+ TritonLayer.cpp
+ TritonHeightMap.cpp
+ TritonIntersections.cpp)
+
+add_osgearth_library(
+ TARGET ${LIB_NAME}
+ SOURCES ${TARGET_SRC}
+ PUBLIC_HEADERS ${TARGET_H} )
+
+include_directories(
+ ${OSG_INCLUDE_DIR}
+ ${OSGEARTH_SOURCE_DIR}
+ ${TRITON_INCLUDE_DIR}
+)
+
+target_link_libraries(${LIB_NAME}
+ PUBLIC osgEarth ${OPENSCENEGRAPH_LIBRARIES} ${TRITON_LIBRARY})
+
+# Add this project to the NodeKits solution folder
+set_property( TARGET ${LIB_NAME} PROPERTY FOLDER "NodeKits" )
diff --git a/vcpkg/vcpkg.json b/vcpkg/vcpkg.json
index 31780cc582..d359e17b7b 100644
--- a/vcpkg/vcpkg.json
+++ b/vcpkg/vcpkg.json
@@ -1,7 +1,7 @@
{
"name": "osgearth",
"version-string": "3.5",
- "port-version": 1,
+ "port-version": 2,
"description": "osgEarth - 3D Maps and Terrain for OpenSceneGraph - Copyright 2023 Pelican Mapping",
"homepage": "https://github.com/gwaldron/osgearth",
"supports": "!(x86 | wasm32)",