-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
64 lines (52 loc) · 1.22 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(test)
find_package(Boost REQUIRED)
set(OPENCV_MANUAL_PATH /usr/local/include/opencv /usr/local/include/opencv2)
IF (APPLE)
set (GLOG_PATH /usr/local/Cellar/glog/0.3.3/include/glog)
ELSE (APPLE)
set (GLOG_PATH /usr/local/include/glog)
set (BOOST_PATH /usr/local/include/boost)
ENDIF (APPLE)
set(RESEARCH_ROOT_PATH ${PROJECT_SOURCE_DIR}/../)
include_directories(${PROJECT_SOURCE_DIR})
include_directories(${OPENCV_MANUAL_PATH})
include_directories(${Boost_INCLUDE_DIRS})
include_directories(${GLOG_PATH})
include_directories(${RESEARCH_ROOT_PATH})
# for static
set(GLOG_LIBS glog)
set(MANUAL_CV_LIBS
opencv_core
opencv_imgproc
opencv_video
opencv_highgui
opencv_objdetect
opencv_nonfree
opencv_flann
opencv_ml
opencv_features2d)
IF (APPLE)
set(BOOST_LIBS
boost_program_options-mt
boost_system-mt
boost_filesystem-mt
boost_date_time-mt)
ELSE (APPLE)
set(BOOST_LIBS
boost_program_options
boost_system
boost_filesystem
boost_date_time)
ENDIF (APPLE)
# dynamic
link_directories(/usr/local/lib)
add_executable(test
test.cpp
fuzzy_clustering.cpp)
target_link_libraries(
test
${MANUAL_CV_LIBS}
${GLOG_LIBS}
${BOOST_LIBS}
)