diff --git a/share/ExternalProject/CMakeLists.txt b/share/ExternalProject/CMakeLists.txt index 8659e83281..cd1455c406 100644 --- a/share/ExternalProject/CMakeLists.txt +++ b/share/ExternalProject/CMakeLists.txt @@ -6,4 +6,4 @@ find_package(osgEarth CONFIG REQUIRED) add_executable(ExternalExample main.cpp) -target_link_libraries(ExternalExample PRIVATE osgEarth) +target_link_libraries(ExternalExample PRIVATE osgEarth::osgEarth) diff --git a/share/ExternalProject/README.md b/share/ExternalProject/README.md index 36e01e26ae..2431586578 100644 --- a/share/ExternalProject/README.md +++ b/share/ExternalProject/README.md @@ -1,10 +1,10 @@ # External Project Example -This is a simple example to test the `osgEarthConfig.cmake` packaging configuration file for CMake. +This is a simple example to test the `osgEarth-config.cmake` packaging configuration file for CMake. -These line in your `CMakeLists.txt` will tell CMake to look for `osgEarthConfig.cmake` and use it to resolve osgEarth and its public-facing dependencies: +These line in your `CMakeLists.txt` will tell CMake to look for `osgEarth-config.cmake` and use it to resolve osgEarth and its public-facing dependencies: ``` find_package(osgEarth CONFIG REQUIRED) ... -target_link_libraries(my_project PRIVATE osgEarth) +target_link_libraries(my_project PRIVATE osgEarth::osgEarth) ``` You may need to update your `CMAKE_PREFIX_PATH` to include the location of `osgEarthConfig.cmake`. \ No newline at end of file