-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
48 lines (39 loc) · 1.25 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
cmake_minimum_required(VERSION 3.10)
project(tunage LANGUAGES CXX C)
# helper functions and definitions
include(GNUInstallDirs)
include(InstallRequiredSystemLibraries)
# fix library build warnings with ninja
if(POLICY CMP0058)
cmake_policy(SET CMP0058 NEW)
endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
option(ENABLE_STATIC_RUNTIME OFF)
if(MSVC AND ENABLE_STATIC_RUNTIME)
foreach(flag_var
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_RELWITHDEBINFO)
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endforeach(flag_var)
endif()
# main app
add_subdirectory(src)
# external projects
set(EXTERNAL_PROJECTS_DIR external)
set(kissfft_DIR ${EXTERNAL_PROJECTS_DIR}/kissfft)
set(taglib_DIR ${EXTERNAL_PROJECTS_DIR}/taglib)
set(portaudio_DIR ${EXTERNAL_PROJECTS_DIR}/portaudio)
set(libnyquist_DIR ${EXTERNAL_PROJECTS_DIR}/libnyquist)
set(CTPL_DIR ${EXTERNAL_PROJECTS_DIR}/CTPL)
add_subdirectory(${kissfft_DIR})
add_subdirectory(${taglib_DIR})
add_subdirectory(${libnyquist_DIR})
add_subdirectory(${portaudio_DIR})
add_subdirectory(${CTPL_DIR})