forked from nsalminen/OpenCV-Features-Comparison
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
37 lines (35 loc) · 1.97 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
cmake_minimum_required(VERSION 2.8)
project( EvalFramework )
set(CMAKE_BUILD_TYPE Release)
SET(OpenCV_DIR "/vol/home/s1459929/Dropbox/CS1516/Thesis/lib2/share/OpenCV")
SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "/vol/home/s1459929/Dropbox/CS1516/Thesis/lib/boost" "/vol/home/s1459929/Dropbox/CS1516/Thesislib/opencv/include")
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "/vol/home/s1459929/Dropbox/CS1516/Thesis/lib/boost/stage/lib" "/vol/home/s1459929/Dropbox/CS1516/Thesis/lib/opencv/lib")
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
find_package( OpenCV REQUIRED )
find_package( Boost REQUIRED COMPONENTS thread system program_options filesystem )
find_package(OpenMP)
if(OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
file(GLOB_RECURSE EvalFramework_SOURCES "*.cpp")
file(GLOB_RECURSE EvalFramework_HEADERS "*.hpp")
set (EvalFramework_INCLUDE_DIRS "")
foreach (_headerFile ${Foo_HEADERS})
get_filename_component(_dir ${_headerFile} PATH)
list (APPEND EvalFramework_INCLUDE_DIRS ${_dir})
endforeach()
list(REMOVE_DUPLICATES EvalFramework_INCLUDE_DIRS)
include_directories( ${EvalFramework_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ${Boost_INCLUDE_DIR} )
add_executable(EvalFramework main.cpp ImageTransformation.hpp ImageTransformation.cpp FeatureAlgorithm.hpp FeatureAlgorithm.cpp AlgorithmEstimation.hpp AlgorithmEstimation.cpp CollectedStatistics.hpp
CollectedStatistics.cpp)
target_link_libraries( EvalFramework ${OpenCV_LIBS} ${Boost_LIBRARIES} )