forked from pagekite/libpagekite
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
38 lines (25 loc) · 1.02 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
cmake_minimum_required(VERSION 2.8)
project(libpagekite)
include(FindOpenSSL)
include_directories("." ${OPENSSL_INCLUDE_DIR} include libpagekite)
file(GLOB libfiles libpagekite/*.c)
file(GLOB testfiles libpagekite/*test*)
list(REMOVE_ITEM libfiles ${testfiles})
message(libfiles ${libfiles})
message(testfiles ${testfiles})
add_library(pagekite SHARED ${libfiles})
target_link_libraries(pagekite ${OPENSSL_LIBRARIES} ev m pthread)
add_executable(httpkite contrib/backends/httpkite.c)
target_link_libraries(httpkite pagekite)
add_executable(pagekitec contrib/backends/pagekitec.c)
target_link_libraries(pagekitec pagekite)
add_executable(hellokite contrib/backends/hello.c)
target_link_libraries(hellokite pagekite)
add_executable(sshkite contrib/backends/ssh.c)
target_link_libraries(sshkite pagekite)
enable_testing()
add_executable(tests ${testfiles})
target_link_libraries(tests pagekite)
add_test(Tests tests)
install(TARGETS pagekitec httpkite hellokite sshkite DESTINATION bin)
install(TARGETS pagekite LIBRARY DESTINATION lib)