Open mmurrian opened 3 years ago
Please generate a PR if you think you have a useful fix.
Will do. I don't understand your build system well enough to know if there's a reason why you wouldn't want it fixed this way... but I'll let you answer that question in a PR.
target_include_directories(osg ...) does not include the directory that contains the autogenerated osg/Config.
This prevents building and linking against OpenSceneGraph as part of a larger CMake build (e.g., via
add_subdirectory(OpenSceneGraph)
) without explicitly installing OSG.I fixed this by adding
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
inTARGET_INCLUDE_DIRECTORIES
in theSETUP_LIBRARY
macro of OsgMacroUtils.cmake