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