Commit dc22c362303ccb212b4dedca83110bbfed3e81f0
1 parent
4f47bb04
misc cmake cleanup
Showing
6 changed files
with
45 additions
and
42 deletions
CMakeLists.txt
| @@ -142,7 +142,6 @@ endif() | @@ -142,7 +142,6 @@ endif() | ||
| 142 | # Look for extensions to OpenBR | 142 | # Look for extensions to OpenBR |
| 143 | set(BR_THIRDPARTY_PLUGINS_DIR CACHE PATH "") | 143 | set(BR_THIRDPARTY_PLUGINS_DIR CACHE PATH "") |
| 144 | set(BR_THIRDPARTY_APPS_DIR CACHE PATH "") | 144 | set(BR_THIRDPARTY_APPS_DIR CACHE PATH "") |
| 145 | -set(BR_THIRDPARTY_DIR CACHE PATH "") | ||
| 146 | mark_as_advanced(BR_THIRDPARTY_PLUGINS_DIR) | 145 | mark_as_advanced(BR_THIRDPARTY_PLUGINS_DIR) |
| 147 | mark_as_advanced(BR_THIRDPARTY_APPS_DIR) | 146 | mark_as_advanced(BR_THIRDPARTY_APPS_DIR) |
| 148 | 147 | ||
| @@ -190,29 +189,29 @@ if(${BR_INSTALL_BRPY}) | @@ -190,29 +189,29 @@ if(${BR_INSTALL_BRPY}) | ||
| 190 | endif() | 189 | endif() |
| 191 | 190 | ||
| 192 | # Package | 191 | # Package |
| 193 | -if (NOT BR_PACKAGE_THIRDPARTY) | ||
| 194 | -set(CPACK_PACKAGE_EXECUTABLES "OpenBR" "OpenBR") | ||
| 195 | -set(CPACK_CREATE_DESKTOP_LINKS "OpenBR") | ||
| 196 | -if(CMAKE_HOST_WIN32) | ||
| 197 | - set(CPACK_NSIS_MODIFY_PATH ON) | ||
| 198 | - set(CPACK_NSIS_MUI_ICON ${NATIVE_ICON}) | ||
| 199 | - set(CPACK_NSIS_MUI_UNIICON ${NATIVE_ICON}) | ||
| 200 | - set(CPACK_NSIS_MENU_LINKS "doc/html/index.html" "Documentation") | ||
| 201 | - if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") | ||
| 202 | - set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") | 192 | +if(NOT ${BR_PACKAGE_THIRDPARTY}) |
| 193 | + set(CPACK_PACKAGE_EXECUTABLES "OpenBR" "OpenBR") | ||
| 194 | + set(CPACK_CREATE_DESKTOP_LINKS "OpenBR") | ||
| 195 | + if(CMAKE_HOST_WIN32) | ||
| 196 | + set(CPACK_NSIS_MODIFY_PATH ON) | ||
| 197 | + set(CPACK_NSIS_MUI_ICON ${NATIVE_ICON}) | ||
| 198 | + set(CPACK_NSIS_MUI_UNIICON ${NATIVE_ICON}) | ||
| 199 | + set(CPACK_NSIS_MENU_LINKS "doc/html/index.html" "Documentation") | ||
| 200 | + if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") | ||
| 201 | + set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") | ||
| 202 | + endif() | ||
| 203 | + set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\br-gui.exe") | ||
| 204 | + elseif(CMAKE_HOST_APPLE) | ||
| 205 | + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/README.md" "README.txt" COPYONLY) | ||
| 206 | + set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") | ||
| 207 | + set(CPACK_BUNDLE_NAME ${CPACK_PACKAGE_NAME}) | ||
| 208 | + set(CPACK_BUNDLE_ICON ${NATIVE_ICON}) | ||
| 209 | + set(CPACK_BUNDLE_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) | ||
| 210 | + set(CPACK_BUNDLE_STARTUP_COMMAND ${BR_SHARE_DIR}/bundle.sh) | ||
| 211 | + configure_file(${BR_SHARE_DIR}/Info.plist.in Info.plist) | ||
| 212 | + else() | ||
| 213 | + set(CPACK_DEBIAN_PACKAGE_MAINTAINER "josh.klontz@gmail.com") | ||
| 203 | endif() | 214 | endif() |
| 204 | - set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\br-gui.exe") | ||
| 205 | -elseif(CMAKE_HOST_APPLE) | ||
| 206 | - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/README.md" "README.txt" COPYONLY) | ||
| 207 | - set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") | ||
| 208 | - set(CPACK_BUNDLE_NAME ${CPACK_PACKAGE_NAME}) | ||
| 209 | - set(CPACK_BUNDLE_ICON ${NATIVE_ICON}) | ||
| 210 | - set(CPACK_BUNDLE_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) | ||
| 211 | - set(CPACK_BUNDLE_STARTUP_COMMAND ${BR_SHARE_DIR}/bundle.sh) | ||
| 212 | - configure_file(${BR_SHARE_DIR}/Info.plist.in Info.plist) | ||
| 213 | -else() | ||
| 214 | - set(CPACK_DEBIAN_PACKAGE_MAINTAINER "josh.klontz@gmail.com") | ||
| 215 | -endif() | ||
| 216 | 215 | ||
| 217 | -include(CPack) | 216 | + include(CPack) |
| 218 | endif() | 217 | endif() |
app/CMakeLists.txt
| 1 | # Build the command line interface | 1 | # Build the command line interface |
| 2 | add_subdirectory(br) | 2 | add_subdirectory(br) |
| 3 | 3 | ||
| 4 | -if (NOT BR_PACKAGE_THIRDPARTY) | ||
| 5 | -# Build examples/tests | ||
| 6 | -add_subdirectory(examples) | 4 | +if(NOT BR_PACKAGE_THIRDPARTY) |
| 5 | + if(NOT BR_EMBEDDED) | ||
| 6 | + # Build examples/tests | ||
| 7 | + add_subdirectory(examples) | ||
| 7 | 8 | ||
| 8 | -# Build additional OpenBR utilities | ||
| 9 | -if(NOT ${BR_EMBEDDED}) | ||
| 10 | - add_subdirectory(br-gui) | ||
| 11 | -endif() | 9 | + # Build additional OpenBR utilities |
| 10 | + add_subdirectory(br-gui) | ||
| 11 | + endif() | ||
| 12 | endif() | 12 | endif() |
openbr/CMakeLists.txt
| @@ -32,14 +32,14 @@ target_link_libraries(openbr ${BR_THIRDPARTY_LIBS}) | @@ -32,14 +32,14 @@ target_link_libraries(openbr ${BR_THIRDPARTY_LIBS}) | ||
| 32 | add_cppcheck(openbr) | 32 | add_cppcheck(openbr) |
| 33 | 33 | ||
| 34 | # Janus implementation | 34 | # Janus implementation |
| 35 | -set(BR_WITH_JANUS ON CACHE BOOL "Build IARPA Janus related applications.") | ||
| 36 | -if (BR_WITH_JANUS) | ||
| 37 | -set(JANUS_BUILD_PP5_WRAPPER ${BR_WITH_PP5} CACHE BOOL "Build Janus implementation using PittPatt 5") | ||
| 38 | -set(JANUS_BUILD_DOCS ${BR_BUILD_DOCUMENTATION} CACHE BOOL "Build Janus HTML Doxygen documentation") | ||
| 39 | -mark_as_advanced(JANUS_BUILD_PP5_WRAPPER) | ||
| 40 | -mark_as_advanced(JANUS_BUILD_DOCS) | ||
| 41 | -set(JANUS_IMPLEMENTATION openbr) | ||
| 42 | -add_subdirectory(janus) | 35 | +option(BR_WITH_JANUS "Build IARPA Janus related applications." ON) |
| 36 | +if(BR_WITH_JANUS) | ||
| 37 | + set(JANUS_BUILD_PP5_WRAPPER ${BR_WITH_PP5} CACHE BOOL "Build Janus implementation using PittPatt 5") | ||
| 38 | + set(JANUS_BUILD_DOCS ${BR_BUILD_DOCUMENTATION} CACHE BOOL "Build Janus HTML Doxygen documentation") | ||
| 39 | + mark_as_advanced(JANUS_BUILD_PP5_WRAPPER) | ||
| 40 | + mark_as_advanced(JANUS_BUILD_DOCS) | ||
| 41 | + set(JANUS_IMPLEMENTATION openbr) | ||
| 42 | + add_subdirectory(janus) | ||
| 43 | endif() | 43 | endif() |
| 44 | 44 | ||
| 45 | # Install | 45 | # Install |
openbr/plugins/cmake/eigen3.cmake
| @@ -2,7 +2,9 @@ set(BR_WITH_EIGEN3 ON CACHE BOOL "Build Eigen3 plugins") | @@ -2,7 +2,9 @@ set(BR_WITH_EIGEN3 ON CACHE BOOL "Build Eigen3 plugins") | ||
| 2 | 2 | ||
| 3 | if(${BR_WITH_EIGEN3}) | 3 | if(${BR_WITH_EIGEN3}) |
| 4 | find_package(Eigen3 REQUIRED) | 4 | find_package(Eigen3 REQUIRED) |
| 5 | - install(FILES ${EIGEN3_LICENSE} RENAME Eigen3 DESTINATION share/openbr/licenses) | 5 | + if(${BR_INSTALL_SHARE}) |
| 6 | + install(FILES ${EIGEN3_LICENSE} RENAME Eigen3 DESTINATION share/openbr/licenses) | ||
| 7 | + endif() | ||
| 6 | else() | 8 | else() |
| 7 | set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/classification/lda.cpp) | 9 | set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/classification/lda.cpp) |
| 8 | set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/distance/L1.cpp) | 10 | set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/distance/L1.cpp) |
openbr/plugins/cmake/network.cmake
| @@ -4,7 +4,9 @@ if(${BR_WITH_QTNETWORK}) | @@ -4,7 +4,9 @@ if(${BR_WITH_QTNETWORK}) | ||
| 4 | find_package(HttpParser) | 4 | find_package(HttpParser) |
| 5 | set(QT_DEPENDENCIES ${QT_DEPENDENCIES} Network) | 5 | set(QT_DEPENDENCIES ${QT_DEPENDENCIES} Network) |
| 6 | set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} ${HTTPPARSER_SRC}) | 6 | set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} ${HTTPPARSER_SRC}) |
| 7 | - install(FILES ${HTTPPARSER_LICENSE} RENAME http-parser DESTINATION share/openbr/licenses) | 7 | + if(${BR_INSTALL_SHARE}) |
| 8 | + install(FILES ${HTTPPARSER_LICENSE} RENAME http-parser DESTINATION share/openbr/licenses) | ||
| 9 | + endif() | ||
| 8 | else() | 10 | else() |
| 9 | set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/format/url.cpp) | 11 | set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/format/url.cpp) |
| 10 | set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/format/post.cpp) | 12 | set(BR_EXCLUDED_PLUGINS ${BR_EXCLUDED_PLUGINS} plugins/format/post.cpp) |