Hi,

OS windows 10. Visual Studio 14 2015 win 64. CMake 3.7.1


I have got some problem to use Caffe in my own project. My cmakelists.txt is

cmake_minimum_required(VERSION 2.8)
PROJECT (HelloWorld)
find_package(opencv  REQUIRED)
find_package(Caffe  REQUIRED)
file(GLOB HelloWorld_srcs
    "*.h"
    "*.cpp")
ADD_EXECUTABLE (HelloWorld ${HelloWorld_srcs})
if (OpenCV_FOUND)
    include_directories( ${OpenCV_INCLUDE_DIRS} )
    target_link_libraries( HelloWorld ${OpenCV_LIBS} )
else (OpenCV_FOUND)
message("PB->OPENCV not found= ${OpenCV_INCLUDE_DIRS}")
endif (OpenCV_FOUND)
if (Caffe_FOUND)
    include_directories( ${Caffe_INCLUDE_DIRS} )
    target_link_libraries( HelloWorld ${Caffe_LIBS} )
else (Caffe_FOUND)
message("PB->Caffe_ not found= ${Caffe_INCLUDE_DIRS} ${Caffe_LIBS} end variable")
endif (Caffe_FOUND)

When I open my solution in VS 8I can opencv include but nothing about caffe (my first line in my c++ program is #include <caffe/caffe.hpp>)


In CaffeConfig.cmake I can read :

# Config file for the Caffe package.
#
# Note:
#   Caffe and this config file depends on opencv,
#   so put `find_package(OpenCV)` before searching Caffe
#   via `find_package(Caffe)`. All other lib/includes
#   dependencies are hard coded in the file
#
# After successful configuration the following variables
# will be defined:
#
#   Caffe_LIBRARIES    - IMPORTED targets to link against
# (There is no Caffe_INCLUDE_DIRS and Caffe_DEFINITIONS # because they are specified in the IMPORTED target interface.)
#
#   Caffe_HAVE_CUDA    - signals about CUDA support
#   Caffe_HAVE_CUDNN   - signals about cuDNN support

What does it mean

There is no Caffe_INCLUDE_DIRS and Caffe_DEFINITIONS because they are specified in the IMPORTED target interface.)


How can I insert caffe include and libs in my project using my cmakelists.txt ?


Thanks in advance for your answer










--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to