-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
60 lines (46 loc) · 2.06 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
cmake_minimum_required(VERSION 3.23)
project(
egt-thermostat
VERSION 1.8
DESCRIPTION "An application to benchmark the EGT library."
LANGUAGES CXX
)
#set(PROJECT_VERSION_RC 1)
if (DEFINED PROJECT_VERSION_RC)
string(APPEND PROJECT_VERSION "-rc${PROJECT_VERSION_RC}")
endif()
include(GNUInstallDirs)
set(CMAKE_VERBOSE_MAKEFILE True)
set(CMAKE_CXX_STANDARD 17)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBEGT REQUIRED libegt>=1.10)
pkg_check_modules(LIBINPUT REQUIRED libinput>=1.6.3)
pkg_check_modules(CAIRO REQUIRED cairo>=1.14.6)
add_executable(egt-benchmark src/main.cpp)
target_compile_definitions(egt-benchmark PRIVATE BENCHMARKDATA="${CMAKE_INSTALL_FULL_DATADIR}/egt/benchmark")
target_include_directories(egt-benchmark PRIVATE
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/external/hayai/src
)
target_link_libraries(egt-benchmark PRIVATE udev)
target_include_directories(egt-benchmark PRIVATE ${LIBEGT_INCLUDE_DIRS})
target_compile_options(egt-benchmark PRIVATE ${LIBEGT_CFLAGS_OTHER})
target_link_directories(egt-benchmark PRIVATE ${LIBEGT_LIBRARY_DIRS})
target_link_libraries(egt-benchmark PRIVATE ${LIBEGT_LIBRARIES})
target_link_options(egt-benchmark PRIVATE ${LIBEGT_LDFLAGS_OTHER})
target_include_directories(egt-benchmark PRIVATE ${LIBINPUT_INCLUDE_DIRS})
target_compile_options(egt-benchmark PRIVATE ${LIBINPUT_CFLAGS_OTHER})
target_link_directories(egt-benchmark PRIVATE ${LIBINPUT_LIBRARY_DIRS})
target_link_libraries(egt-benchmark PRIVATE ${LIBINPUT_LIBRARIES})
target_link_options(egt-benchmark PRIVATE ${LIBINPUT_LDFLAGS_OTHER})
target_include_directories(egt-benchmark PRIVATE ${CAIRO_INCLUDE_DIRS})
target_compile_options(egt-benchmark PRIVATE ${CAIRO_CFLAGS_OTHER})
target_link_directories(egt-benchmark PRIVATE ${CAIRO_LIBRARY_DIRS})
target_link_libraries(egt-benchmark PRIVATE ${CAIRO_LIBRARIES})
target_link_options(egt-benchmark PRIVATE ${CAIRO_LDFLAGS_OTHER})
install(TARGETS egt-benchmark RUNTIME)
install(DIRECTORY images/
DESTINATION ${CMAKE_INSTALL_DATADIR}/egt/benchmark
FILES_MATCHING
PATTERN "*.png"
)