-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
72 lines (49 loc) · 2.17 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
project( AdvancedImageSearch )
cmake_minimum_required( VERSION 2.8.7 )
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/3dparty ${CMAKE_MODULE_PATH})
set(CMAKE_CXX_FLAGS "-fPIC -march=native -mtune=native -O3 -fexpensive-optimizations -s")
set(CMAKE_C_FLAGS "-fPIC -march=native -mtune=native -O3 -fexpensive-optimizations -s")
OPTION (ENABLE_FACEDETECTION OFF)
OPTION (ENABLE_PATTERNRECOGNITION OFF)
OPTION (ENABLE_DARKNET OFF)
#----
find_package(OpenCV)
if (OpenCV_FOUND)
OPTION (ENABLE_OPENCV ON)
ELSE (OpenCV_FOUND)
OPTION (ENABLE_OPENCV OFF)
MESSAGE("OpenCV Not found , some parts like viewer etc will not be compiled")
ENDIF(OpenCV_FOUND)
#----
if (ENABLE_PATTERNRECOGNITION)
add_definitions(-DUSE_PATTERN_RECOGNITION)
set(PatternRecognitionParts PatternRecognition )
ENDIF(ENABLE_PATTERNRECOGNITION)
IF( ENABLE_OPENCV )
add_subdirectory (src/PatternRecognition)
add_definitions(-DUSE_OPENCV_FACEDETECTION)
ENDIF( ENABLE_OPENCV )
IF( ENABLE_DARKNET )
add_definitions(-DUSE_DARKNET)
add_definitions(-DDARKNET_PATH="${CMAKE_SOURCE_DIR}/3dparty/darknet/")
INCLUDE_DIRECTORIES("/usr/local/cuda/include")
LINK_DIRECTORIES("/usr/local/cuda/lib64")
add_subdirectory (src/DarknetProcessor)
set(NeuralNetworkParts DarknetProcessor )
INSTALL(PROGRAMS "src/DarknetProcessor/libDarknetProcessor.so" DESTINATION "/usr/lib/AdvancedImageSearch" )
ENDIF( ENABLE_DARKNET )
add_subdirectory (src/AdvancedImageSearchLib)
add_subdirectory (src/lsimg)
add_subdirectory (src/cmpimg)
INSTALL(PROGRAMS "src/lsimg/lsimg" DESTINATION "/usr/bin" )
INSTALL(PROGRAMS "src/cmpimg/cmpimg" DESTINATION "/usr/bin" )
IF( ENABLE_OPENCV )
INSTALL(PROGRAMS "src/PatternRecognition/libPatternRecognition.so" DESTINATION "/usr/lib/AdvancedImageSearch" )
ENDIF( ENABLE_OPENCV )
INSTALL(PROGRAMS "src/AdvancedImageSearchLib/libAdvancedImageSearchLib.so" DESTINATION "/usr/lib/AdvancedImageSearch" )
INSTALL(FILES "data/haarcascade_frontalface_alt.dat" DESTINATION "/usr/lib/AdvancedImageSearch" )
# TODO FIX INSTALLATION DIRECTORIES
# install(TARGETS RGBDAcquisitionProject
# LIBRARY DESTINATION lib
# ARCHIVE DESTINATION lib
# RUNTIME DESTINATION bin)