Created
December 2, 2012 02:47
-
-
Save zolunx10/4186692 to your computer and use it in GitHub Desktop.
An CMakeLists template of opencv+mingw project = =
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 2.6) | |
PROJECT("project_name") | |
INCLUDE_DIRECTORIES("$ENV{opencv}/build/include" "$ENV{opencv}/build/include/opencv") | |
LINK_DIRECTORIES("$ENV{opencv}/build/mingw/lib") | |
ADD_DEFINITIONS(-DHAVE_LRINT -DHAVE_LRINTF) | |
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") | |
SET(CMAKE_BUILD_TYPE Debug) | |
SET(SOURCES your_source.cpp) | |
ADD_EXECUTABLE (${PROJECT_NAME} ${SOURCES}) | |
TARGET_LINK_LIBRARIES(${PROJECT_NAME} opencv_highgui242 opencv_objdetect242 opencv_imgproc242 opencv_core242) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment