diff --git a/src/applications/CMakeLists.txt b/src/applications/CMakeLists.txt index a193211440..3678f62059 100644 --- a/src/applications/CMakeLists.txt +++ b/src/applications/CMakeLists.txt @@ -70,7 +70,7 @@ if(NOT OSGEARTH_BUILD_PLATFORM_IPHONE) add_subdirectory(osgearth_tracks) add_subdirectory(osgearth_transform) endif() - endif(OSGEARTH_BUILD_EXAMPLES) + endif() if(OSGEARTH_BUILD_TESTS) set(TARGET_DEFAULT_LABEL_PREFIX "Test") @@ -84,15 +84,15 @@ if(NOT OSGEARTH_BUILD_PLATFORM_IPHONE) if(OSGEARTH_BUILD_LEGACY_CONTROLS_API) add_subdirectory(osgearth_shadercomp) - if(SILVERLINING_FOUND) + if(OSGEARTH_HAVE_SILVERLINING_NODEKIT) add_subdirectory(osgearth_silverlining) - endif(SILVERLINING_FOUND) + endif() - if(TRITON_FOUND) + if(OSGEARTH_HAVE_TRITON_NODEKIT) add_subdirectory(osgearth_triton) - endif(TRITON_FOUND) + endif() endif() - endif(OSGEARTH_BUILD_TESTS) + endif() else() diff --git a/src/applications/osgearth_silverlining/CMakeLists.txt b/src/applications/osgearth_silverlining/CMakeLists.txt index 51c38f7e62..e606c3ffe8 100644 --- a/src/applications/osgearth_silverlining/CMakeLists.txt +++ b/src/applications/osgearth_silverlining/CMakeLists.txt @@ -1,9 +1,6 @@ -INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS}) -SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGGA_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY) +add_osgearth_app( + TARGET osgearth_silverlining + SOURCES osgearth_silverlining.cpp + FOLDER Tests ) -SET(TARGET_COMMON_LIBRARIES ${TARGET_COMMON_LIBRARIES} osgEarthSilverLining) - -SET(TARGET_SRC osgearth_silverlining.cpp ) - -#### end var setup ### -SETUP_APPLICATION(osgearth_silverlining) +target_link_libraries(osgearth_silverlining PRIVATE osgEarthSilverLining ${OPENGL_LIBRARIES}) diff --git a/src/applications/osgearth_triton/CMakeLists.txt b/src/applications/osgearth_triton/CMakeLists.txt index 5b44ce23f1..e9b28adde7 100644 --- a/src/applications/osgearth_triton/CMakeLists.txt +++ b/src/applications/osgearth_triton/CMakeLists.txt @@ -1,26 +1,6 @@ -# Triton example -# Later, if we want to link in the Triton library directly -# to use the Triton API, uncomment the include and lib -# below. +add_osgearth_app( + TARGET osgearth_triton + SOURCES osgearth_triton.cpp + FOLDER Tests ) -INCLUDE_DIRECTORIES( - ${OSG_INCLUDE_DIRS} -) - -# 3rd party: -SET(TARGET_LIBRARIES_VARS - OSG_LIBRARY - OSGDB_LIBRARY - OSGGA_LIBRARY - OSGUTIL_LIBRARY - OSGVIEWER_LIBRARY - OPENTHREADS_LIBRARY -) - -# osgEarth: -SET(TARGET_COMMON_LIBRARIES ${TARGET_COMMON_LIBRARIES} osgEarthTriton) - -SET(TARGET_SRC osgearth_triton.cpp) - -#### end var setup ### -SETUP_APPLICATION(osgearth_triton) +target_link_libraries(osgearth_triton PRIVATE osgEarthTriton ${OPENGL_LIBRARIES})