-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
50 lines (41 loc) · 1.59 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
cmake_minimum_required(VERSION 3.0)
project(darmstadt)
set(DEPENDENCIES_INCLUDE_DIRS "/usr/include/libdrm" "imgui")
set(DEPENDENCIES_DEFINES "IMGUI_IMPL_OPENGL_ES2")
set(DEPENDENCIES_COMPILE_OPTIONS "")
set(DEPENDENCIES_LIBRARIES drm gbm pthread va va-drm avutil avcodec avformat pulse pulse-simple GL EGL X11 Xfixes)
set(DEPENDENCIES_LIBRARY_DIRS "")
set(DEPENDENCIES_LINK_OPTIONS "")
set(DARM_SOURCES
imgui/imgui.cpp
imgui/imgui_demo.cpp
imgui/imgui_draw.cpp
imgui/imgui_tables.cpp
imgui/imgui_widgets.cpp
imgui/backends/imgui_impl_opengl3.cpp
main.cpp
cache.cpp
audio.cpp
pulse.cpp
log.cpp
string.cpp
time.cpp)
find_package(PkgConfig REQUIRED)
pkg_check_modules(JACK jack)
if (JACK_FOUND)
list(APPEND DARM_SOURCES jack.cpp)
list(APPEND DEPENDENCIES_INCLUDE_DIRS ${JACK_INCLUDE_DIRS})
list(APPEND DEPENDENCIES_DEFINES HAVE_JACK)
list(APPEND DEPENDENCIES_COMPILE_OPTIONS ${JACK_CFLAGS_OTHER})
list(APPEND DEPENDENCIES_LIBRARIES ${JACK_LIBRARIES})
list(APPEND DEPENDENCIES_LIBRARY_DIRS ${JACK_LIBRARY_DIRS})
list(APPEND DEPENDENCIES_LINK_OPTIONS ${JACK_LDFLAGS_OTHER})
endif()
add_executable(darmstadt ${DARM_SOURCES})
target_include_directories(darmstadt SYSTEM PRIVATE ${DEPENDENCIES_INCLUDE_DIRS})
target_compile_definitions(darmstadt PRIVATE ${DEPENDENCIES_DEFINES})
target_compile_options(darmstadt PRIVATE ${DEPENDENCIES_COMPILE_OPTIONS})
target_link_libraries(darmstadt PRIVATE ${DEPENDENCIES_LIBRARIES})
target_link_directories(darmstadt PRIVATE ${DEPENDENCIES_LIBRARY_DIRS})
target_link_options(darmstadt PRIVATE ${DEPENDENCIES_LINK_OPTIONS})
install(TARGETS darmstadt RUNTIME DESTINATION bin)