forked from robotology/himrep
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
44 lines (37 loc) · 1.86 KB
/
CMakeLists.txt
File metadata and controls
44 lines (37 loc) · 1.86 KB
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
# Copyright: 2010 RobotCub Consortium
# Author: Sean Ryan Fanello, Carlo Ciliberto
# CopyPolicy: Released under the terms of the GNU GPL v2.0.
cmake_minimum_required(VERSION 3.5)
set(projectname linearClassifierModule)
project(${projectname})
include(FindLibSVMLin.cmake)
include(FindLibSVM.cmake)
IF(LIBSVM_FOUND)
include_directories(${LIBSVM_INCLUDE_DIR})
set(folder_header ${folder_header} include/SVMNonLin.h)
set(folder_source ${folder_source} src/SVMNonLin.cpp)
ENDIF()
IF(LIBSVMLIN_FOUND)
set(folder_header ${folder_header} include/SVMLinear.h)
set(folder_source ${folder_source} src/SVMLinear.cpp)
include_directories(${LIBSVMLIN_INCLUDE_DIR})
ENDIF()
if (LIBSVM_FOUND OR LIBSVMLIN_FOUND)
set(folder_header ${folder_header} include/linearClassifierThread.h
include/linearClassifierModule.h
include/win_dirent.h )
set(folder_source ${folder_source} src/linearClassifierThread.cpp
src/linearClassifierModule.cpp
src/main.cpp )
source_group("Source Files" FILES ${folder_source})
source_group("Header Files" FILES ${folder_header})
include_directories(${PROJECT_SOURCE_DIR}/include)
add_executable(${projectname} ${folder_source} ${folder_header} )
endif()
if (LIBSVM_FOUND AND LIBSVMLIN_FOUND)
target_link_libraries(${projectname} ${YARP_LIBRARIES} ${LIBSVMLIN_LIBRARIES} ${LIBSVM_LIBRARIES})
install(TARGETS ${projectname} DESTINATION bin)
elseif(LIBSVMLIN_FOUND)
target_link_libraries(${projectname} ${YARP_LIBRARIES} ${LIBSVMLIN_LIBRARIES})
install(TARGETS ${projectname} DESTINATION bin)
endif()