From c3587e5c87585f6a7abf403d7fda8523d1310d40 Mon Sep 17 00:00:00 2001 From: Austin Blanton Date: Thu, 6 Feb 2014 12:29:56 -0500 Subject: [PATCH] Use our fork of cvmatio for a better install and move non-find logic to top CMakeLists --- CMakeLists.txt | 5 +++++ share/openbr/cmake/Findcvmatio.cmake | 12 +----------- 2 files changed, 6 insertions(+), 11 deletions(-) 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) -- libgit2 0.21.4