testing-repository/OpenCV_test/test1_openimage/CMakeLists.txt

19 lines
542 B
CMake
Raw Normal View History

2021-11-20 23:46:02 +08:00
cmake_minimum_required(VERSION 3.0.0)
project(OpenCV_test VERSION 1.0.0)
#Find the opencv package
find_package(OpenCV REQUIRED)
#include directories for opencv
include_directories(${OpenCV_INCLUDE_DIRS})
add_executable(OpenCV_test main.cpp)
#Add command to generate .gitignore
add_custom_command(TARGET ${PROJECT_NAME}
COMMAND echo \"*\" > ${CMAKE_BINARY_DIR}/.gitignore
COMMAND echo \"**/*\" > ${CMAKE_BINARY_DIR}/.hgignore)
#Add OpenCV Libraries
target_link_libraries(OpenCV_test ${OpenCV_LIBS})