author | unc0rr |
Sun, 11 Mar 2007 17:19:28 +0000 | |
changeset 495 | 62c1c2b4414c |
parent 494 | 503758a35c02 |
child 502 | bc178daca088 |
permissions | -rw-r--r-- |
260 | 1 |
set(QT_MIN_VERSION "4.2.0") |
2 |
||
494 | 3 |
set(QT_USE_QTNETWORK TRUE) |
4 |
set(QT_USE_QTSVG TRUE) |
|
495 | 5 |
set(QT_USE_QTXML TRUE) |
494 | 6 |
set(QT_USE_QTMAIN TRUE) |
7 |
||
184 | 8 |
find_package(Qt4 REQUIRED) |
494 | 9 |
include(${QT_USE_FILE}) |
184 | 10 |
|
494 | 11 |
include_directories(.) |
184 | 12 |
|
13 |
if(WIN32 AND NOT UNIX) |
|
14 |
set(HEDGEWARS_BINDIR ".") |
|
267 | 15 |
set(HEDGEWARS_DATADIR "../share/") |
184 | 16 |
else(WIN32 AND NOT UNIX) |
17 |
set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX}) |
|
266 | 18 |
if(DEFINED DATA_INSTALL_DIR) |
265 | 19 |
set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR}) |
266 | 20 |
else(DEFINED DATA_INSTALL_DIR) |
265 | 21 |
set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/share/) |
266 | 22 |
endif(DEFINED DATA_INSTALL_DIR) |
184 | 23 |
endif(WIN32 AND NOT UNIX) |
24 |
||
277 | 25 |
configure_file(${hedgewars_SOURCE_DIR}/QTfrontend/main.cpp.in |
26 |
${hedgewars_SOURCE_DIR}/QTfrontend/main.cpp) |
|
271 | 27 |
configure_file(${hedgewars_SOURCE_DIR}/QTfrontend/hwconsts.h.in |
28 |
${hedgewars_SOURCE_DIR}/QTfrontend/hwconsts.h) |
|
184 | 29 |
|
30 |
set(hwfr_src |
|
31 |
game.cpp |
|
32 |
main.cpp |
|
33 |
hwform.cpp |
|
34 |
team.cpp |
|
35 |
teamselect.cpp |
|
36 |
teamselhelper.cpp |
|
37 |
frameTeam.cpp |
|
38 |
vertScrollArea.cpp |
|
39 |
gameuiconfig.cpp |
|
40 |
ui_hwform.cpp |
|
41 |
gamecfgwidget.cpp |
|
42 |
pages.cpp |
|
43 |
SquareLabel.cpp |
|
44 |
hedgehogerWidget.cpp |
|
45 |
hwmap.cpp |
|
46 |
mapContainer.cpp |
|
187 | 47 |
tcpBase.cpp |
239 | 48 |
about.cpp |
297 | 49 |
proto.cpp |
314 | 50 |
fpsedit.cpp |
51 |
netserver.cpp |
|
420
6cdfc07dceed
netserver and netonnectedclient splited to different files
displacer
parents:
412
diff
changeset
|
52 |
netconnectedclient.cpp |
412 | 53 |
newnetclient.cpp |
54 |
netudpserver.cpp |
|
461 | 55 |
netudpwidget.cpp |
56 |
chatwidget.cpp) |
|
184 | 57 |
|
58 |
if (WIN32) |
|
59 |
set(hwfr_src ${hwfr_src} res/hedgewars.rc) |
|
60 |
endif (WIN32) |
|
61 |
||
62 |
set(hwfr_moc_hdrs |
|
63 |
game.h |
|
64 |
hwform.h |
|
65 |
teamselect.h |
|
66 |
teamselhelper.h |
|
67 |
frameTeam.h |
|
68 |
vertScrollArea.h |
|
69 |
gameuiconfig.h |
|
70 |
gamecfgwidget.h |
|
71 |
pages.h |
|
72 |
SquareLabel.h |
|
73 |
hedgehogerWidget.h |
|
74 |
hwmap.h |
|
75 |
mapContainer.h |
|
187 | 76 |
tcpBase.h |
208 | 77 |
about.h |
297 | 78 |
proto.h |
314 | 79 |
fpsedit.h |
80 |
netserver.h |
|
420
6cdfc07dceed
netserver and netonnectedclient splited to different files
displacer
parents:
412
diff
changeset
|
81 |
netconnectedclient.h |
412 | 82 |
newnetclient.h |
83 |
netudpserver.h |
|
461 | 84 |
netudpwidget.h |
85 |
chatwidget.h) |
|
184 | 86 |
|
477 | 87 |
set(hwfr_hdrs |
88 |
binds.h |
|
89 |
ui_hwform.h |
|
90 |
predefteams.h |
|
91 |
KB.h |
|
92 |
) |
|
184 | 93 |
|
94 |
set(hwfr_rez |
|
95 |
hedgewars.qrc) |
|
96 |
||
97 |
qt4_add_resources(hwfr_rez_src |
|
98 |
${hwfr_rez}) |
|
99 |
||
100 |
qt4_wrap_cpp(hwfr_moc_srcs |
|
101 |
${hwfr_moc_hdrs}) |
|
102 |
||
103 |
add_executable(hedgewars WIN32 |
|
104 |
${hwfr_src} |
|
105 |
${hwfr_moc_srcs} |
|
477 | 106 |
${hwfr_hdrs} |
184 | 107 |
${hwfr_rez_src}) |
495 | 108 |
|
109 |
set(HW_LINK_LIBS ${QT_LIBRARIES}) |
|
184 | 110 |
|
111 |
if(WIN32 AND NOT UNIX) |
|
495 | 112 |
set(HW_LINK_LIBS |
113 |
${HW_LINK_LIBS} |
|
114 |
ole32 |
|
115 |
winspool |
|
116 |
uuid) |
|
117 |
endif(WIN32 AND NOT UNIX) |
|
184 | 118 |
|
495 | 119 |
target_link_libraries(hedgewars |
120 |
${HW_LINK_LIBS}) |
|
121 |
||
122 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin) |