-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
69 lines (62 loc) · 1.57 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
65
66
67
68
cmake_minimum_required(VERSION 3.22)
project(QDesktopPet_2_cmake)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_CXX_COMPILER /usr/bin/g++)
include(FindPkgConfig)
pkg_check_modules(PKGS_DEP REQUIRED xtst)
FOREACH(flag ${PKGS_DEP_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}")
set(PROJECT_SOURCES
main.cpp
widget.h
widget.cpp
QLive2dWidget.hpp
mouseEventThread.cpp
mouseEventThread.h
ui_configDialog.h
configDialog.cpp
configDialog.h
)
find_package(Qt5 COMPONENTS
Core
Gui
Widgets
X11Extras
OpenGL
REQUIRED)
add_executable(QDesktopPet_2_cmake main.cpp runningCheck.cpp runningCheck.h configuration.cpp configuration.h)
add_executable(wayland_test wayland_test.c)
target_link_libraries(QDesktopPet_2_cmake
Qt5::Core
Qt5::Gui
Qt5::Widgets
Qt5::X11Extras
Qt5::OpenGL
-lX11
-lXext
-lLive2dWidget
-lGL
-lFramework
-lLive2DCubismCore
-L.
${PKGS_DEP_LDFLAGS}
)
target_link_libraries(wayland_test -lwayland-client)
target_sources(QDesktopPet_2_cmake
PRIVATE
main.cpp
QLive2dWidget.hpp
widget.cpp
widget.h
mouseEventThread.cpp
mouseEventThread.h
ui_configDialog.h
configDialog.cpp
configDialog.h
)