From ca8fca95ed377d8ebe08eb186fe5b88c61c73ff0 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Fri, 27 Jun 2014 09:10:22 -0400 Subject: [PATCH] looked for closedbr automatically --- CMakeLists.txt | 11 +++++++++++ openbr/plugins/plugins.cmake | 2 -- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 360797c..378b0bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,6 +134,17 @@ if(BUILD_TESTING) mark_as_advanced(BUILDNAME) endif() +# Look for closedbr automatically +set(BR_THIRDPARTY_PLUGINS_DIR CACHE PATH "") +set(BR_THIRDPARTY_APPS_DIR CACHE PATH "") +mark_as_advanced(BR_THIRDPARTY_PLUGINS_DIR) +mark_as_advanced(BR_THIRDPARTY_APPS_DIR) +set(CLOSEDBR_DIR "${CMAKE_SOURCE_DIR}/../closedbr") +if(EXISTS "${CLOSEDBR_DIR}" AND IS_DIRECTORY "${CLOSEDBR_DIR}") + set(BR_THIRDPARTY_PLUGINS_DIR ${BR_THIRDPARTY_PLUGINS_DIR} "${CLOSEDBR_DIR}/plugins") + set(BR_THIRDPARTY_APPS_DIR ${BR_THIRDPARTY_APPS_DIR} "${CLOSEDBR_DIR}/app") +endif() + # Build the SDK include_directories(BEFORE .) # Find the local headers first add_subdirectory(openbr) diff --git a/openbr/plugins/plugins.cmake b/openbr/plugins/plugins.cmake index ff2c609..163e15c 100644 --- a/openbr/plugins/plugins.cmake +++ b/openbr/plugins/plugins.cmake @@ -5,8 +5,6 @@ # BR_THIRDPARTY_LIBS - Additional libaries needed by a plugin # Also look for CMake modules in the thirdparty plugins folder(s) -set(BR_THIRDPARTY_PLUGINS_DIR CACHE PATH "") -mark_as_advanced(BR_THIRDPARTY_PLUGINS_DIR) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${BR_THIRDPARTY_PLUGINS_DIR}) foreach(DIR ${BR_THIRDPARTY_PLUGINS_DIR}) -- libgit2 0.21.4