-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
47 lines (34 loc) · 1.24 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
project(shoppinglist_cqrs)
include(ExternalProject)
cmake_minimum_required(VERSION 2.6)
add_definitions(-std=c++14 -Wall -Wextra)
include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cereal/include)
execute_process(COMMAND git submodule update --init --recursive)
include_directories(${CMAKE_SOURCE_DIR}/bandit/)
enable_testing()
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/bandit/cmake/cotire/CMake/")
include(cotire)
ExternalProject_Add(
re2
SOURCE_DIR ${CMAKE_SOURCE_DIR}/re2
INSTALL_COMMAND true
)
set(SERVED_LIB_DIR "${CMAKE_BINARY_DIR}/re2-prefix/src/re2-build/" CACHE STRING "")
set(SERVED_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/re2" CACHE STRING "")
set(DEPS_INSTALL_DIR "${CMAKE_BINARY_DIR}/deps" CACHE STRING "")
ExternalProject_Add(
served
DEPENDS re2
SOURCE_DIR ${CMAKE_SOURCE_DIR}/served
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
-DSERVED_BUILD_STATIC=ON -DSERVED_BUILD_SHARED=OFF
-DSERVED_INCLUDE_DIR=${SERVED_INCLUDE_DIR}
-DSERVED_LIB_DIR=${SERVED_LIB_DIR}
-DSERVED_BUILD_EXAMPLES=OFF
-DSERVED_BUILD_TESTS=OFF
)
include_directories(${DEPS_INSTALL_DIR}/include)
link_directories(${DEPS_INSTALL_DIR}/lib ${SERVED_LIB_DIR})
add_subdirectory(tests)
add_subdirectory(src)