-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
62 lines (53 loc) · 1.71 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
cmake_minimum_required(VERSION 3.14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(APP DualSense4Windows)
set(QT E:/libs/Qt/6.0.2/6.0.2/msvc2019_64)
set(ASSET_PACKER AssetPacker)
project(${APP})
set(CMAKE_SUPPRESS_REGENERATION true)
set(SRC_INC
include/Core.hxx
include/DualSense4Windows.hxx
include/DualSense.hxx
include/Math.hxx
include/Utils.hxx
include/Interface.hxx
include/Types.hxx
include/Window.hxx
include/MainWindow.hxx
include/ColorPicker.hxx
include/DualSenseInfo.hxx
include/DualSenseList.hxx
include/DualSenseListHeader.hxx
include/DualSenseListEntry.hxx
)
set(SRC
src/DualSense4Windows.cxx
src/DualSense.cxx
src/Utils.cxx
src/Interface.cxx
src/MainWindow.cxx
src/ColorPicker.cxx
src/DualSenseList.cxx
src/DualSenseListHeader.cxx
src/DualSenseListEntry.cxx
DualSense4Windows.exe.manifest
DeclareDPIAware.manifest
)
set(ASSETS "$<TARGET_FILE_DIR:${APP}>/assets")
add_executable(${APP} WIN32 ${SRC} ${SRC_INC})
target_link_directories(${APP} PUBLIC lib/)
target_link_directories(${APP} PUBLIC ${QT}/lib)
target_link_libraries(${APP} comctl32.lib)
target_link_libraries(${APP} hidapi.lib)
target_link_libraries(${APP} setupapi.lib)
target_link_libraries(${APP} ViGEmClient.lib)
target_link_libraries(${APP} Qt6Core.lib)
target_link_libraries(${APP} Qt6GUI.lib)
target_link_libraries(${APP} Qt6Widgets.lib)
target_include_directories(${APP} PUBLIC external/)
target_include_directories(${APP} PUBLIC ${QT}/include)
target_include_directories(${APP} PRIVATE include/)
add_custom_command(TARGET ${APP} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/bin" "$<TARGET_FILE_DIR:${APP}>")