-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (45 loc) · 2.11 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
cmake_minimum_required (VERSION 3.4)
project(LabSoundDemo)
# Don't report that sample file installation up to date
set(CMAKE_INSTALL_MESSAGE LAZY)
set(LABSOUNDDEMO_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
configure_file("${LABSOUNDDEMO_ROOT}/LabSoundDemo.config.h" "${LABSOUNDDEMO_ROOT}/LabSoundDemo.h" @ONLY)
add_subdirectory(LabSound)
if (APPLE)
set(PLATFORM_LIBS
"-framework AudioToolbox"
"-framework AudioUnit"
"-framework Accelerate"
"-framework Cocoa"
"-framework CoreAudio"
"-framework Metal"
"-framework MetalKit"
"-framework QuartzCore"
)
endif()
add_executable(LabSoundStarter LabSoundStarter.cpp)
target_link_libraries(LabSoundStarter Lab::Sound ${PLATFORM_LIBS})
target_include_directories(LabSoundStarter PRIVATE "${LABSOUNDDEMO_ROOT}")
install(TARGETS LabSoundStarter RUNTIME DESTINATION bin)
add_executable(LabSoundOfflineStarter LabSoundOfflineStarter.cpp)
target_link_libraries(LabSoundOfflineStarter Lab::Sound ${PLATFORM_LIBS})
target_include_directories(LabSoundOfflineStarter PRIVATE "${LABSOUNDDEMO_ROOT}")
install(TARGETS LabSoundOfflineStarter RUNTIME DESTINATION bin)
add_executable(LabSoundDemo LabSoundDemo.cpp)
target_link_libraries(LabSoundDemo Lab::Sound ${PLATFORM_LIBS})
target_include_directories(LabSoundDemo PRIVATE "${LABSOUNDDEMO_ROOT}")
install(TARGETS LabSoundDemo RUNTIME DESTINATION bin)
add_executable(LabSoundInteractive
LabSoundInteractive.cpp ImGuiGridSlider.cpp ImGuiGridSlider.h imgui-app/imgui_app.cpp)
target_link_libraries(LabSoundInteractive Lab::Sound ${PLATFORM_LIBS})
target_include_directories(LabSoundInteractive PRIVATE "${LABSOUNDDEMO_ROOT}")
if(WIN32)
target_compile_definitions(LabSoundInteractive PRIVATE SOKOL_D3D11 SOKOL_WIN32_FORCE_MAIN)
elseif(APPLE)
target_compile_definitions(LabSoundInteractive PRIVATE SOKOL_METAL)
set_source_files_properties(imgui-app/imgui_app.cpp PROPERTIES
COMPILE_FLAGS "-x objective-c++")
elseif(UNIX)
target_compile_definitions(LabSoundInteractive PRIVATE SOKOL_GLCORE33)
endif()
install(TARGETS LabSoundInteractive RUNTIME DESTINATION bin)