-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
64 lines (48 loc) · 2.2 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
52
53
54
55
56
57
58
59
60
61
62
63
64
#####################
# Main CMake file
#####################
# CMake version
cmake_minimum_required (VERSION 3.10.0)
# utility functions
include(build/utils.cmake)
# custom build / configuration types
####################################
set(CMAKE_CONFIGURATION_TYPES "Debug;Develop;Shipping" CACHE STRING "Available build-types: Debug, Develop and Shipping" FORCE)
# copy settings from existing build types
set(CMAKE_CXX_FLAGS_DEVELOP "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
set(CMAKE_C_FLAGS_DEVELOP "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
set(CMAKE_EXE_LINKER_FLAGS_DEVELOP "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO}")
set(CMAKE_CXX_FLAGS_SHIPPING "${CMAKE_CXX_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_SHIPPING "${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_EXE_LINKER_FLAGS_SHIPPING "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
# solution
##########
project (Synthesizer C CXX) # C++
set(CMAKE_CXX_STANDARD 14) # C++ 14
# general library that has the build files, easy way to make sure we can see the build files in the IDE, shouldn't actually be built
#####################################
file(GLOB_RECURSE generalFiles
${CMAKE_CURRENT_SOURCE_DIR}/resources/*.ui
${CMAKE_CURRENT_SOURCE_DIR}/resources/*.json
${CMAKE_CURRENT_SOURCE_DIR}/resources/*.glsl
${CMAKE_CURRENT_SOURCE_DIR}/resources/*.gresource.xml
${CMAKE_CURRENT_SOURCE_DIR}/resources/*.gschema.xml
${CMAKE_CURRENT_SOURCE_DIR}/build/*.bat
${CMAKE_CURRENT_SOURCE_DIR}/build/*.lua
${CMAKE_CURRENT_SOURCE_DIR}/build/*.cmake
${CMAKE_CURRENT_SOURCE_DIR}/build/.vahashtags # visual assist
${CMAKE_CURRENT_SOURCE_DIR}/doc/*.*
${CMAKE_CURRENT_SOURCE_DIR}/source/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/LICENSE
${CMAKE_CURRENT_SOURCE_DIR}/README.md
${CMAKE_CURRENT_SOURCE_DIR}/.gitignore
${CMAKE_CURRENT_SOURCE_DIR}/.gitattributes )
add_library(General ${generalFiles})
set_target_properties(General PROPERTIES LINKER_LANGUAGE NONE) # we don't build this library
assign_source_group(${generalFiles})
# all other targets are under source and resources
##################################################
add_subdirectory (resources)
add_subdirectory (source)
# make the Synth the startup project
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Synthesizer)