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