author | unc0rr |
Tue, 28 Nov 2006 18:22:03 +0000 | |
changeset 283 | 28d105f378f1 |
parent 277 | 04a613bab65c |
child 297 | 279e10ec31b4 |
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 |
44 |
proto.cpp) |
|
184 | 45 |
|
46 |
if (WIN32) |
|
47 |
set(hwfr_src ${hwfr_src} res/hedgewars.rc) |
|
48 |
endif (WIN32) |
|
49 |
||
50 |
set(hwfr_moc_hdrs |
|
51 |
game.h |
|
52 |
hwform.h |
|
53 |
binds.h |
|
54 |
netclient.h |
|
55 |
teamselect.h |
|
56 |
teamselhelper.h |
|
57 |
frameTeam.h |
|
58 |
vertScrollArea.h |
|
59 |
gameuiconfig.h |
|
60 |
ui_hwform.h |
|
61 |
gamecfgwidget.h |
|
62 |
predefteams.h |
|
63 |
pages.h |
|
64 |
SquareLabel.h |
|
65 |
hedgehogerWidget.h |
|
66 |
hwmap.h |
|
67 |
mapContainer.h |
|
187 | 68 |
tcpBase.h |
208 | 69 |
about.h |
239 | 70 |
KB.h |
71 |
proto.h) |
|
184 | 72 |
|
73 |
||
74 |
set(hwfr_rez |
|
75 |
hedgewars.qrc) |
|
76 |
||
77 |
qt4_add_resources(hwfr_rez_src |
|
78 |
${hwfr_rez}) |
|
79 |
||
80 |
qt4_wrap_cpp(hwfr_moc_srcs |
|
81 |
${hwfr_moc_hdrs}) |
|
82 |
||
83 |
add_executable(hedgewars WIN32 |
|
84 |
${hwfr_src} |
|
85 |
${hwfr_moc_srcs} |
|
86 |
${hwfr_rez_src}) |
|
87 |
||
88 |
target_link_libraries(hedgewars |
|
89 |
${QT_QTCORE_LIBRARY} |
|
90 |
${QT_QTGUI_LIBRARY} |
|
91 |
${QT_QTNETWORK_LIBRARY} |
|
222 | 92 |
${QT_QTSVG_LIBRARY} |
184 | 93 |
${QT_QTMAIN_LIBRARY}) |
94 |
||
224 | 95 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin) |
184 | 96 |
|
97 |
||
98 |
if(WIN32 AND NOT UNIX) |
|
99 |
string(REPLACE "\\" "/" QT_BIN_DIR $ENV{QTDIR}/bin) |
|
100 |
||
101 |
install(FILES |
|
102 |
"${QT_BIN_DIR}/QtNetwork4.dll" |
|
103 |
"${QT_BIN_DIR}/QtGui4.dll" |
|
104 |
"${QT_BIN_DIR}/QtCore4.dll" |
|
223 | 105 |
"${QT_BIN_DIR}/QtSvg4.dll" |
241
cae2924bb1ab
Add QtXml4.dll to packing list, as it needed for QtSvg4.dll
unc0rr
parents:
239
diff
changeset
|
106 |
"${QT_BIN_DIR}/QtXml4.dll" |
184 | 107 |
"${QT_BIN_DIR}/mingwm10.dll" |
108 |
DESTINATION bin) |
|
109 |
endif(WIN32 AND NOT UNIX) |