-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
59 lines (44 loc) · 1.91 KB
/
CMakeLists.txt
File metadata and controls
59 lines (44 loc) · 1.91 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
cmake_minimum_required (VERSION 2.8)
project (ravenpp)
if (DEFINED ENV{VIRTUAL_ENV})
message (STATUS "Detected active virtualenv: $ENV{VIRTUAL_ENV}")
include (venv/pkg)
else ()
message (STATUS "Not detected active virtualenv")
set (CMAKE_CXX_FLAGS "-Wall -Wextra -ggdb3 -pg -pipe -O2")
#set (CMAKE_CXX_FLAGS "-Wall -Wextra -ggdb3 -pg -pipe -O0")
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_CXX_FLAGS}")
set (CMAKE_VERBOSE_MAKEFILE off)
set (CMAKE_COLOR_MAKEFILE on)
set (CMAKE_USE_RELATIVE_PATHS on)
endif ()
file (READ VERSION RAVEN_VERSION)
string (STRIP "${RAVEN_VERSION}" RAVEN_VERSION)
add_definitions (-DVERSION="${RAVEN_VERSION}")
add_library (ravenpp raven.cpp craven.cpp)
add_executable (example example.cpp)
target_link_libraries (example ravenpp boost_iostreams z)
add_executable (cexample example.c)
target_link_libraries (cexample ravenpp boost_iostreams z stdc++)
add_executable (raven-notify raven-notify.cpp)
target_link_libraries (raven-notify ravenpp boost_iostreams z)
add_executable (raven-server raven-server.cpp)
target_link_libraries (raven-server ravenpp boost_iostreams z)
add_executable (raven_decode raven_decode.cpp)
target_link_libraries (raven_decode ravenpp boost_iostreams z)
enable_testing ()
add_executable (tests_encode tests/encode.cpp)
target_link_libraries (tests_encode ravenpp boost_iostreams z)
add_test (encode tests_encode)
add_executable (tests_init tests/init.cpp)
target_link_libraries (tests_init ravenpp boost_iostreams z)
add_test (init tests_init)
add_executable (tests_send tests/send.cpp)
target_link_libraries (tests_send ravenpp boost_iostreams z)
add_test (send tests_send 16002) ## FIXME <<-- be careful!!! that port could be used!!!
install (FILES raven/raven.h raven/craven.h DESTINATION include/raven)
install (TARGETS ravenpp DESTINATION lib/)
install (TARGETS raven-notify raven-server DESTINATION bin/)
if (DEFINED ENV{VIRTUAL_ENV})
include (CPack)
endif ()