Skip to content

Commit

Permalink
Changed all use of TARGET_LINK_LIBRARIES in OsgEarthMacroUtils to spe…
Browse files Browse the repository at this point in the history
…cify private linking to avoid polluting projects with extra dependencies because the default was PUBLIC and it was making projects link against projects they didn't actually need to.

Cleaned up projects so that dependencies that were getting pulled in by the previous default public linkage are now explicitly defined.
Including CESIUM_NATIVE_INCLUDE_DIR with BEFORE to ensure that the cesium copy of spdlog is included and not the one osgearth is linking against.
Including lerc include with BEFORE to pick up the right include directory.
  • Loading branch information
jasonbeverage committed Oct 20, 2023
1 parent a1bae9d commit 6ac221f
Show file tree
Hide file tree
Showing 61 changed files with 94 additions and 61 deletions.
12 changes: 6 additions & 6 deletions CMakeModules/OsgEarthMacroUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,23 @@ MACRO(LINK_WITH_VARIABLES TRGTNAME)
FOREACH(varname ${ARGN})
IF(${varname}_DEBUG)
IF(${varname}_RELEASE)
TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}_RELEASE}" debug "${${varname}_DEBUG}")
TARGET_LINK_LIBRARIES(${TRGTNAME} PRIVATE optimized "${${varname}_RELEASE}" debug "${${varname}_DEBUG}")
ELSE(${varname}_RELEASE)
TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}}" debug "${${varname}_DEBUG}")
TARGET_LINK_LIBRARIES(${TRGTNAME} PRIVATE optimized "${${varname}}" debug "${${varname}_DEBUG}")
ENDIF(${varname}_RELEASE)
ELSE(${varname}_DEBUG)
TARGET_LINK_LIBRARIES(${TRGTNAME} ${${varname}} )
TARGET_LINK_LIBRARIES(${TRGTNAME} PRIVATE ${${varname}} )
ENDIF(${varname}_DEBUG)
ENDFOREACH(varname)
ENDMACRO(LINK_WITH_VARIABLES TRGTNAME)

MACRO(LINK_INTERNAL TRGTNAME)
TARGET_LINK_LIBRARIES(${TRGTNAME} ${ARGN})
TARGET_LINK_LIBRARIES(${TRGTNAME} PRIVATE ${ARGN})
ENDMACRO(LINK_INTERNAL TRGTNAME)

MACRO(LINK_EXTERNAL TRGTNAME)
FOREACH(LINKLIB ${ARGN})
TARGET_LINK_LIBRARIES(${TRGTNAME} "${LINKLIB}" )
TARGET_LINK_LIBRARIES(${TRGTNAME} PRIVATE "${LINKLIB}" )
ENDFOREACH(LINKLIB)
ENDMACRO(LINK_EXTERNAL TRGTNAME)

Expand Down Expand Up @@ -174,7 +174,7 @@ MACRO(SETUP_LINK_LIBRARIES)
ENDIF(TARGET_LIBRARIES_VARS)

FOREACH(LINKLIB ${TARGET_EXTERNAL_LIBRARIES})
TARGET_LINK_LIBRARIES(${TARGET_TARGETNAME} ${LINKLIB})
TARGET_LINK_LIBRARIES(${TARGET_TARGETNAME} PRIVATE ${LINKLIB})
ENDFOREACH(LINKLIB)
ENDMACRO(SETUP_LINK_LIBRARIES)

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_3pv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_3pv.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_annotation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGGA_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_annotation.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_atlas/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )

SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGTEXT_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_atlas.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_boundarygen/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_H
BoundaryUtil
Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_city/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGGA_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_city.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_cluster/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC
osgearth_cluster.cpp)
Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_collecttriangles/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY OPENGL_gl_LIBRARY)

SET(TARGET_SRC
osgearth_collecttriangles.cpp )
Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_createtile/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_createtile.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_eci/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_eci.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_ephemeris/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_ephemeris.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_featurefilter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_featurefilter.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_features/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )

SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_features.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_graticule/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_graticule.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_imgui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
set(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSG_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY OPENGL_gl_LIBRARY)

set(TARGET_SRC osgearth_imgui.cpp)
SETUP_IMGUI_APPLICATION(osgearth_imgui)
2 changes: 1 addition & 1 deletion src/applications/osgearth_infinitescroll/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_infinitescroll.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_lights/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_lights.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_los/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_los.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_magnify/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGGA_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_magnify.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_manip/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_manip.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_map/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_map.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_minimap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_minimap.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_mrt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_mrt.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_occlusionculling/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_occlusionculling.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_pick/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY)
set(TARGET_LIBRARIES_VARS OPENTHREADS_LIBRARY OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENGL_gl_LIBRARY)
set(TARGET_SRC osgearth_pick.cpp)

SETUP_IMGUI_APPLICATION(osgearth_pick)
2 changes: 1 addition & 1 deletion src/applications/osgearth_skyview/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_H
SkyManipulator
Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_terrainprofile/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGGA_LIBRARY OSGUTIL_LIBRARY OSGTEXT_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_terrainprofile.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_toc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY OSGWIDGET_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY OSGWIDGET_LIBRARY)

SET(TARGET_SRC osgearth_toc.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_tracks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGGA_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_tracks.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_transform/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_transform.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_video/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGGA_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_video.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/applications/osgearth_viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGGA_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_SRC osgearth_viewer.cpp )

Expand Down
2 changes: 1 addition & 1 deletion src/osgEarth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ INCLUDE_DIRECTORIES(${GDAL_INCLUDE_DIR} ${CURL_INCLUDE_DIR} ${OSG_INCLUDE_DIR} )

# spdlog support?
if (spdlog_FOUND)
link_internal(${LIB_NAME} spdlog::spdlog)
TARGET_LINK_LIBRARIES(${LIB_NAME} PRIVATE spdlog::spdlog)
message(STATUS "Linking osgEarth with spdlog")
endif()

Expand Down
5 changes: 4 additions & 1 deletion src/osgEarthCesium/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,14 @@ IF (TRACY_FOUND)
LINK_WITH_VARIABLES(${LIB_NAME} TRACY_LIBRARY)
ENDIF(TRACY_FOUND)

INCLUDE_DIRECTORIES(${CESIUM_NATIVE_INCLUDE_DIR})
# 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})

LINK_WITH_VARIABLES(${LIB_NAME}
OSG_LIBRARY
OSGUTIL_LIBRARY
OSGDB_LIBRARY
OSGTEXT_LIBRARY
CESIUM_NATIVE_3DTILES_LIBRARY
CESIUM_NATIVE_3DTILES_SELECTION_LIBRARY
CESIUM_NATIVE_UTILITY_LIBRARY
Expand Down
3 changes: 2 additions & 1 deletion src/osgEarthDrivers/bumpmap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ set(LIB_PUBLIC_HEADERS
set(TARGET_H
${LIB_PUBLIC_HEADERS}
BumpMapShaders )

SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OPENTHREADS_LIBRARY)

setup_plugin(osgearth_bumpmap)

# to install public driver includes:
set(LIB_NAME bumpmap)

5 changes: 3 additions & 2 deletions src/osgEarthDrivers/cache_filesystem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ SET(TARGET_H
SET(TARGET_SRC
FileSystemCache.cpp
)
SETUP_PLUGIN(osgearth_cache_filesystem)

SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OPENTHREADS_LIBRARY)

SETUP_PLUGIN(osgearth_cache_filesystem)

# to install public driver includes:
SET(LIB_NAME cache_filesystem)
SET(LIB_PUBLIC_HEADERS FileSystemCache)
INCLUDE(ModuleInstallOsgEarthDriverIncludes OPTIONAL)

4 changes: 2 additions & 2 deletions src/osgEarthDrivers/colorramp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ SET(TARGET_H
SET(TARGET_SRC
ColorRampTileSource.cpp
)
SETUP_PLUGIN(osgearth_colorramp)

SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OPENTHREADS_LIBRARY)
SETUP_PLUGIN(osgearth_colorramp)

# to install public driver includes:
SET(LIB_NAME colorramp)
SET(LIB_PUBLIC_HEADERS ColorRampOptions)
INCLUDE(ModuleInstallOsgEarthDriverIncludes OPTIONAL)

2 changes: 2 additions & 0 deletions src/osgEarthDrivers/detail/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ set(TARGET_H
${LIB_PUBLIC_HEADERS}
DetailShaders
)

SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OPENTHREADS_LIBRARY)

setup_plugin(osgearth_detail)

Expand Down
3 changes: 2 additions & 1 deletion src/osgEarthDrivers/draco/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ IF(draco_FOUND)
)

INCLUDE_DIRECTORIES( ${draco_INCLUDE_DIRS} )
SET(TARGET_LIBRARIES_VARS draco_LIBRARIES )
SET(TARGET_LIBRARIES_VARS draco_LIBRARIES OSG_LIBRARY OSGDB_LIBRARY OPENTHREADS_LIBRARY )


#### end var setup ###
SETUP_PLUGIN(draco)
Expand Down
3 changes: 3 additions & 0 deletions src/osgEarthDrivers/earth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ SET(TARGET_SRC
EarthFileSerializer1.cpp
EarthFileSerializer2.cpp)


SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OPENTHREADS_LIBRARY)

SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DOSGEARTH_LIBRARY_POSTFIX=${CMAKE_DEBUG_POSTFIX}")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DOSGEARTH_LIBRARY_POSTFIX=${CMAKE_RELEASE_POSTFIX}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DOSGEARTH_LIBRARY_POSTFIX=${CMAKE_RELWITHDEBINFO_POSTFIX}")
Expand Down
2 changes: 2 additions & 0 deletions src/osgEarthDrivers/engine_rex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ configure_shaders(
${SHADERS_CPP}
${TARGET_GLSL} )

SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGTEXT_LIBRARY OPENTHREADS_LIBRARY OPENGL_gl_LIBRARY)

SET(TARGET_SRC
CreateTileImplementation.cpp
DrawState.cpp
Expand Down
2 changes: 2 additions & 0 deletions src/osgEarthDrivers/fastdxt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ IF(WIN32)
ENDIF(CURL_IS_STATIC)
ENDIF(WIN32)

SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OPENTHREADS_LIBRARY)

SET(TARGET_H
dxt.h
libdxt.h
Expand Down
3 changes: 3 additions & 0 deletions src/osgEarthDrivers/featurefilter_intersect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ SET(TARGET_H
IntersectFeatureFilterOptions
)

SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OPENTHREADS_LIBRARY)

SETUP_PLUGIN(osgearth_featurefilter_intersect)

# to install public driver includes:
SET(LIB_NAME featurefilter_intersect)
SET(LIB_PUBLIC_HEADERS ${TARGET_H})

INCLUDE(ModuleInstallOsgEarthDriverIncludes OPTIONAL)
1 change: 1 addition & 0 deletions src/osgEarthDrivers/featurefilter_join/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SET(TARGET_H
JoinFeatureFilterOptions
)

SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OPENTHREADS_LIBRARY)
SETUP_PLUGIN(osgearth_featurefilter_join)

# to install public driver includes:
Expand Down
Loading

0 comments on commit 6ac221f

Please sign in to comment.