author | unc0rr |
Mon, 26 Feb 2007 17:09:13 +0000 | |
changeset 494 | 503758a35c02 |
parent 477 | 2076a9dd2aaf |
child 495 | 62c1c2b4414c |
permissions | -rw-r--r-- |
260 | 1 |
set(QT_MIN_VERSION "4.2.0") |
2 |
||
494 | 3 |
set(QT_USE_QTNETWORK TRUE) |
4 |
set(QT_USE_QTSVG TRUE) |
|
5 |
set(QT_USE_QTMAIN TRUE) |
|
6 |
||
184 | 7 |
find_package(Qt4 REQUIRED) |
494 | 8 |
include(${QT_USE_FILE}) |
184 | 9 |
|
494 | 10 |
include_directories(.) |
184 | 11 |
|
12 |
if(WIN32 AND NOT UNIX) |
|
13 |
set(HEDGEWARS_BINDIR ".") |
|
267 | 14 |
set(HEDGEWARS_DATADIR "../share/") |
184 | 15 |
else(WIN32 AND NOT UNIX) |
16 |
set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX}) |
|
266 | 17 |
if(DEFINED DATA_INSTALL_DIR) |
265 | 18 |
set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR}) |
266 | 19 |
else(DEFINED DATA_INSTALL_DIR) |
265 | 20 |
set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/share/) |
266 | 21 |
endif(DEFINED DATA_INSTALL_DIR) |
184 | 22 |
endif(WIN32 AND NOT UNIX) |
23 |
||
277 | 24 |
configure_file(${hedgewars_SOURCE_DIR}/QTfrontend/main.cpp.in |
25 |
${hedgewars_SOURCE_DIR}/QTfrontend/main.cpp) |
|
271 | 26 |
configure_file(${hedgewars_SOURCE_DIR}/QTfrontend/hwconsts.h.in |
27 |
${hedgewars_SOURCE_DIR}/QTfrontend/hwconsts.h) |
|
184 | 28 |
|
29 |
set(hwfr_src |
|
30 |
game.cpp |
|
31 |
main.cpp |
|
32 |
hwform.cpp |
|
33 |
team.cpp |
|
34 |
teamselect.cpp |
|
35 |
teamselhelper.cpp |
|
36 |
frameTeam.cpp |
|
37 |
vertScrollArea.cpp |
|
38 |
gameuiconfig.cpp |
|
39 |
ui_hwform.cpp |
|
40 |
gamecfgwidget.cpp |
|
41 |
pages.cpp |
|
42 |
SquareLabel.cpp |
|
43 |
hedgehogerWidget.cpp |
|
44 |
hwmap.cpp |
|
45 |
mapContainer.cpp |
|
187 | 46 |
tcpBase.cpp |
239 | 47 |
about.cpp |
297 | 48 |
proto.cpp |
314 | 49 |
fpsedit.cpp |
50 |
netserver.cpp |
|
420
6cdfc07dceed
netserver and netonnectedclient splited to different files
displacer
parents:
412
diff
changeset
|
51 |
netconnectedclient.cpp |
412 | 52 |
newnetclient.cpp |
53 |
netudpserver.cpp |
|
461 | 54 |
netudpwidget.cpp |
55 |
chatwidget.cpp) |
|
184 | 56 |
|
57 |
if (WIN32) |
|
58 |
set(hwfr_src ${hwfr_src} res/hedgewars.rc) |
|
59 |
endif (WIN32) |
|
60 |
||
61 |
set(hwfr_moc_hdrs |
|
62 |
game.h |
|
63 |
hwform.h |
|
64 |
teamselect.h |
|
65 |
teamselhelper.h |
|
66 |
frameTeam.h |
|
67 |
vertScrollArea.h |
|
68 |
gameuiconfig.h |
|
69 |
gamecfgwidget.h |
|
70 |
pages.h |
|
71 |
SquareLabel.h |
|
72 |
hedgehogerWidget.h |
|
73 |
hwmap.h |
|
74 |
mapContainer.h |
|
187 | 75 |
tcpBase.h |
208 | 76 |
about.h |
297 | 77 |
proto.h |
314 | 78 |
fpsedit.h |
79 |
netserver.h |
|
420
6cdfc07dceed
netserver and netonnectedclient splited to different files
displacer
parents:
412
diff
changeset
|
80 |
netconnectedclient.h |
412 | 81 |
newnetclient.h |
82 |
netudpserver.h |
|
461 | 83 |
netudpwidget.h |
84 |
chatwidget.h) |
|
184 | 85 |
|
477 | 86 |
set(hwfr_hdrs |
87 |
binds.h |
|
88 |
ui_hwform.h |
|
89 |
predefteams.h |
|
90 |
KB.h |
|
91 |
) |
|
184 | 92 |
|
93 |
set(hwfr_rez |
|
94 |
hedgewars.qrc) |
|
95 |
||
96 |
qt4_add_resources(hwfr_rez_src |
|
97 |
${hwfr_rez}) |
|
98 |
||
99 |
qt4_wrap_cpp(hwfr_moc_srcs |
|
100 |
${hwfr_moc_hdrs}) |
|
101 |
||
102 |
add_executable(hedgewars WIN32 |
|
103 |
${hwfr_src} |
|
104 |
${hwfr_moc_srcs} |
|
477 | 105 |
${hwfr_hdrs} |
184 | 106 |
${hwfr_rez_src}) |
107 |
||
108 |
target_link_libraries(hedgewars |
|
494 | 109 |
${QT_LIBRARIES}) |
184 | 110 |
|
224 | 111 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin) |
184 | 112 |
|
113 |
||
114 |
if(WIN32 AND NOT UNIX) |
|
115 |
string(REPLACE "\\" "/" QT_BIN_DIR $ENV{QTDIR}/bin) |
|
116 |
||
117 |
install(FILES |
|
118 |
"${QT_BIN_DIR}/QtNetwork4.dll" |
|
119 |
"${QT_BIN_DIR}/QtGui4.dll" |
|
120 |
"${QT_BIN_DIR}/QtCore4.dll" |
|
223 | 121 |
"${QT_BIN_DIR}/QtSvg4.dll" |
241
cae2924bb1ab
Add QtXml4.dll to packing list, as it needed for QtSvg4.dll
unc0rr
parents:
239
diff
changeset
|
122 |
"${QT_BIN_DIR}/QtXml4.dll" |
184 | 123 |
"${QT_BIN_DIR}/mingwm10.dll" |
124 |
DESTINATION bin) |
|
125 |
endif(WIN32 AND NOT UNIX) |