forked from thestr4ng3r/chiaki
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
104 lines (95 loc) · 3.01 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
find_package(Qt5 REQUIRED COMPONENTS Core Widgets Gui Concurrent Multimedia OpenGL Svg)
if(APPLE)
find_package(Qt5 REQUIRED COMPONENTS MacExtras)
endif()
if(CHIAKI_GUI_ENABLE_SDL_GAMECONTROLLER)
find_package(SDL2 MODULE REQUIRED)
endif()
if(WIN32)
add_definitions(-DWIN32_LEAN_AND_MEAN)
endif()
set(RESOURCE_FILES "")
if(APPLE)
list(APPEND RESOURCE_FILES "chiaki.icns")
endif()
add_executable(chiaki WIN32
${RESOURCE_FILES}
include/exception.h
src/main.cpp
include/streamwindow.h
src/streamwindow.cpp
include/mainwindow.h
src/mainwindow.cpp
include/dynamicgridwidget.h
src/dynamicgridwidget.cpp
include/serveritemwidget.h
src/serveritemwidget.cpp
include/discoverymanager.h
src/discoverymanager.cpp
include/streamsession.h
src/streamsession.cpp
include/sessionlog.h
src/sessionlog.cpp
include/avopenglwidget.h
src/avopenglwidget.cpp
include/avopenglframeuploader.h
src/avopenglframeuploader.cpp
include/servericonwidget.h
src/servericonwidget.cpp
include/settings.h
src/settings.cpp
include/registdialog.h
src/registdialog.cpp
include/host.h
src/host.cpp
include/settingskeycapturedialog.h
src/settingskeycapturedialog.cpp
include/settingsdialog.h
src/settingsdialog.cpp
include/manualhostdialog.h
src/manualhostdialog.cpp
res/resources.qrc
include/controllermanager.h
src/controllermanager.cpp
include/loginpindialog.h
src/loginpindialog.cpp)
target_include_directories(chiaki PRIVATE include)
target_link_libraries(chiaki chiaki-lib)
if(CHIAKI_ENABLE_CLI)
add_definitions(-DCHIAKI_ENABLE_CLI)
target_link_libraries(chiaki chiaki-cli-lib)
endif()
target_link_libraries(chiaki Qt5::Core Qt5::Widgets Qt5::Gui Qt5::Concurrent Qt5::Multimedia Qt5::OpenGL Qt5::Svg)
if(APPLE)
target_link_libraries(chiaki Qt5::MacExtras)
target_compile_definitions(chiaki PRIVATE CHIAKI_GUI_ENABLE_QT_MACEXTRAS)
endif()
if(CHIAKI_GUI_ENABLE_SDL_GAMECONTROLLER)
target_link_libraries(chiaki SDL2::SDL2)
target_compile_definitions(chiaki PRIVATE CHIAKI_GUI_ENABLE_SDL_GAMECONTROLLER)
endif()
if(CHIAKI_ENABLE_SETSU)
target_link_libraries(chiaki setsu)
target_compile_definitions(chiaki PRIVATE CHIAKI_GUI_ENABLE_SETSU)
endif()
if(NOT CHIAKI_ENABLE_FFMPEG_DECODER)
message(FATAL_ERROR "Chiaki GUI requires CHIAKI_ENABLE_FFMPEG_DECODER=ON")
endif()
set_target_properties(chiaki PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/MacOSXBundleInfo.plist.in"
MACOSX_BUNDLE_BUNDLE_NAME Chiaki
MACOSX_BUNDLE_BUNDLE_VERSION ${CHIAKI_VERSION}
MACOSX_BUNDLE_COPYRIGHT "thestr4ng3r (AGPLv3)"
MACOSX_BUNDLE_GUI_IDENTIFIER "org.chiaki.chiaki"
MACOSX_BUNDLE_ICON_FILE chiaki.icns
RESOURCE "${RESOURCE_FILES}")
install(TARGETS chiaki
RUNTIME DESTINATION bin
BUNDLE DESTINATION bin)
install(FILES chiaki.desktop DESTINATION share/applications)
install(FILES chiaki.png DESTINATION share/icons/hicolor/512x512/apps)
install(FILES re.chiaki.Chiaki.appdata.xml DESTINATION share/metainfo)