The CMakeLists.txt allows to override the BACKSCRUB variable to specify the path to the backscrub repository:
|
if(NOT DEFINED BACKSCRUB) |
|
set(BACKSCRUB ../backscrub) |
|
endif() |
Then it does two things with this variable. It sets LIBBACKSRUB_INCLUDE_DIR, which needs to point to the source repository:
|
set(LIBBACKSCRUB_INCLUDE_DIR ${BACKSCRUB}) |
and also it includes a file from the build directory:
|
include(${BACKSCRUB}/build/BackscrubTargets.cmake) |
Here the build directory is assumed to be within the source repository with no way to override. This is not necessarily the case. The cmake build directory can be anywhere, and in the case of building a snap package, it will be along side the source, not inside it.
The CMakeLists.txt allows to override the
BACKSCRUBvariable to specify the path to the backscrub repository:obs-backscrub/CMakeLists.txt
Lines 10 to 12 in de6c75f
Then it does two things with this variable. It sets LIBBACKSRUB_INCLUDE_DIR, which needs to point to the source repository:
obs-backscrub/CMakeLists.txt
Line 16 in de6c75f
and also it includes a file from the build directory:
obs-backscrub/CMakeLists.txt
Line 15 in de6c75f
Here the build directory is assumed to be within the source repository with no way to override. This is not necessarily the case. The cmake build directory can be anywhere, and in the case of building a snap package, it will be along side the source, not inside it.