author | unc0rr |
Mon, 02 Jul 2007 21:33:21 +0000 | |
changeset 547 | b81a055f2d06 |
parent 539 | 6a9bf1852bbc |
child 555 | 0376fdcc6322 |
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 |
539
6a9bf1852bbc
Ability to choose which info is shown above hedgehogs
unc0rr
parents:
502
diff
changeset
|
58 |
chatwidget.cpp |
6a9bf1852bbc
Ability to choose which info is shown above hedgehogs
unc0rr
parents:
502
diff
changeset
|
59 |
binds.cpp) |
184 | 60 |
|
61 |
if (WIN32) |
|
62 |
set(hwfr_src ${hwfr_src} res/hedgewars.rc) |
|
63 |
endif (WIN32) |
|
64 |
||
65 |
set(hwfr_moc_hdrs |
|
66 |
game.h |
|
67 |
hwform.h |
|
68 |
teamselect.h |
|
69 |
teamselhelper.h |
|
70 |
frameTeam.h |
|
71 |
vertScrollArea.h |
|
72 |
gameuiconfig.h |
|
73 |
gamecfgwidget.h |
|
74 |
pages.h |
|
75 |
SquareLabel.h |
|
76 |
hedgehogerWidget.h |
|
77 |
hwmap.h |
|
78 |
mapContainer.h |
|
187 | 79 |
tcpBase.h |
208 | 80 |
about.h |
297 | 81 |
proto.h |
314 | 82 |
fpsedit.h |
83 |
netserver.h |
|
420
6cdfc07dceed
netserver and netonnectedclient splited to different files
displacer
parents:
412
diff
changeset
|
84 |
netconnectedclient.h |
412 | 85 |
newnetclient.h |
86 |
netudpserver.h |
|
461 | 87 |
netudpwidget.h |
88 |
chatwidget.h) |
|
184 | 89 |
|
477 | 90 |
set(hwfr_hdrs |
91 |
binds.h |
|
92 |
ui_hwform.h |
|
93 |
predefteams.h |
|
94 |
KB.h |
|
95 |
) |
|
184 | 96 |
|
97 |
set(hwfr_rez |
|
98 |
hedgewars.qrc) |
|
99 |
||
100 |
qt4_add_resources(hwfr_rez_src |
|
101 |
${hwfr_rez}) |
|
102 |
||
103 |
qt4_wrap_cpp(hwfr_moc_srcs |
|
104 |
${hwfr_moc_hdrs}) |
|
105 |
||
106 |
add_executable(hedgewars WIN32 |
|
107 |
${hwfr_src} |
|
108 |
${hwfr_moc_srcs} |
|
477 | 109 |
${hwfr_hdrs} |
184 | 110 |
${hwfr_rez_src}) |
495 | 111 |
|
112 |
set(HW_LINK_LIBS ${QT_LIBRARIES}) |
|
184 | 113 |
|
114 |
if(WIN32 AND NOT UNIX) |
|
495 | 115 |
set(HW_LINK_LIBS |
116 |
${HW_LINK_LIBS} |
|
117 |
ole32 |
|
118 |
winspool |
|
119 |
uuid) |
|
120 |
endif(WIN32 AND NOT UNIX) |
|
184 | 121 |
|
495 | 122 |
target_link_libraries(hedgewars |
123 |
${HW_LINK_LIBS}) |
|
124 |
||
125 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin) |