-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
52 lines (36 loc) · 1.23 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
cmake_minimum_required(VERSION 3.5)
message(STATUS " CMakeLists: Zing")
option(BUILD_TESTS "Build Tests" ON)
option(ZING_LIBRARY_ONLY "Only build library" OFF)
# Global Settings
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_DEBUG_POSTFIX "-debug")
set(CMAKE_RELWITHDEBINFO_POSTFIX "-reldbg")
if (WIN32)
set(VCPKG_TARGET_TRIPLET x64-windows-static-md)
endif()
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake CACHE STRING "Vcpkg toolchain file")
project(Zing
LANGUAGES CXX C
VERSION 0.5.0
)
include(cmake/utils.cmake)
find_package(unofficial-concurrentqueue CONFIG REQUIRED)
find_package(fmt CONFIG REQUIRED)
find_package(portaudio CONFIG REQUIRED)
set(ZING_ROOT ${CMAKE_CURRENT_LIST_DIR})
set(M3RDPARTY_DIR ${CMAKE_CURRENT_LIST_DIR}/m3rdparty)
set(ZING_INCLUDE_DIR include/)
set(ZEST_BUILD_TESTS off)
configure_file(${CMAKE_CURRENT_LIST_DIR}/cmake/config_zing_app.h.cmake ${CMAKE_BINARY_DIR}/config_zing_app.h)
enable_testing()
include(cmake/all.cmake)
add_subdirectory(libs/zest)
add_subdirectory(src)
if (NOT ${ZING_LIBRARY_ONLY})
add_subdirectory(app)
add_subdirectory(tests)
endif()