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