Skip to content

Commit

Permalink
osgEarth-config: Set OSG include on target instead of global (#2692)
Browse files Browse the repository at this point in the history
  • Loading branch information
emminizer authored Jan 24, 2025
1 parent a2024fc commit 4e9f3cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/osgEarth-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ set_and_check(osgEarth_BUILD_DIR "${PACKAGE_PREFIX_DIR}")
# always depend on the public-facing OSG libraries
include(CMakeFindDependencyMacro)
find_dependency(OpenSceneGraph REQUIRED COMPONENTS osg osgDB osgGA osgUtil osgViewer OpenThreads)
include_directories(${OPENSCENEGRAPH_INCLUDE_DIR})

# additional public dependencies
foreach(MY_DEPENDENCY @OSGEARTH_PUBLIC_DEPENDENCIES@)
Expand All @@ -46,5 +45,7 @@ foreach(MY_COMPONENT @OSGEARTH_COMPONENTS@)
endif()
endforeach()

target_include_directories(osgEarth::osgEarth INTERFACE "${OPENSCENEGRAPH_INCLUDE_DIR}")

set(osgEarth_FOUND TRUE)
set(OSGEARTH_FOUND TRUE)

0 comments on commit 4e9f3cc

Please sign in to comment.