diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a0e440..d878599 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,6 +96,11 @@ set(BR_WITH_CVMATIO OFF CACHE BOOL "Build with cvmatio library to read Matlab da if(${BR_WITH_CVMATIO}) find_package(cvmatio REQUIRED) add_definitions(-DCVMATIO) + add_subdirectory(${CVMATIO_DIR}) + include_directories(${CVMATIO_DIR}/include) + set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} ${CVMATIO_DIR}/src/MatlabIO.cpp) + link_directories(${CVMATIO_LIB_DIR}) + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} cvmatio) endif() # Compiler flags diff --git a/share/openbr/cmake/Findcvmatio.cmake b/share/openbr/cmake/Findcvmatio.cmake index 80d9222..dc8f172 100644 --- a/share/openbr/cmake/Findcvmatio.cmake +++ b/share/openbr/cmake/Findcvmatio.cmake @@ -1,19 +1,9 @@ set(CVMATIO_DIR "${BR_THIRDPARTY_DIR}/cvmatio") if(NOT EXISTS ${CVMATIO_DIR}) # download source from github - execute_process(COMMAND "git" "clone" "https://github.com/hbristow/cvmatio.git" WORKING_DIRECTORY ${BR_THIRDPARTY_DIR}) + execute_process(COMMAND "git" "clone" "https://github.com/biometrics/cvmatio.git" WORKING_DIRECTORY ${BR_THIRDPARTY_DIR}) else() # update the source execute_process(COMMAND "git" "pull" WORKING_DIRECTORY ${CVMATIO_DIR}) endif() -add_subdirectory(${CVMATIO_DIR}) -include_directories(${CVMATIO_DIR}/include) -set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} ${CVMATIO_DIR}/src/MatlabIO.cpp) set(CVMATIO_LIB_DIR ${CMAKE_BINARY_DIR}/3rdparty/cvmatio/src) -link_directories(${CVMATIO_LIB_DIR}) -set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} cvmatio) -# because the project's cmake installs to the project folder, -# install(TARGETS cvmatio DESTINATION lib) doesn't work -# (i get error "target doesn't exist in this directory") -# so yeah, this won't work in windows -install(FILES ${CVMATIO_LIB_DIR}/libcvmatio.dylib DESTINATION lib)