Skip to content

Use CMAKE_CURRENT_SOURCE_DIR to define relative directories

Jordan Williams requested to merge cmake-current-source-dir into master

The paths using CMAKE_SOURCE_DIR are only correct if the CMakeLists.txt file is top-level. When another CMakeLists.txt includes that one with add_subdirectory, those paths break. I know that things are moving towards Meson, but for what it is worth, these are some helpful fixes.

Merge request reports

Loading