-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
92 lines (70 loc) · 3.23 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
cmake_minimum_required(VERSION 2.8.3)
project(rs_classifiers)
find_package(catkin REQUIRED robosherlock
message_generation
message_runtime
rapidjson_ros)
#################################################################################
### Constants for project ##
#################################################################################
set(NAMESPACE rs_classifiers)
set(TYPESYSTEM_CPP_PATH ${PROJECT_SOURCE_DIR}/include/rs_classifiers/types)
set(TYPESYSTEM_XML_PATH ${PROJECT_SOURCE_DIR}/descriptors/typesystem)
set(ANNOTATOR_PATH ${PROJECT_SOURCE_DIR}/descriptors/annotators)
set(ENGINE_PATH ${PROJECT_SOURCE_DIR}/descriptors/analysis_engines)
configure_file(${RS_PROJECT_CONFIG} ${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAME}_config.cmake)
################################################################################
## Find all include directories ##
################################################################################
find_include_dirs(RS_Classifier_INCLUDE_DIRS_LIST)
catkin_package(
CATKIN_DEPENDS robosherlock
)
include_directories(
${RapidJSON_INCLUDE_DIRS}
${RS_Classifier_INCLUDE_DIRS_LIST}
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
################################################################################
## Update analysis engines, typesystem and include all relevant files ##
################################################################################
## generate classes from the typesystem xml files
generate_type_system(robosherlock)
#find all relevant files
find_additional_files()
###############################################################################
# Sub Projects ##
###############################################################################
#If you want to divide your projects into subprojects include the subdirectories
#each containing a CMakeLists.txt here
#add_subdirectory(src/xxx)
add_executable(featureExtractor src/tools/feature_extractor.cpp)
target_link_libraries(featureExtractor
${PCL_LIBRARIES}
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
${Boost_LIBRARIES})
add_library(rs_classifiers src/classifiers/RSClassifier.cpp
src/classifiers/RSSVM.cpp
src/classifiers/RSRF.cpp
src/classifiers/RSKNN.cpp)
target_link_libraries(rs_classifiers ${OpenCV_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
#this should be an executable
add_executable(train_classifier src/tools/classifier_trainer.cpp)
target_link_libraries(train_classifier rs_classifiers
${CATKIN_LIBRARIES}
${OpenCV_LIBRARIES}
${Boost_LIBRARIES})
rs_add_library(rs_svmAnnotator src/SvmAnnotator.cpp)
target_link_libraries(rs_svmAnnotator rs_classifiers
${catkin_LIBRARIES}
${OpenCV_LIBRARIES})
rs_add_library(rs_rfAnnotator src/RfAnnotator.cpp)
target_link_libraries(rs_rfAnnotator rs_classifiers
${catkin_LIBRARIES}
${OpenCV_LIBRARIES})
rs_add_library(rs_knnAnnotator src/KnnAnnotator.cpp)
target_link_libraries(rs_knnAnnotator rs_classifiers
${CATKIN_LIBRARIES}
${OpenCV_LIBRARIES})