I’m trying to make a simple cmake based app with openCV with the following CMakeLists.txt:
cmake_minimum_required(VERSION 3.8)
set( CMAKE_VERBOSE_MAKEFILE ON )
project(ritratto)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
get_filename_component( CINDER_PATH "~/Repositories/Cinder" ABSOLUTE )
get_filename_component( APP_PATH "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE )
include( ${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake )
ci_make_app(
APP_NAME "Ritratto"
CINDER_PATH ${CINDER_PATH}
SOURCES ${APP_PATH}/src/main.cpp
INCLUDES ${APP_PATH}/include
BLOCKS ${CINDER_PATH}/blocks/Cinder-OpenCV3
)
But I get the following warning from CMake and the compiler fails to find OpenCV:
CMake Warning at /Users/mattia/Repositories/Cinder/proj/cmake/modules/cinderMakeApp.cmake:145 (find_package):
Could not find a package configuration file provided by "Cinder-OpenCV3"
with any of the following names:
Cinder-OpenCV3Config.cmake
cinder-opencv3-config.cmake
Add the installation prefix of "Cinder-OpenCV3" to CMAKE_PREFIX_PATH or set
"Cinder-OpenCV3_DIR" to a directory containing one of the above files. If
"Cinder-OpenCV3" provides a separate development package or SDK, be sure it
has been installed.
I tried adding another cinder block (Box2D) and that seemed to work fine, and I noticed that Box2D contained a cmake file while the OpenCV3 one did not. Is there something I’m doing wrong or is the OpenCV3 block not compatible with ci_make_app?