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