author | displacer |
Thu, 23 Nov 2006 18:54:18 +0000 | |
changeset 261 | 21b03fe1cc28 |
parent 260 | 2208405af6c6 |
child 265 | bd06dcfa5bff |
permissions | -rw-r--r-- |
260 | 1 |
set(QT_MIN_VERSION "4.2.0") |
2 |
||
184 | 3 |
find_package(Qt4 REQUIRED) |
4 |
||
5 |
include_directories(${QT_INCLUDES} .) |
|
6 |
||
7 |
if(WIN32 AND NOT UNIX) |
|
8 |
set(HEDGEWARS_BINDIR ".") |
|
9 |
else(WIN32 AND NOT UNIX) |
|
10 |
set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX}) |
|
261 | 11 |
set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR}) |
184 | 12 |
endif(WIN32 AND NOT UNIX) |
13 |
||
14 |
configure_file(${hedgewars_SOURCE_DIR}/QTfrontend/main.cpp.in |
|
15 |
${hedgewars_SOURCE_DIR}/QTfrontend/main.cpp) |
|
16 |
||
17 |
set(hwfr_src |
|
18 |
game.cpp |
|
19 |
main.cpp |
|
20 |
hwform.cpp |
|
21 |
team.cpp |
|
22 |
netclient.cpp |
|
23 |
teamselect.cpp |
|
24 |
teamselhelper.cpp |
|
25 |
frameTeam.cpp |
|
26 |
vertScrollArea.cpp |
|
27 |
gameuiconfig.cpp |
|
28 |
ui_hwform.cpp |
|
29 |
gamecfgwidget.cpp |
|
30 |
pages.cpp |
|
31 |
SquareLabel.cpp |
|
32 |
hedgehogerWidget.cpp |
|
33 |
hwmap.cpp |
|
34 |
mapContainer.cpp |
|
187 | 35 |
tcpBase.cpp |
239 | 36 |
about.cpp |
37 |
proto.cpp) |
|
184 | 38 |
|
39 |
if (WIN32) |
|
40 |
set(hwfr_src ${hwfr_src} res/hedgewars.rc) |
|
41 |
endif (WIN32) |
|
42 |
||
43 |
set(hwfr_moc_hdrs |
|
44 |
game.h |
|
45 |
hwform.h |
|
46 |
binds.h |
|
47 |
netclient.h |
|
48 |
teamselect.h |
|
49 |
teamselhelper.h |
|
50 |
frameTeam.h |
|
51 |
vertScrollArea.h |
|
52 |
gameuiconfig.h |
|
53 |
ui_hwform.h |
|
54 |
gamecfgwidget.h |
|
55 |
predefteams.h |
|
56 |
pages.h |
|
57 |
SquareLabel.h |
|
58 |
hedgehogerWidget.h |
|
59 |
hwmap.h |
|
60 |
mapContainer.h |
|
187 | 61 |
tcpBase.h |
208 | 62 |
about.h |
239 | 63 |
KB.h |
64 |
proto.h) |
|
184 | 65 |
|
66 |
||
67 |
set(hwfr_rez |
|
68 |
hedgewars.qrc) |
|
69 |
||
70 |
qt4_add_resources(hwfr_rez_src |
|
71 |
${hwfr_rez}) |
|
72 |
||
73 |
qt4_wrap_cpp(hwfr_moc_srcs |
|
74 |
${hwfr_moc_hdrs}) |
|
75 |
||
76 |
add_executable(hedgewars WIN32 |
|
77 |
${hwfr_src} |
|
78 |
${hwfr_moc_srcs} |
|
79 |
${hwfr_rez_src}) |
|
80 |
||
81 |
target_link_libraries(hedgewars |
|
82 |
${QT_QTCORE_LIBRARY} |
|
83 |
${QT_QTGUI_LIBRARY} |
|
84 |
${QT_QTNETWORK_LIBRARY} |
|
222 | 85 |
${QT_QTSVG_LIBRARY} |
184 | 86 |
${QT_QTMAIN_LIBRARY}) |
87 |
||
224 | 88 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin) |
184 | 89 |
|
90 |
||
91 |
if(WIN32 AND NOT UNIX) |
|
92 |
string(REPLACE "\\" "/" QT_BIN_DIR $ENV{QTDIR}/bin) |
|
93 |
||
94 |
install(FILES |
|
95 |
"${QT_BIN_DIR}/QtNetwork4.dll" |
|
96 |
"${QT_BIN_DIR}/QtGui4.dll" |
|
97 |
"${QT_BIN_DIR}/QtCore4.dll" |
|
223 | 98 |
"${QT_BIN_DIR}/QtSvg4.dll" |
241
cae2924bb1ab
Add QtXml4.dll to packing list, as it needed for QtSvg4.dll
unc0rr
parents:
239
diff
changeset
|
99 |
"${QT_BIN_DIR}/QtXml4.dll" |
184 | 100 |
"${QT_BIN_DIR}/mingwm10.dll" |
101 |
DESTINATION bin) |
|
102 |
endif(WIN32 AND NOT UNIX) |