-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
64 lines (50 loc) · 1.33 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
cmake_minimum_required(VERSION 2.6)
project(alienFx)
set(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
${CMAKE_BINARY_DIR}/bin
)
add_definitions(
-W
-pedantic
-Wall
-lusb-1.0
)
set(CMAKE_CXX_FLAGS "-g -Wall -lusb-1.0")
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK4 REQUIRED gtk4)
find_program(GLIB_COMPILE_RESOURCES NAMES glib-compile-resources REQUIRED)
set(GRESOURCE_CSS src/resources/css/gtk.css)
add_custom_target(
alienFxUI-resource
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_CSS}
)
add_executable(
controller
src/controller.c
src/lib/utils/vars.h
src/lib/utils/functions.h
src/lib/utils/functions.c
)
configure_file(${GRESOURCE_CSS} ${GRESOURCE_CSS} @ONLY)
add_executable(
${PROJECT_NAME}
src/controller-ui.c
${CMAKE_CURRENT_BINARY_DIR}/../${GRESOURCE_CSS}
src/lib/utils/vars.h
src/lib/utils/functions.h
src/lib/utils/functions.c
src/lib/keyboard.h
src/lib/keyboard.c
src/lib/key.h
src/lib/key.c
src/lib/touchpad.h
src/lib/touchpad.c
src/lib/mediabar.h
src/lib/mediabar.c
)
# Step 5:
# add_dependencies(${PROJECT_NAME} alienFxUI-resource)
target_link_libraries(controller usb-1.0)
target_link_libraries(${PROJECT_NAME} PRIVATE usb-1.0 ${GTK4_LIBRARIES})
target_include_directories(${PROJECT_NAME} PRIVATE ${GTK4_INCLUDE_DIRS})