author | unc0rr |
Tue, 23 Jan 2007 16:59:05 +0000 | |
changeset 358 | 236bbd12d4d9 |
parent 314 | 83773ccf4f09 |
child 412 | 2ddcc3e3e644 |
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 |
netclient.cpp |
|
30 |
teamselect.cpp |
|
31 |
teamselhelper.cpp |
|
32 |
frameTeam.cpp |
|
33 |
vertScrollArea.cpp |
|
34 |
gameuiconfig.cpp |
|
35 |
ui_hwform.cpp |
|
36 |
gamecfgwidget.cpp |
|
37 |
pages.cpp |
|
38 |
SquareLabel.cpp |
|
39 |
hedgehogerWidget.cpp |
|
40 |
hwmap.cpp |
|
41 |
mapContainer.cpp |
|
187 | 42 |
tcpBase.cpp |
239 | 43 |
about.cpp |
297 | 44 |
proto.cpp |
314 | 45 |
fpsedit.cpp |
46 |
netserver.cpp |
|
47 |
newnetclient.cpp) |
|
184 | 48 |
|
49 |
if (WIN32) |
|
50 |
set(hwfr_src ${hwfr_src} res/hedgewars.rc) |
|
51 |
endif (WIN32) |
|
52 |
||
53 |
set(hwfr_moc_hdrs |
|
54 |
game.h |
|
55 |
hwform.h |
|
56 |
binds.h |
|
57 |
netclient.h |
|
58 |
teamselect.h |
|
59 |
teamselhelper.h |
|
60 |
frameTeam.h |
|
61 |
vertScrollArea.h |
|
62 |
gameuiconfig.h |
|
63 |
ui_hwform.h |
|
64 |
gamecfgwidget.h |
|
65 |
predefteams.h |
|
66 |
pages.h |
|
67 |
SquareLabel.h |
|
68 |
hedgehogerWidget.h |
|
69 |
hwmap.h |
|
70 |
mapContainer.h |
|
187 | 71 |
tcpBase.h |
208 | 72 |
about.h |
239 | 73 |
KB.h |
297 | 74 |
proto.h |
314 | 75 |
fpsedit.h |
76 |
netserver.h |
|
77 |
newnetclient.h) |
|
184 | 78 |
|
79 |
||
80 |
set(hwfr_rez |
|
81 |
hedgewars.qrc) |
|
82 |
||
83 |
qt4_add_resources(hwfr_rez_src |
|
84 |
${hwfr_rez}) |
|
85 |
||
86 |
qt4_wrap_cpp(hwfr_moc_srcs |
|
87 |
${hwfr_moc_hdrs}) |
|
88 |
||
89 |
add_executable(hedgewars WIN32 |
|
90 |
${hwfr_src} |
|
91 |
${hwfr_moc_srcs} |
|
92 |
${hwfr_rez_src}) |
|
93 |
||
94 |
target_link_libraries(hedgewars |
|
95 |
${QT_QTCORE_LIBRARY} |
|
96 |
${QT_QTGUI_LIBRARY} |
|
97 |
${QT_QTNETWORK_LIBRARY} |
|
222 | 98 |
${QT_QTSVG_LIBRARY} |
184 | 99 |
${QT_QTMAIN_LIBRARY}) |
100 |
||
224 | 101 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin) |
184 | 102 |
|
103 |
||
104 |
if(WIN32 AND NOT UNIX) |
|
105 |
string(REPLACE "\\" "/" QT_BIN_DIR $ENV{QTDIR}/bin) |
|
106 |
||
107 |
install(FILES |
|
108 |
"${QT_BIN_DIR}/QtNetwork4.dll" |
|
109 |
"${QT_BIN_DIR}/QtGui4.dll" |
|
110 |
"${QT_BIN_DIR}/QtCore4.dll" |
|
223 | 111 |
"${QT_BIN_DIR}/QtSvg4.dll" |
241
cae2924bb1ab
Add QtXml4.dll to packing list, as it needed for QtSvg4.dll
unc0rr
parents:
239
diff
changeset
|
112 |
"${QT_BIN_DIR}/QtXml4.dll" |
184 | 113 |
"${QT_BIN_DIR}/mingwm10.dll" |
114 |
DESTINATION bin) |
|
115 |
endif(WIN32 AND NOT UNIX) |