blob: ac60a7dde144b7fcbfe22778083bfddfad065529 (
plain)
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
cmake_minimum_required (VERSION 3.10)
project (Quackle VERSION 1.0.4)
message("-- Configuring Quackle")
include("${CMAKE_CURRENT_SOURCE_DIR}/../Settings.cmake")
option(BUNDLE "Build app bundle on macOS; does not populate with resources" OFF)
set(QT_VERSION "5" CACHE STRING "Version of Qt (anything past the first digit is ignored)")
add_subdirectory(.. libquackle)
add_subdirectory(../quackleio quackleio)
add_subdirectory(../data data)
if("${QT_VERSION}" MATCHES "^6")
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
else()
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
endif()
set(CMAKE_AUTOMOC ON)
set(QUACKLE_SOURCES
bagdisplay.cpp
boarddisplay.cpp
boardsetup.cpp
boardsetupdialog.cpp
brb.cpp
configdialog.cpp
configpages.cpp
dashboard.cpp
geometry.cpp
graphicalboard.cpp
graphicalreporter.cpp
history.cpp
letterbox.cpp
letterboxsettings.cpp
lexicondialog.cpp
lister.cpp
macondo.cpp
main.cpp
movebox.cpp
newgame.cpp
noteeditor.cpp
oppothread.cpp
oppothreadprogressbar.cpp
quacker.cpp
quackersettings.cpp
rackdisplay.cpp
settings.cpp
simviewer.cpp
view.cpp
widgetfactory.cpp
)
set(QUACKLE_HEADERS
bagdisplay.h
boarddisplay.h
boardsetup.h
boardsetupdialog.h
brb.h
configdialog.h
configpages.h
customqsettings.h
dashboard.h
geometry.h
graphicalboard.h
graphicalreporter.h
history.h
letterbox.h
letterboxsettings.h
lexicondialog.h
lister.h
macondo.h
movebox.h
newgame.h
noteeditor.h
oppothread.h
oppothreadprogressbar.h
quacker.h
quackersettings.h
rackdisplay.h
settings.h
simviewer.h
view.h
widgetfactory.h
)
set(QUACKLE_RESOURCES
"${PROJECT_SOURCE_DIR}/quacker.icns"
# ${DATA_ALPHABETS}
)
if(APPLE AND BUNDLE)
add_executable(Quackle
MACOSX_BUNDLE
${QUACKLE_SOURCES} ${QUACKLE_HEADERS} quacker.icns
)
else()
add_executable(Quackle
WIN32
${QUACKLE_SOURCES} ${QUACKLE_HEADERS} quacker.rc
)
endif()
target_link_libraries(Quackle quackleio libquackle)
if("${QT_VERSION}" MATCHES "^6")
target_link_libraries(Quackle Qt6::Core Qt6::Widgets)
else()
target_link_libraries(Quackle Qt5::Core Qt5::Widgets)
endif()
if(APPLE)
target_link_libraries(Quackle "-framework CoreFoundation")
if (BUNDLE)
set_target_properties(Quackle
PROPERTIES
RESOURCE ${QUACKLE_RESOURCES}
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Quackle.plist"
)
endif()
endif()
|