Commit ce690bf3e26408dc381db47706e7d0c66a45f782
Merge branch 'master' of https://github.com/biometrics/openbr
Showing
3 changed files
with
17 additions
and
7 deletions
openbr/CMakeLists.txt
| ... | ... | @@ -10,12 +10,12 @@ include(plugins/plugins.cmake) |
| 10 | 10 | # Optional GUI module |
| 11 | 11 | if(NOT ${BR_EMBEDDED}) |
| 12 | 12 | aux_source_directory(gui BR_GUI) |
| 13 | - qt5_add_resources(ICONS icons/icons.qrc) | |
| 13 | + qt5_add_resources(BR_ICONS icons/icons.qrc) | |
| 14 | 14 | file(GLOB HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/gui/*.h) |
| 15 | 15 | install(FILES ${HEADERS} DESTINATION include/openbr/gui) |
| 16 | 16 | endif() |
| 17 | 17 | |
| 18 | -add_library(openbr SHARED ${SRC} ${BR_CORE} ${BR_GUI} ${BR_PLUGIN} ${BR_THIRDPARTY_SRC} ${BR_RESOURCES} ${ICONS} ${NATURALSTRINGCOMPARE_SRC}) | |
| 18 | +add_library(openbr SHARED ${SRC} ${BR_CORE} ${BR_GUI} ${BR_ICONS} ${BR_THIRDPARTY_SRC} ${BR_RESOURCES} ${NATURALSTRINGCOMPARE_SRC}) | |
| 19 | 19 | qt5_use_modules(openbr ${QT_DEPENDENCIES}) |
| 20 | 20 | set_target_properties(openbr PROPERTIES |
| 21 | 21 | DEFINE_SYMBOL BR_LIBRARY | ... | ... |
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 | +# Also look for CMake modules in the thirdparty plugins folder(s) | |
| 8 | +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${BR_THIRDPARTY_PLUGINS_DIR}) | |
| 9 | + | |
| 10 | +foreach(DIR ${BR_THIRDPARTY_PLUGINS_DIR}) | |
| 11 | + file(GLOB PLUGINS ${DIR}/*.cpp ${DIR}/*.h) # Add the headers too so MOC runs on them | |
| 12 | + set(BR_THIRDPARTY_PLUGINS ${BR_THIRDPARTY_PLUGINS} ${PLUGINS}) | |
| 13 | +endforeach() | |
| 3 | 14 | |
| 4 | 15 | file(GLOB PLUGINS plugins/*.cpp plugins/*.h) |
| 5 | 16 | foreach(PLUGIN ${PLUGINS} ${BR_THIRDPARTY_PLUGINS}) |
| ... | ... | @@ -12,4 +23,3 @@ foreach(PLUGIN ${PLUGINS} ${BR_THIRDPARTY_PLUGINS}) |
| 12 | 23 | set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} ${PLUGIN}) |
| 13 | 24 | endif() |
| 14 | 25 | endforeach() |
| 15 | - | ... | ... |
openbr/plugins/pp5.cpp
| ... | ... | @@ -97,8 +97,8 @@ struct PP5Context |
| 97 | 97 | |
| 98 | 98 | static void createRawImage(const cv::Mat &src, ppr_raw_image_type &dst) |
| 99 | 99 | { |
| 100 | - if (!src.isContinuous()) qFatal("PP5Context::createRawImage requires continuous data."); | |
| 101 | - if (src.channels() == 3) ppr_raw_image_create(&dst, src.cols, src.rows, PPR_RAW_IMAGE_BGR24); | |
| 100 | + if (!src.isContinuous()) qFatal("PP5Context::createRawImage requires continuous data."); | |
| 101 | + else if (src.channels() == 3) ppr_raw_image_create(&dst, src.cols, src.rows, PPR_RAW_IMAGE_BGR24); | |
| 102 | 102 | else if (src.channels() == 1) ppr_raw_image_create(&dst, src.cols, src.rows, PPR_RAW_IMAGE_GRAY8); |
| 103 | 103 | else qFatal("PP5Context::createRawImage invalid channel count."); |
| 104 | 104 | memcpy(dst.data, src.data, src.channels()*src.rows*src.cols); | ... | ... |