author | Mitchell Kember <mk12360@gmail.com> |
Thu, 29 Nov 2012 19:44:18 -0500 | |
changeset 8144 | f3ba33d5d2b1 |
parent 8104 | 09c38cdf380d |
child 8147 | 53190e590919 |
child 8148 | 6af97e514c14 |
permissions | -rw-r--r-- |
555 | 1 |
# Configure for Qt4 |
6604
9cc612a24b43
this should lower compatibility with qt4.5 again, but i have no way to test it
koda
parents:
6441
diff
changeset
|
2 |
set(QT_MIN_VERSION "4.5.0") |
6032 | 3 |
include(CheckLibraryExists) |
260 | 4 |
|
502
bc178daca088
Fix build with CMake & gcc 4.1.2 on my system (treating #include <QtGui> as including directory)
unc0rr
parents:
495
diff
changeset
|
5 |
set(QT_USE_QTCORE TRUE) |
bc178daca088
Fix build with CMake & gcc 4.1.2 on my system (treating #include <QtGui> as including directory)
unc0rr
parents:
495
diff
changeset
|
6 |
set(QT_USE_QTGUI TRUE) |
494 | 7 |
set(QT_USE_QTNETWORK TRUE) |
2525 | 8 |
set(QT_USE_QTSVG FALSE) |
2428 | 9 |
set(QT_USE_QTXML FALSE) |
10 |
set(QT_USE_QTOPENGL FALSE) |
|
494 | 11 |
set(QT_USE_QTMAIN TRUE) |
12 |
||
184 | 13 |
find_package(Qt4 REQUIRED) |
7256 | 14 |
if (NOT CROSSAPPLE) |
15 |
include(${QT_USE_FILE}) |
|
16 |
endif() |
|
184 | 17 |
|
8083
2edbd01a04a0
added sdl_net headers and def lib for windows, fix frontlib compilation on windows
koda
parents:
8082
diff
changeset
|
18 |
find_package(SDL REQUIRED) #video in SDLInteraction |
2edbd01a04a0
added sdl_net headers and def lib for windows, fix frontlib compilation on windows
koda
parents:
8082
diff
changeset
|
19 |
find_package(SDL_mixer REQUIRED) #audio in SDLInteraction |
2edbd01a04a0
added sdl_net headers and def lib for windows, fix frontlib compilation on windows
koda
parents:
8082
diff
changeset
|
20 |
find_package(SDL_net REQUIRED) #network frontlib |
7817
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7813
diff
changeset
|
21 |
if(NOT NOVIDEOREC) |
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7813
diff
changeset
|
22 |
find_package(FFMPEG) |
8144
f3ba33d5d2b1
Google Code-in: Hide "video record" keybind option
Mitchell Kember <mk12360@gmail.com>
parents:
8104
diff
changeset
|
23 |
if(${FFMPEG_FOUND}) |
f3ba33d5d2b1
Google Code-in: Hide "video record" keybind option
Mitchell Kember <mk12360@gmail.com>
parents:
8104
diff
changeset
|
24 |
add_definitions(-DUSE_VIDEO_RECORDING) |
f3ba33d5d2b1
Google Code-in: Hide "video record" keybind option
Mitchell Kember <mk12360@gmail.com>
parents:
8104
diff
changeset
|
25 |
endif() |
7817
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7813
diff
changeset
|
26 |
endif() |
555 | 27 |
|
2239
d7b5c65f7544
move C and C++ optimization flags in the main CMakeLists.txt
koda
parents:
2230
diff
changeset
|
28 |
include_directories(.) |
6061 | 29 |
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/model) |
6060
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
30 |
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/net) |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
31 |
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ui) |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
32 |
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ui/dialog) |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
33 |
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ui/page) |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
34 |
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ui/widget) |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
35 |
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/util) |
707 | 36 |
include_directories(${SDL_INCLUDE_DIR}) |
2515
51d3f4b6293a
revert audio to use SDL_mixer -- also frontend uses it, so it needs sdlmixer sources
koda
parents:
2443
diff
changeset
|
37 |
include_directories(${SDLMIXER_INCLUDE_DIR}) |
7528
f8cf277dca36
FindFFMPEG.cmake (used only for frontend for now).
Stepan777 <stepik-777@mail.ru>
parents:
7278
diff
changeset
|
38 |
include_directories(${FFMPEG_INCLUDE_DIR}) |
7778 | 39 |
include_directories(${CMAKE_SOURCE_DIR}/misc/physfs/src) |
8052 | 40 |
include_directories(${CMAKE_SOURCE_DIR}/misc/physfs/extras) |
8078 | 41 |
include_directories(${CMAKE_SOURCE_DIR}/project_files/frontlib) |
1159 | 42 |
if(UNIX) |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
43 |
# HACK: in freebsd cannot find iconv.h included via SDL.h |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
44 |
include_directories("/usr/local/include") |
1159 | 45 |
endif(UNIX) |
555 | 46 |
|
1904 | 47 |
|
184 | 48 |
if(WIN32 AND NOT UNIX) |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
49 |
set(HEDGEWARS_BINDIR ".") |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
50 |
set(HEDGEWARS_DATADIR "../share/") |
7718
97ba379164ec
use cmake OPTION for arguments and further cleanup on CMakeFiles
koda
parents:
7679
diff
changeset
|
51 |
add_definitions(-DUSE_XFIRE) |
2652 | 52 |
else() |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
53 |
set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX}) |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
54 |
if(DEFINED DATA_INSTALL_DIR) |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
55 |
set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR}) |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
56 |
else() |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
57 |
set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/share/) |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
58 |
endif() |
5188 | 59 |
#only the cocoa version of qt supports building 64 bit apps |
60 |
if(APPLE AND (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64*") AND (NOT QT_MAC_USE_COCOA)) |
|
61 |
message(FATAL_ERROR "Building the 64 bit version of Hedgewars *requires* the Cocoa variant of QT on Mac OS X") |
|
62 |
endif() |
|
2663 | 63 |
endif() |
184 | 64 |
|
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
2218
diff
changeset
|
65 |
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hwconsts.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp) |
184 | 66 |
|
6061 | 67 |
file(GLOB NetCpp net/*.cpp) |
68 |
file(GLOB ModelCpp model/*.cpp) |
|
69 |
file(GLOB_RECURSE UIcpp ui/*.cpp) |
|
70 |
file(GLOB UtilCpp util/*.cpp) |
|
6060
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
71 |
|
7817
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7813
diff
changeset
|
72 |
if(${FFMPEG_FOUND}) |
7813
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
7718
diff
changeset
|
73 |
add_definitions(-DVIDEOREC -D__STDC_CONSTANT_MACROS) |
7617 | 74 |
endif() |
75 |
||
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
76 |
set(hwfr_src |
6061 | 77 |
${ModelCpp} |
6060
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
78 |
${NetCpp} |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
79 |
${UIcpp} |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
80 |
${UtilCpp} |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
81 |
achievements.cpp |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
82 |
binds.cpp |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
83 |
drawmapscene.cpp |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
84 |
game.cpp |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
85 |
gameuiconfig.cpp |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
86 |
HWApplication.cpp |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
87 |
hwform.cpp |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
88 |
main.cpp |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
89 |
team.cpp |
7201
dc17ffdf0702
The first campaign commit with a lot of changes...
belphegorr <szabibibi@gmail.com>
parents:
6931
diff
changeset
|
90 |
campaign.cpp |
6060
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
91 |
ui_hwform.cpp |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
92 |
${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
93 |
) |
184 | 94 |
|
2821 | 95 |
#xfire integration |
96 |
if(WIN32) |
|
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
97 |
set(hwfr_src ${hwfr_src} xfire.cpp ../misc/xfire/xfiregameclient.cpp) |
2821 | 98 |
endif(WIN32) |
99 |
||
880
f9efe907828f
Add win32 resource compilation under mingw (used sim-im srcs as example)
unc0rr
parents:
781
diff
changeset
|
100 |
if(MINGW) |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
101 |
# resource compilation for mingw |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
102 |
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
103 |
COMMAND windres -I ${CMAKE_CURRENT_SOURCE_DIR} |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
104 |
-i ${CMAKE_CURRENT_SOURCE_DIR}/hedgewars.rc |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
105 |
-o ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o) |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
106 |
set(hwfr_src ${hwfr_src} ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o) |
880
f9efe907828f
Add win32 resource compilation under mingw (used sim-im srcs as example)
unc0rr
parents:
781
diff
changeset
|
107 |
else(MINGW) |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
108 |
set(hwfr_src ${hwfr_src} hedgewars.rc) |
880
f9efe907828f
Add win32 resource compilation under mingw (used sim-im srcs as example)
unc0rr
parents:
781
diff
changeset
|
109 |
endif(MINGW) |
184 | 110 |
|
6061 | 111 |
file(GLOB ModelHdr model/*.h) |
112 |
file(GLOB NetHdr net/*.h) |
|
113 |
file(GLOB_RECURSE UIhdr ui/*.h) |
|
114 |
file(GLOB UtilHdr util/*.h) |
|
6060
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
115 |
|
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
116 |
|
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
117 |
set(hwfr_moc_hdrs |
6061 | 118 |
${ModelHdr} |
6060
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
119 |
${NetHdr} |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
120 |
${UIhdr} |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
121 |
drawmapscene.h |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
122 |
game.h |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
123 |
gameuiconfig.h |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
124 |
HWApplication.h |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
125 |
hwform.h |
6223
cc3eb9b7230f
It doesn't make much sense to make checks like 'if(game)' if you never set game to 0. Using smart pointers instead. Does it fix segfaults? Probably.
unc0rr
parents:
6204
diff
changeset
|
126 |
team.h |
6931
86c951cd0f3f
make DataManager a QObject with reload() slot that emits signal updated()
sheepluva
parents:
6604
diff
changeset
|
127 |
util/DataManager.h |
7897 | 128 |
util/LibavInteraction.h |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
129 |
) |
184 | 130 |
|
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
131 |
set(hwfr_hdrs |
6060
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
132 |
${UtilHdr} |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
133 |
team.h |
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
134 |
achievements.h |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
135 |
binds.h |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
136 |
ui_hwform.h |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
137 |
hwconsts.h |
6060
fdfc01419815
I started to move stuff around, c'mon, hate on meee. PS: if your (clean) build is broken - let me know)
sheepluva
parents:
6038
diff
changeset
|
138 |
sdlkeys.h |
7639 | 139 |
campaign.h |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
140 |
) |
184 | 141 |
|
2218
59a9bebc4988
-Smaxx' solution for compiling frontend with static libs in windows
koda
parents:
2212
diff
changeset
|
142 |
set(hwfr_rez hedgewars.qrc) |
184 | 143 |
|
2641 | 144 |
qt4_add_resources(hwfr_rez_src ${hwfr_rez}) |
184 | 145 |
|
2641 | 146 |
qt4_wrap_cpp(hwfr_moc_srcs ${hwfr_moc_hdrs}) |
184 | 147 |
|
2652 | 148 |
|
7256 | 149 |
if(APPLE OR CROSSAPPLE) |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
150 |
set(hwfr_src ${hwfr_src} InstallController.cpp CocoaInitializer.mm M3Panel.mm M3InstallController.m NSWorkspace_RBAdditions.m) |
5879
42cf124c305b
This should check if Qt provides zlib functions, and adds zlib dependency in case of zlibless Qt. Tested with Qt providing zlib functions only.
unc0rr
parents:
5808
diff
changeset
|
151 |
set(HW_LINK_LIBS IOKit ${HW_LINK_LIBS}) |
2652 | 152 |
|
4775 | 153 |
if(NOT NOAUTOUPDATE) |
154 |
find_package(Sparkle) |
|
155 |
if(SPARKLE_FOUND) |
|
156 |
add_definitions(-DSPARKLE_ENABLED) |
|
157 |
set(hwfr_src ${hwfr_src} AutoUpdater.cpp SparkleAutoUpdater.mm) |
|
158 |
set(HW_LINK_LIBS ${SPARKLE_LIBRARY} ${HW_LINK_LIBS}) |
|
159 |
endif() |
|
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
160 |
endif() |
2652 | 161 |
endif() |
162 |
||
8082
675372256a01
lotsa hackery to get frontend somehow link libengine...
koda
parents:
8078
diff
changeset
|
163 |
if(BUILD_ENGINE_LIBRARY) |
675372256a01
lotsa hackery to get frontend somehow link libengine...
koda
parents:
8078
diff
changeset
|
164 |
add_definitions(-DHWLIBRARY) |
675372256a01
lotsa hackery to get frontend somehow link libengine...
koda
parents:
8078
diff
changeset
|
165 |
set(HW_LINK_LIBS hwengine ${HW_LINK_LIBS}) |
675372256a01
lotsa hackery to get frontend somehow link libengine...
koda
parents:
8078
diff
changeset
|
166 |
link_directories(${EXECUTABLE_OUTPUT_PATH}) |
675372256a01
lotsa hackery to get frontend somehow link libengine...
koda
parents:
8078
diff
changeset
|
167 |
endif() |
675372256a01
lotsa hackery to get frontend somehow link libengine...
koda
parents:
8078
diff
changeset
|
168 |
|
8104
09c38cdf380d
show console on win when debugging to see frontend messages
koda
parents:
8083
diff
changeset
|
169 |
#when debugging, always prompt a console to see fronted messages |
09c38cdf380d
show console on win when debugging to see frontend messages
koda
parents:
8083
diff
changeset
|
170 |
#TODO: check it doesn't interfere on UNIX |
09c38cdf380d
show console on win when debugging to see frontend messages
koda
parents:
8083
diff
changeset
|
171 |
if(CMAKE_BUILD_TYPE MATCHES "RELEASE") |
09c38cdf380d
show console on win when debugging to see frontend messages
koda
parents:
8083
diff
changeset
|
172 |
set(console_access "WIN32") |
09c38cdf380d
show console on win when debugging to see frontend messages
koda
parents:
8083
diff
changeset
|
173 |
endif(CMAKE_BUILD_TYPE MATCHES "RELEASE") |
2652 | 174 |
|
8104
09c38cdf380d
show console on win when debugging to see frontend messages
koda
parents:
8083
diff
changeset
|
175 |
add_executable(hedgewars ${console_access} |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
176 |
${hwfr_src} |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
177 |
${hwfr_moc_srcs} |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
178 |
${hwfr_hdrs} |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
179 |
${hwfr_rez_src} |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
180 |
) |
2191 | 181 |
|
2218
59a9bebc4988
-Smaxx' solution for compiling frontend with static libs in windows
koda
parents:
2212
diff
changeset
|
182 |
|
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
183 |
set(HW_LINK_LIBS |
7778 | 184 |
physfs |
8078 | 185 |
frontlib |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
186 |
${QT_LIBRARIES} |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
187 |
${SDL_LIBRARY} |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
188 |
${SDLMIXER_LIBRARY} |
8078 | 189 |
${SDLNET_LIBRARY} |
7528
f8cf277dca36
FindFFMPEG.cmake (used only for frontend for now).
Stepan777 <stepik-777@mail.ru>
parents:
7278
diff
changeset
|
190 |
${FFMPEG_LIBRARIES} |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
191 |
${HW_LINK_LIBS} |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
192 |
) |
184 | 193 |
|
194 |
if(WIN32 AND NOT UNIX) |
|
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
195 |
if(NOT SDL_LIBRARY) |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
196 |
set(HW_LINK_LIBS ${HW_LINK_LIBS} SDL) |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
197 |
endif() |
555 | 198 |
|
5757 | 199 |
set(HW_LINK_LIBS |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
200 |
${HW_LINK_LIBS} |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
201 |
ole32 |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
202 |
oleaut32 |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
203 |
winspool |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
204 |
uuid |
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4410
diff
changeset
|
205 |
) |
2663 | 206 |
endif() |
184 | 207 |
|
2218
59a9bebc4988
-Smaxx' solution for compiling frontend with static libs in windows
koda
parents:
2212
diff
changeset
|
208 |
|
7256 | 209 |
if (CROSSAPPLE) |
8055
04dd8b7fb605
- Download .hwp files into Data folder and mount them immediately (yes, could cause problems in case of overlapped contents)
unc0rr
parents:
8052
diff
changeset
|
210 |
|
7256 | 211 |
else() |
212 |
target_link_libraries(hedgewars ${HW_LINK_LIBS}) |
|
213 |
endif() |
|
2218
59a9bebc4988
-Smaxx' solution for compiling frontend with static libs in windows
koda
parents:
2212
diff
changeset
|
214 |
|
495 | 215 |
|
2015 | 216 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir}) |
2218
59a9bebc4988
-Smaxx' solution for compiling frontend with static libs in windows
koda
parents:
2212
diff
changeset
|
217 |