-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (40 loc) · 1.13 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
cmake_minimum_required(VERSION 3.9)
project(Leves VERSION 0.1.0)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
set(LEVES_VERSION_TWEAK "pre-alpha")
configure_file(
src/Version.h.in
include/Version.h
)
set(CMAKE_CXX_STANDARD 17)
enable_testing()
add_executable(leves
src/main.cpp
src/Server.hpp
src/Server.cpp
src/ServiceHandler.hpp
src/ServiceHandler.cpp
src/Response.hpp
src/Response.cpp
src/ActionHandler.hpp
src/ActionHandler.cpp
src/Persistance/Entities/Stream.hpp
src/Persistance/Repositories/StreamRepository.hpp
src/Persistance/Repositories/StreamRepository.cpp
src/Messaging/Serializer.hpp
src/Messaging/Serializer.cpp
)
target_include_directories(leves PRIVATE "${CMAKE_BINARY_DIR}/include")
add_subdirectory(test)
target_link_libraries(leves PRIVATE ${CONAN_LIBS})
add_custom_target(
run
COMMAND leves
DEPENDS leves
WORKING_DIRECTORY ${CMAKE_PROJECT_DIR})
set_target_properties(
leves
PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")