Skip to content

Instantly share code, notes, and snippets.

@agathauy
Last active August 12, 2019 11:38
Show Gist options
  • Save agathauy/0021e94210f0bc60c041316a6a0451a8 to your computer and use it in GitHub Desktop.
Save agathauy/0021e94210f0bc60c041316a6a0451a8 to your computer and use it in GitHub Desktop.
sample cmake file for opencv 3.4 #opencv
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