-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
55 lines (41 loc) · 1.34 KB
/
CMakeLists.txt
File metadata and controls
55 lines (41 loc) · 1.34 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
# Example CMake command line to create project build files:
#
# cmake -B Build .
# Specify the minimum CMake version required
cmake_minimum_required(VERSION 3.10)
# Project name and language (C or C++)
project(Async-SQLite VERSION 1.0 LANGUAGES C CXX)
# Set build options
set (DMQ_ALLOCATOR "OFF")
set (DMQ_UTIL "ON")
set (DMQ_THREAD "DMQ_THREAD_STDLIB")
set (DMQ_SERIALIZE "DMQ_SERIALIZE_NONE")
set (DMQ_TRANSPORT "DMQ_TRANSPORT_NONE")
include("${CMAKE_SOURCE_DIR}/DelegateMQ/DelegateMQ.cmake")
# Set C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Collect all .cpp and *.h source files in the current directory
file(GLOB SOURCES "*.cpp" "*.h")
# Collect DelegateMQ predef source files
list(APPEND SOURCES ${DMQ_PORT_SOURCES})
# Organize delegate source files within IDE (Visual Studio)
source_group("Delegate Files" FILES ${DMQ_LIB_SOURCES})
source_group("Port Files" FILES ${DMQ_PORT_ONLY_SOURCES})
source_group("Extras Files" FILES ${DMQ_EXTRAS_SOURCES})
# Add subdirectories to include path
include_directories(
${DMQ_ROOT_DIR}
SQLite
Port
UnitTest
)
# Add an executable target
add_executable(Async-SQLiteApp ${SOURCES} ${DMQ_LIB_SOURCES})
# Add subdirectories to build
add_subdirectory(SQLite)
add_subdirectory(UnitTest)
target_link_libraries(Async-SQLiteApp PRIVATE
SQLiteLib
UnitTestLib
)