Commit c3587e5c87585f6a7abf403d7fda8523d1310d40
1 parent
cee70e6a
Use our fork of cvmatio for a better install and move non-find logic to top CMakeLists
Showing
2 changed files
with
6 additions
and
11 deletions
CMakeLists.txt
| ... | ... | @@ -96,6 +96,11 @@ set(BR_WITH_CVMATIO OFF CACHE BOOL "Build with cvmatio library to read Matlab da |
| 96 | 96 | if(${BR_WITH_CVMATIO}) |
| 97 | 97 | find_package(cvmatio REQUIRED) |
| 98 | 98 | add_definitions(-DCVMATIO) |
| 99 | + add_subdirectory(${CVMATIO_DIR}) | |
| 100 | + include_directories(${CVMATIO_DIR}/include) | |
| 101 | + set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} ${CVMATIO_DIR}/src/MatlabIO.cpp) | |
| 102 | + link_directories(${CVMATIO_LIB_DIR}) | |
| 103 | + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} cvmatio) | |
| 99 | 104 | endif() |
| 100 | 105 | |
| 101 | 106 | # Compiler flags | ... | ... |
share/openbr/cmake/Findcvmatio.cmake
| 1 | 1 | set(CVMATIO_DIR "${BR_THIRDPARTY_DIR}/cvmatio") |
| 2 | 2 | if(NOT EXISTS ${CVMATIO_DIR}) |
| 3 | 3 | # download source from github |
| 4 | - execute_process(COMMAND "git" "clone" "https://github.com/hbristow/cvmatio.git" WORKING_DIRECTORY ${BR_THIRDPARTY_DIR}) | |
| 4 | + execute_process(COMMAND "git" "clone" "https://github.com/biometrics/cvmatio.git" WORKING_DIRECTORY ${BR_THIRDPARTY_DIR}) | |
| 5 | 5 | else() |
| 6 | 6 | # update the source |
| 7 | 7 | execute_process(COMMAND "git" "pull" WORKING_DIRECTORY ${CVMATIO_DIR}) |
| 8 | 8 | endif() |
| 9 | -add_subdirectory(${CVMATIO_DIR}) | |
| 10 | -include_directories(${CVMATIO_DIR}/include) | |
| 11 | -set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} ${CVMATIO_DIR}/src/MatlabIO.cpp) | |
| 12 | 9 | set(CVMATIO_LIB_DIR ${CMAKE_BINARY_DIR}/3rdparty/cvmatio/src) |
| 13 | -link_directories(${CVMATIO_LIB_DIR}) | |
| 14 | -set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} cvmatio) | |
| 15 | -# because the project's cmake installs to the project folder, | |
| 16 | -# install(TARGETS cvmatio DESTINATION lib) doesn't work | |
| 17 | -# (i get error "target doesn't exist in this directory") | |
| 18 | -# so yeah, this won't work in windows | |
| 19 | -install(FILES ${CVMATIO_LIB_DIR}/libcvmatio.dylib DESTINATION lib) | ... | ... |