-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathCMakeLists.txt
65 lines (53 loc) · 1.54 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
# CMakeLists.txt for Automatic Feature Selection (AFS)
# created by Caner Hazirbas, 27.02.2015 15:58
# Technische Universität München
project( AFS )
# Required CMAKE Version
cmake_minimum_required( VERSION 2.8 )
# SET LIBRARY DIRECTORIES
# OpenCV
set(OpenCV_DIR "/usr/wiss/hazirbas/Libs/OpenCV/2.4.10/share/OpenCV")
find_package( OpenCV REQUIRED )
find_package( Boost REQUIRED COMPONENTS system filesystem )
find_package( CUDA REQUIRED )
# list all files
include_directories(. include src cuda misc)
# set cuda flags
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3 -gencode arch=compute_35,code=sm_35 -Xptxas -v -Xcompiler )
# add_executable
cuda_add_executable(AFS
src/Image.cpp
src/KMeansClustering.cpp
src/main.cpp
src/Optimization.cpp
src/Dataset.cpp
src/Feature.cpp
src/ImageProc.cpp
src/Learning.cpp
src/Model.cpp
src/Potential.cpp
cuda/binarization.cu
cuda/segmentation.cu
misc/edgeDetectionFct.cpp
include/common.hpp
include/Dataset.hpp
include/Feature.hpp
include/Image.hpp
include/ImageProc.hpp
include/Learning.hpp
include/main.hpp
include/Model.hpp
include/Optimization.hpp
include/Potential.hpp
cuda/binarization.cuh
cuda/cutil5.cuh
cuda/segmentation.cuh
)
# link libraries
target_link_libraries(AFS ${OpenCV_LIBS} ${Boost_LIBRARIES})
# install AFS to the project folder
SET(CMAKE_INSTALL_PREFIX ./)
install(TARGETS AFS DESTINATION ../../)
# redefine 'clean' for make
set_directory_properties(PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ../../AFS)