-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
64 lines (61 loc) · 2.03 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
cmake_minimum_required(VERSION 3.6)
project(brutils
VERSION 1.0.0
DESCRIPTION "Burak Ongay (brakulla) utility library")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if (CMAKE_BUILD_TYPE MATCHES Test)
include_directories(include/brutils)
add_executable(brutilsTest main.cpp src/brutils/json_parser.cpp src/brutils/json_generator.cpp)
target_link_libraries(brutilsTest
# brutils
pthread
)
else ()
add_library(brutils STATIC
include/brutils/Thread/ThreadPool.h
include/brutils/Thread/Thread.h
include/brutils/HttpServer/HttpResponse.h
include/brutils/HttpServer/HttpRequest.h
include/brutils/HttpServer/HttpConnection.h
include/brutils/HttpServer/RequestParser.h
include/brutils/TcpSocket/TcpSocket.h
include/brutils/TcpServer/TcpServer.h
include/brutils/timers/TimeKeeper.h
include/brutils/timers/combined_timer.h
include/brutils/timers/timer.h
include/brutils/queue_pc.h
include/brutils/string_utils.h
include/brutils/time_utils.h
include/brutils/br_object.h
include/brutils/variant.h
include/brutils/json_parser.h
include/brutils/json_generator.h
src/brutils/Thread/ThreadPool.cpp
src/brutils/Thread/Thread.cpp
src/brutils/HttpServer/HttpResponse.cpp
src/brutils/HttpServer/HttpRequest.cpp
src/brutils/HttpServer/HttpConnection.cpp
src/brutils/HttpServer/RequestParser.cpp
src/brutils/TcpSocket/TcpSocket.cpp
src/brutils/TcpServer/TcpServer.cpp
src/brutils/timers/TimeKeeper.cpp
src/brutils/timers/combined_timer.cpp
src/brutils/json_parser.cpp
src/brutils/json_generator.cpp
src/brutils/time_utils.cpp
)
target_include_directories(brutils PUBLIC include)
set_target_properties(brutils PROPERTIES
LINKER_LANGUAGE CXX
VERSION ${PROJECT_VERSION}
)
install(TARGETS brutils DESTINATION lib)
install(
DIRECTORY
include/
DESTINATION
include
)
endif ()