-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (40 loc) · 1.17 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
cmake_minimum_required(VERSION 3.1...3.4)
set(PROJECT_NAME "86boxman")
project(${PROJECT_NAME} VERSION 0.01)
set(CMAKE_CXX_STANDARD 98)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt5 COMPONENTS
Core
Gui
Widgets
REQUIRED)
add_executable(${PROJECT_NAME} src/main.cpp
src/boxman.cpp
src/boxman.h
src/MainWindow.ui
src/BoxManSettings.cpp
src/BoxManSettings.h
src/BoxManSettingsUi.cpp
src/BoxManSettingsUi.h
src/BoxManSettingsUi.ui
src/CreateMachine.cpp
src/CreateMachine.h
src/CreateMachine.ui)
target_link_libraries(${PROJECT_NAME}
Qt5::Core
Qt5::Gui
Qt5::Widgets
)
if (WIN32)
target_link_options(${PROJECT_NAME} PRIVATE -mwindows)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} ${PROJECT_NAME}.exe)
else ()
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} ${PROJECT_NAME})
endif ()
install(TARGETS ${PROJECT_NAME})
if (NOT WIN32)
install(FILES res/86boxman.desktop DESTINATION share/applications)
endif ()