author | unc0rr |
Sun, 09 Dec 2007 10:09:52 +0000 | |
changeset 632 | 5e09ae25729f |
parent 625 | 373353eaa742 |
child 633 | 9050a949db21 |
permissions | -rw-r--r-- |
555 | 1 |
# Configure for Qt4 |
260 | 2 |
set(QT_MIN_VERSION "4.2.0") |
3 |
||
502
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_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
|
5 |
set(QT_USE_QTGUI TRUE) |
494 | 6 |
set(QT_USE_QTNETWORK TRUE) |
7 |
set(QT_USE_QTSVG TRUE) |
|
495 | 8 |
set(QT_USE_QTXML TRUE) |
494 | 9 |
set(QT_USE_QTMAIN TRUE) |
10 |
||
184 | 11 |
find_package(Qt4 REQUIRED) |
494 | 12 |
include(${QT_USE_FILE}) |
184 | 13 |
|
555 | 14 |
# Configure for SDL |
15 |
find_package(SDL REQUIRED) |
|
16 |
||
17 |
if(SDL_INCLUDE_DIR) |
|
18 |
include_directories(${SDL_INCLUDE_DIR}) |
|
19 |
endif(SDL_INCLUDE_DIR) |
|
20 |
||
21 |
# Done |
|
494 | 22 |
include_directories(.) |
184 | 23 |
|
24 |
if(WIN32 AND NOT UNIX) |
|
25 |
set(HEDGEWARS_BINDIR ".") |
|
267 | 26 |
set(HEDGEWARS_DATADIR "../share/") |
184 | 27 |
else(WIN32 AND NOT UNIX) |
28 |
set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX}) |
|
266 | 29 |
if(DEFINED DATA_INSTALL_DIR) |
265 | 30 |
set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR}) |
266 | 31 |
else(DEFINED DATA_INSTALL_DIR) |
265 | 32 |
set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/share/) |
266 | 33 |
endif(DEFINED DATA_INSTALL_DIR) |
184 | 34 |
endif(WIN32 AND NOT UNIX) |
35 |
||
579 | 36 |
configure_file(${hedgewars_SOURCE_DIR}/QTfrontend/hwconsts.cpp.in |
37 |
${hedgewars_SOURCE_DIR}/QTfrontend/hwconsts.cpp) |
|
184 | 38 |
|
39 |
set(hwfr_src |
|
40 |
game.cpp |
|
41 |
main.cpp |
|
42 |
hwform.cpp |
|
43 |
team.cpp |
|
44 |
teamselect.cpp |
|
45 |
teamselhelper.cpp |
|
46 |
frameTeam.cpp |
|
47 |
vertScrollArea.cpp |
|
48 |
gameuiconfig.cpp |
|
49 |
ui_hwform.cpp |
|
50 |
gamecfgwidget.cpp |
|
51 |
pages.cpp |
|
52 |
SquareLabel.cpp |
|
53 |
hedgehogerWidget.cpp |
|
54 |
hwmap.cpp |
|
55 |
mapContainer.cpp |
|
187 | 56 |
tcpBase.cpp |
239 | 57 |
about.cpp |
297 | 58 |
proto.cpp |
314 | 59 |
fpsedit.cpp |
60 |
netserver.cpp |
|
420
6cdfc07dceed
netserver and netonnectedclient splited to different files
displacer
parents:
412
diff
changeset
|
61 |
netconnectedclient.cpp |
412 | 62 |
newnetclient.cpp |
63 |
netudpserver.cpp |
|
461 | 64 |
netudpwidget.cpp |
625 | 65 |
netwwwwidget.cpp |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
625
diff
changeset
|
66 |
netserverslist.cpp |
539
6a9bf1852bbc
Ability to choose which info is shown above hedgehogs
unc0rr
parents:
502
diff
changeset
|
67 |
chatwidget.cpp |
555 | 68 |
binds.cpp |
579 | 69 |
SDLs.cpp |
70 |
playrecordpage.cpp |
|
597
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
592
diff
changeset
|
71 |
hwconsts.cpp |
612
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
597
diff
changeset
|
72 |
selectWeapon.cpp |
624 | 73 |
itemNum.cpp |
74 |
weaponItem.cpp) |
|
184 | 75 |
|
76 |
if (WIN32) |
|
77 |
set(hwfr_src ${hwfr_src} res/hedgewars.rc) |
|
78 |
endif (WIN32) |
|
79 |
||
80 |
set(hwfr_moc_hdrs |
|
81 |
game.h |
|
82 |
hwform.h |
|
83 |
teamselect.h |
|
84 |
teamselhelper.h |
|
85 |
frameTeam.h |
|
86 |
vertScrollArea.h |
|
87 |
gameuiconfig.h |
|
88 |
gamecfgwidget.h |
|
89 |
pages.h |
|
90 |
SquareLabel.h |
|
91 |
hedgehogerWidget.h |
|
92 |
hwmap.h |
|
93 |
mapContainer.h |
|
187 | 94 |
tcpBase.h |
208 | 95 |
about.h |
297 | 96 |
proto.h |
314 | 97 |
fpsedit.h |
98 |
netserver.h |
|
420
6cdfc07dceed
netserver and netonnectedclient splited to different files
displacer
parents:
412
diff
changeset
|
99 |
netconnectedclient.h |
412 | 100 |
newnetclient.h |
101 |
netudpserver.h |
|
461 | 102 |
netudpwidget.h |
625 | 103 |
netwwwwidget.h |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
625
diff
changeset
|
104 |
netserverslist.h |
555 | 105 |
chatwidget.h |
579 | 106 |
SDLs.h |
597
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
592
diff
changeset
|
107 |
playrecordpage.h |
612
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
597
diff
changeset
|
108 |
selectWeapon.h |
624 | 109 |
itemNum.h |
110 |
weaponItem.h) |
|
184 | 111 |
|
477 | 112 |
set(hwfr_hdrs |
113 |
binds.h |
|
114 |
ui_hwform.h |
|
115 |
predefteams.h |
|
116 |
KB.h |
|
579 | 117 |
hwconsts.h |
477 | 118 |
) |
184 | 119 |
|
120 |
set(hwfr_rez |
|
121 |
hedgewars.qrc) |
|
122 |
||
123 |
qt4_add_resources(hwfr_rez_src |
|
124 |
${hwfr_rez}) |
|
125 |
||
126 |
qt4_wrap_cpp(hwfr_moc_srcs |
|
127 |
${hwfr_moc_hdrs}) |
|
128 |
||
129 |
add_executable(hedgewars WIN32 |
|
130 |
${hwfr_src} |
|
131 |
${hwfr_moc_srcs} |
|
477 | 132 |
${hwfr_hdrs} |
184 | 133 |
${hwfr_rez_src}) |
495 | 134 |
|
555 | 135 |
set(HW_LINK_LIBS |
136 |
${QT_LIBRARIES} |
|
137 |
${SDL_LIBRARY} |
|
138 |
) |
|
184 | 139 |
|
140 |
if(WIN32 AND NOT UNIX) |
|
555 | 141 |
if(NOT SDL_LIBRARY) |
142 |
set(HW_LINK_LIBS |
|
143 |
${HW_LINK_LIBS} |
|
144 |
SDL |
|
145 |
) |
|
146 |
endif(NOT SDL_LIBRARY) |
|
147 |
||
495 | 148 |
set(HW_LINK_LIBS |
149 |
${HW_LINK_LIBS} |
|
150 |
ole32 |
|
151 |
winspool |
|
555 | 152 |
uuid |
153 |
) |
|
495 | 154 |
endif(WIN32 AND NOT UNIX) |
184 | 155 |
|
495 | 156 |
target_link_libraries(hedgewars |
157 |
${HW_LINK_LIBS}) |
|
158 |
||
159 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin) |