Commit a5668629f79cf238dd945cb9cf86580e014ec4cb
1 parent
c04f31c4
introduced a mechanism for compiling in plugins that live outside the plugins folder
Showing
1 changed file
with
10 additions
and
2 deletions
openbr/plugins/plugins.cmake
| 1 | -# Add source to BR_THIRDPARTY_SRC | ||
| 2 | -# Add libs to BR_THIRDPARTY_LIBS | 1 | +# Optional Appendable CMake Variables: |
| 2 | +# BR_THIRDPARTY_PLUGINS - Additional plugins | ||
| 3 | +# BR_THIRDPARTY_PLUGINS_DIR - Additional folder(s) of plugins | ||
| 4 | +# BR_THIRDPARTY_SRC - Additional source code needed by a plugin | ||
| 5 | +# BR_THIRDPARTY_LIBS - Additional libaries needed by a plugin | ||
| 6 | + | ||
| 7 | +foreach(DIR ${BR_THIRDPARTY_PLUGINS_DIR}) | ||
| 8 | + file(GLOB PLUGINS ${DIR}/*.cpp ${DIR}/*.h) # Add the headers too so MOC runs on them | ||
| 9 | + set(BR_THIRDPARTY_PLUGINS ${BR_THIRDPARTY_PLUGINS} ${PLUGINS}) | ||
| 10 | +endforeach() | ||
| 3 | 11 | ||
| 4 | file(GLOB PLUGINS plugins/*.cpp plugins/*.h) | 12 | file(GLOB PLUGINS plugins/*.cpp plugins/*.h) |
| 5 | foreach(PLUGIN ${PLUGINS} ${BR_THIRDPARTY_PLUGINS}) | 13 | foreach(PLUGIN ${PLUGINS} ${BR_THIRDPARTY_PLUGINS}) |