Properly search for OpenCV.
This commit is contained in:
@@ -24,6 +24,7 @@ find_package(OpenGL REQUIRED)
|
|||||||
find_package(GLUT REQUIRED)
|
find_package(GLUT REQUIRED)
|
||||||
find_package(png++ REQUIRED)
|
find_package(png++ REQUIRED)
|
||||||
find_package(Boost REQUIRED COMPONENTS filesystem program_options)
|
find_package(Boost REQUIRED COMPONENTS filesystem program_options)
|
||||||
|
find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs)
|
||||||
|
|
||||||
target_link_libraries(fmri PUBLIC
|
target_link_libraries(fmri PUBLIC
|
||||||
Caffe::Caffe
|
Caffe::Caffe
|
||||||
@@ -31,6 +32,9 @@ target_link_libraries(fmri PUBLIC
|
|||||||
OpenGL::GLU
|
OpenGL::GLU
|
||||||
png++::png++
|
png++::png++
|
||||||
Boost::program_options
|
Boost::program_options
|
||||||
|
opencv_core
|
||||||
|
opencv_imgproc
|
||||||
|
opencv_imgcodecs
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(fmri PUBLIC
|
target_include_directories(fmri PUBLIC
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ find_library(Caffe_LIBRARY
|
|||||||
PATHS ${Caffe_DIR}
|
PATHS ${Caffe_DIR}
|
||||||
DOC "The Caffe library")
|
DOC "The Caffe library")
|
||||||
|
|
||||||
find_package(OpenCV REQUIRED)
|
|
||||||
find_package(Glog REQUIRED)
|
find_package(Glog REQUIRED)
|
||||||
find_package(Boost 1.55 REQUIRED COMPONENTS system)
|
find_package(Boost 1.55 REQUIRED COMPONENTS system)
|
||||||
|
|
||||||
@@ -48,9 +47,9 @@ if (CAFFE_FOUND)
|
|||||||
add_library(Caffe::Caffe UNKNOWN IMPORTED)
|
add_library(Caffe::Caffe UNKNOWN IMPORTED)
|
||||||
set_target_properties(Caffe::Caffe PROPERTIES
|
set_target_properties(Caffe::Caffe PROPERTIES
|
||||||
INTERFACE_COMPILE_DEFINITIONS "${Caffe_DEFINITIONS}"
|
INTERFACE_COMPILE_DEFINITIONS "${Caffe_DEFINITIONS}"
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${Caffe_INCLUDE_DIR};${OpenCV_INCLUDE_DIRS}"
|
INTERFACE_INCLUDE_DIRECTORIES "${Caffe_INCLUDE_DIR}"
|
||||||
IMPORTED_LOCATION "${Caffe_LIBRARY}"
|
IMPORTED_LOCATION "${Caffe_LIBRARY}"
|
||||||
INTERFACE_LINK_LIBRARIES "Glog::Glog;Boost::system;${OpenCV_LIBRARIES};${Caffe_ADDITIONAL_LIBS}"
|
INTERFACE_LINK_LIBRARIES "Glog::Glog;Boost::system;${Caffe_ADDITIONAL_LIBS}"
|
||||||
)
|
)
|
||||||
|
|
||||||
set(Caffe_LIBRARIES ${Caffe_LIBRARY})
|
set(Caffe_LIBRARIES ${Caffe_LIBRARY})
|
||||||
|
|||||||
Reference in New Issue
Block a user