OpenSceneGraph
OpenSceneGraph copied to clipboard
osg CMake target does not include auto-generated osg/Config
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>
in TARGET_INCLUDE_DIRECTORIES
in the SETUP_LIBRARY
macro of OsgMacroUtils.cmake
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.