Commit ca8fca95ed377d8ebe08eb186fe5b88c61c73ff0
1 parent
3a7ad0f9
looked for closedbr automatically
Showing
2 changed files
with
11 additions
and
2 deletions
CMakeLists.txt
| @@ -134,6 +134,17 @@ if(BUILD_TESTING) | @@ -134,6 +134,17 @@ if(BUILD_TESTING) | ||
| 134 | mark_as_advanced(BUILDNAME) | 134 | mark_as_advanced(BUILDNAME) |
| 135 | endif() | 135 | endif() |
| 136 | 136 | ||
| 137 | +# Look for closedbr automatically | ||
| 138 | +set(BR_THIRDPARTY_PLUGINS_DIR CACHE PATH "") | ||
| 139 | +set(BR_THIRDPARTY_APPS_DIR CACHE PATH "") | ||
| 140 | +mark_as_advanced(BR_THIRDPARTY_PLUGINS_DIR) | ||
| 141 | +mark_as_advanced(BR_THIRDPARTY_APPS_DIR) | ||
| 142 | +set(CLOSEDBR_DIR "${CMAKE_SOURCE_DIR}/../closedbr") | ||
| 143 | +if(EXISTS "${CLOSEDBR_DIR}" AND IS_DIRECTORY "${CLOSEDBR_DIR}") | ||
| 144 | + set(BR_THIRDPARTY_PLUGINS_DIR ${BR_THIRDPARTY_PLUGINS_DIR} "${CLOSEDBR_DIR}/plugins") | ||
| 145 | + set(BR_THIRDPARTY_APPS_DIR ${BR_THIRDPARTY_APPS_DIR} "${CLOSEDBR_DIR}/app") | ||
| 146 | +endif() | ||
| 147 | + | ||
| 137 | # Build the SDK | 148 | # Build the SDK |
| 138 | include_directories(BEFORE .) # Find the local headers first | 149 | include_directories(BEFORE .) # Find the local headers first |
| 139 | add_subdirectory(openbr) | 150 | add_subdirectory(openbr) |
openbr/plugins/plugins.cmake
| @@ -5,8 +5,6 @@ | @@ -5,8 +5,6 @@ | ||
| 5 | # BR_THIRDPARTY_LIBS - Additional libaries needed by a plugin | 5 | # BR_THIRDPARTY_LIBS - Additional libaries needed by a plugin |
| 6 | 6 | ||
| 7 | # Also look for CMake modules in the thirdparty plugins folder(s) | 7 | # Also look for CMake modules in the thirdparty plugins folder(s) |
| 8 | -set(BR_THIRDPARTY_PLUGINS_DIR CACHE PATH "") | ||
| 9 | -mark_as_advanced(BR_THIRDPARTY_PLUGINS_DIR) | ||
| 10 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${BR_THIRDPARTY_PLUGINS_DIR}) | 8 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${BR_THIRDPARTY_PLUGINS_DIR}) |
| 11 | 9 | ||
| 12 | foreach(DIR ${BR_THIRDPARTY_PLUGINS_DIR}) | 10 | foreach(DIR ${BR_THIRDPARTY_PLUGINS_DIR}) |