Skip to content

Instantly share code, notes, and snippets.

@diogon01
Last active August 20, 2021 18:09
Show Gist options
  • Save diogon01/14836ba0171c0be376c16faf3b953cb0 to your computer and use it in GitHub Desktop.
Save diogon01/14836ba0171c0be376c16faf3b953cb0 to your computer and use it in GitHub Desktop.
CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
project(guiaOpenCV)
# Use with use custom OpenCV version
#set(OpenCV_DIR <folder-opencv>/opencv/build)
# Requires OpenCV
find_package(OpenCV REQUIRED)
# Show a message with the opencv version detected
MESSAGE("OpenCV version : ${OpenCV_VERSION}")
# Add the paths to the include directories/to the header files
include_directories( ${OpenCV_INCLUDE_DIRS} )
# Add the paths to the compiled libraries/objects
link_directories(${OpenCV_LIB_DIR})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment