Last active
August 12, 2019 11:38
-
-
Save agathauy/0021e94210f0bc60c041316a6a0451a8 to your computer and use it in GitHub Desktop.
sample cmake file for opencv 3.4 #opencv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.1) | |
# Enable C++11 | |
set(CMAKE_CXX_STANDARD 11) | |
set(CMAKE_CXX_STANDARD_REQUIRED TRUE) | |
SET(OpenCV_DIR /Users/user/opencv/installation/OpenCV-3.4.5/share/OpenCV) | |
project( DisplayImage ) | |
find_package( OpenCV REQUIRED ) | |
add_executable( DisplayImage DisplayImage.cpp ) | |
target_link_libraries( DisplayImage ${OpenCV_LIBS} ) | |
# In directory of c/c++ files to be built | |
# mkdir build && cd build | |
# cmake .. | |
# cmake --build . --config Release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment