Skip to content

Commit

Permalink
Separate the build dir and include dir variables
Browse files Browse the repository at this point in the history
After patching backscrub to install its header into the prefix,
this patch makes obs-backscrub get the header from its installed
location.

The link targets are still fetched from the backscrub build dir
and that variable is renamed to indicate that it is only used
for that purpose.

Both variables can be overridden separately.

See ali1234/backscrub@9dea13b
and phlash#3
  • Loading branch information
ali1234 committed Aug 31, 2021
1 parent de6c75f commit 34b5fc1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ find_package(LibObs REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Threads REQUIRED)

if(NOT DEFINED BACKSCRUB)
set(BACKSCRUB ../backscrub)
if(NOT DEFINED BACKSCRUB_BUILD_DIR)
set(BACKSCRUB_BUILD_DIR ../backscrub/build)
endif()

if (NOT DEFINED LIBBACKSCRUB_INCLUDE_DIR)
set(LIBBACKSCRUB_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
endif()

# Pull in backscrub and dependencies
include(${BACKSCRUB}/build/BackscrubTargets.cmake)
set(LIBBACKSCRUB_INCLUDE_DIR ${BACKSCRUB})
include(${BACKSCRUB_BUILD_DIR}/BackscrubTargets.cmake)

set(obs-backscrub_SOURCES
obs-backscrub.cpp)
Expand Down
2 changes: 1 addition & 1 deletion obs-backscrub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <condition_variable>
#include <obs-module.h>
#include <stdio.h>
#include "lib/libbackscrub.h"
#include "libbackscrub.h"

// Setting names & default values
static const char MODEL_SETTING[] = "Segmentation model";
Expand Down

0 comments on commit 34b5fc1

Please sign in to comment.