opencv_example/CMakeLists.txt

17 lines
519 B
CMake

cmake_minimum_required(VERSION 3.1)
PROJECT (example)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules)
find_package(OpenCV HINTS /usr/local/opt/opencv /usr/local/Cellar/opencv REQUIRED)
set( NAME_SRC
example.cpp
)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/include )
link_directories( ${CMAKE_BINARY_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
add_executable( example ${NAME_SRC} ${NAME_HEADERS} )
target_link_libraries( example ${OpenCV_LIBS} )