-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
91 lines (72 loc) · 1.49 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.6)
project(tatoedetect)
include_directories(
src
)
# set the version
set(PROJECT_VERSION "0.2")
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION})
add_custom_target(
dist
COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
| bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
#set(CMAKE_CXX_COMPILER "/usr/bin/clang++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
file(
GLOB
controllers_files
src/controllers/*
src/controllers/webs/*
src/controllers/apis/*
src/controllers/generics/*
)
file(
GLOB
models_files
src/models/*
)
file(
GLOB
results_files
src/results/*
)
file(
GLOB
contents_files
src/contents/*
)
file(
GLOB
generics_files
src/generics/*
)
add_executable(
tatodetect
src/tatodetect.cpp
src/main.cpp
${controllers_files}
${models_files}
${generics_files}
${results_files}
${contents_files}
view_web.cpp
)
target_link_libraries(
tatodetect
cppcms
cppdb
booster
sqlite3
)
add_custom_command(
OUTPUT view_web.cpp
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tools/cppcms_tmpl_cc
${CMAKE_CURRENT_SOURCE_DIR}/src/views/web/*/*.tmpl
${CMAKE_CURRENT_SOURCE_DIR}/src/views/api/*/*.tmpl
-o view_web.cpp
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/src/views/web/*/*.tmpl
${CMAKE_CURRENT_SOURCE_DIR}/src/views/api/*/*.tmpl
)