From 1bdb3a73b82e3ac64b190c8bffe37b1d1cfc719d Mon Sep 17 00:00:00 2001 From: Glenn Waldron Date: Tue, 28 May 2024 11:21:27 -0400 Subject: [PATCH] FIX Triton and Silverlining CMAKE issues with misssing GLU; FIX blosc BuildConfig define --- cmake/FindSilverLining.cmake | 1 + cmake/FindTriton.cmake | 1 + src/osgEarth/BuildConfig.in | 1 + src/osgEarth/Compressors.cpp | 2 +- src/osgEarthSilverLining/CMakeLists.txt | 8 +------- src/osgEarthTriton/CMakeLists.txt | 8 +------- 6 files changed, 6 insertions(+), 15 deletions(-) diff --git a/cmake/FindSilverLining.cmake b/cmake/FindSilverLining.cmake index 27212e6b43..402729a25a 100644 --- a/cmake/FindSilverLining.cmake +++ b/cmake/FindSilverLining.cmake @@ -147,6 +147,7 @@ IF (SILVERLINING_INCLUDE_DIR AND SILVERLINING_LIBRARY AND SILVERLINING_LIBRARY_D add_library(OE::SILVERLINING SHARED IMPORTED) set_target_properties(OE::SILVERLINING PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${SILVERLINING_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "OpenGL::GL;OpenGL::GLU" ) if(WIN32) set_target_properties(OE::SILVERLINING PROPERTIES diff --git a/cmake/FindTriton.cmake b/cmake/FindTriton.cmake index 2d4fc58b7f..4abb18dea5 100644 --- a/cmake/FindTriton.cmake +++ b/cmake/FindTriton.cmake @@ -145,6 +145,7 @@ IF (TRITON_INCLUDE_DIR AND TRITON_LIBRARY AND TRITON_LIBRARY_DEBUG) add_library(OE::TRITON SHARED IMPORTED) set_target_properties(OE::TRITON PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${TRITON_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "OpenGL::GL;OpenGL::GLU" ) if(WIN32) set_target_properties(OE::TRITON PROPERTIES diff --git a/src/osgEarth/BuildConfig.in b/src/osgEarth/BuildConfig.in index 3514b7d5cc..c9e9709145 100644 --- a/src/osgEarth/BuildConfig.in +++ b/src/osgEarth/BuildConfig.in @@ -2,6 +2,7 @@ #pragma once #cmakedefine OSGEARTH_HAVE_BLEND2D +#cmakedefine OSGEARTH_HAVE_BLOSC #cmakedefine OSGEARTH_HAVE_GEOS #cmakedefine OSGEARTH_HAVE_GEOCODER #cmakedefine OSGEARTH_HAVE_IMGUI diff --git a/src/osgEarth/Compressors.cpp b/src/osgEarth/Compressors.cpp index db27d82dcc..741a280bf2 100644 --- a/src/osgEarth/Compressors.cpp +++ b/src/osgEarth/Compressors.cpp @@ -23,7 +23,7 @@ #include #include -#if OSGEARTH_HAVE_BLOSC +#ifdef OSGEARTH_HAVE_BLOSC #include class BloscCompressor : public osgDB::BaseCompressor diff --git a/src/osgEarthSilverLining/CMakeLists.txt b/src/osgEarthSilverLining/CMakeLists.txt index 7d4d5c7d36..fea340ce6d 100644 --- a/src/osgEarthSilverLining/CMakeLists.txt +++ b/src/osgEarthSilverLining/CMakeLists.txt @@ -15,10 +15,7 @@ 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 @@ -44,9 +41,6 @@ add_osgearth_library( SOURCES ${TARGET_SRC} PUBLIC_HEADERS ${TARGET_H} FOLDER "NodeKits") - -include_directories(${SILVERLINING_INCLUDE_DIR}) target_link_libraries(${LIB_NAME} - PUBLIC OE::SILVERLINING - PRIVATE OpenGL::GL) + PRIVATE OE::SILVERLINING OpenGL::GL) diff --git a/src/osgEarthTriton/CMakeLists.txt b/src/osgEarthTriton/CMakeLists.txt index 676a770011..649b60cd31 100644 --- a/src/osgEarthTriton/CMakeLists.txt +++ b/src/osgEarthTriton/CMakeLists.txt @@ -10,8 +10,6 @@ else() add_definitions(-DOSGEARTHTRITON_LIBRARY_STATIC) endif() -set(HEADER_PATH ${OSGEARTH_SOURCE_DIR}/include/${LIB_NAME}) - SET(TARGET_H Common Export @@ -38,9 +36,5 @@ add_osgearth_library( PUBLIC_HEADERS ${TARGET_H} FOLDER "NodeKits") -include_directories(${TRITON_INCLUDE_DIR}) - target_link_libraries(${LIB_NAME} - PUBLIC OpenGL::GL - PRIVATE OE::TRITON) - + PRIVATE OE::TRITON OpenGL::GL)