author | unc0rr |
Sun, 20 Jan 2008 19:42:03 +0000 | |
changeset 738 | d7f640e99b17 |
parent 707 | 0a00c16022ca |
child 781 | 4101f0f1c0b9 |
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 |
||
707 | 17 |
include_directories(${SDL_INCLUDE_DIR}) |
555 | 18 |
|
19 |
# Done |
|
494 | 20 |
include_directories(.) |
184 | 21 |
|
22 |
if(WIN32 AND NOT UNIX) |
|
23 |
set(HEDGEWARS_BINDIR ".") |
|
267 | 24 |
set(HEDGEWARS_DATADIR "../share/") |
184 | 25 |
else(WIN32 AND NOT UNIX) |
26 |
set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX}) |
|
266 | 27 |
if(DEFINED DATA_INSTALL_DIR) |
265 | 28 |
set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR}) |
266 | 29 |
else(DEFINED DATA_INSTALL_DIR) |
265 | 30 |
set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/share/) |
266 | 31 |
endif(DEFINED DATA_INSTALL_DIR) |
184 | 32 |
endif(WIN32 AND NOT UNIX) |
33 |
||
579 | 34 |
configure_file(${hedgewars_SOURCE_DIR}/QTfrontend/hwconsts.cpp.in |
35 |
${hedgewars_SOURCE_DIR}/QTfrontend/hwconsts.cpp) |
|
184 | 36 |
|
37 |
set(hwfr_src |
|
38 |
game.cpp |
|
39 |
main.cpp |
|
40 |
hwform.cpp |
|
41 |
team.cpp |
|
42 |
teamselect.cpp |
|
43 |
teamselhelper.cpp |
|
44 |
frameTeam.cpp |
|
45 |
vertScrollArea.cpp |
|
46 |
gameuiconfig.cpp |
|
47 |
ui_hwform.cpp |
|
48 |
gamecfgwidget.cpp |
|
49 |
pages.cpp |
|
50 |
SquareLabel.cpp |
|
51 |
hedgehogerWidget.cpp |
|
52 |
hwmap.cpp |
|
53 |
mapContainer.cpp |
|
187 | 54 |
tcpBase.cpp |
239 | 55 |
about.cpp |
297 | 56 |
proto.cpp |
314 | 57 |
fpsedit.cpp |
58 |
netserver.cpp |
|
420
6cdfc07dceed
netserver and netonnectedclient splited to different files
displacer
parents:
412
diff
changeset
|
59 |
netconnectedclient.cpp |
412 | 60 |
newnetclient.cpp |
61 |
netudpserver.cpp |
|
461 | 62 |
netudpwidget.cpp |
633 | 63 |
netwwwserver.cpp |
625 | 64 |
netwwwwidget.cpp |
633 | 65 |
netregister.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 |
653
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
633
diff
changeset
|
74 |
input_ip.cpp |
624 | 75 |
weaponItem.cpp) |
184 | 76 |
|
77 |
if (WIN32) |
|
78 |
set(hwfr_src ${hwfr_src} res/hedgewars.rc) |
|
79 |
endif (WIN32) |
|
80 |
||
81 |
set(hwfr_moc_hdrs |
|
82 |
game.h |
|
83 |
hwform.h |
|
84 |
teamselect.h |
|
85 |
teamselhelper.h |
|
86 |
frameTeam.h |
|
87 |
vertScrollArea.h |
|
88 |
gameuiconfig.h |
|
89 |
gamecfgwidget.h |
|
90 |
pages.h |
|
91 |
SquareLabel.h |
|
92 |
hedgehogerWidget.h |
|
93 |
hwmap.h |
|
94 |
mapContainer.h |
|
187 | 95 |
tcpBase.h |
208 | 96 |
about.h |
297 | 97 |
proto.h |
314 | 98 |
fpsedit.h |
99 |
netserver.h |
|
420
6cdfc07dceed
netserver and netonnectedclient splited to different files
displacer
parents:
412
diff
changeset
|
100 |
netconnectedclient.h |
412 | 101 |
newnetclient.h |
102 |
netudpserver.h |
|
461 | 103 |
netudpwidget.h |
633 | 104 |
netwwwserver.h |
625 | 105 |
netwwwwidget.h |
633 | 106 |
netregister.h |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
625
diff
changeset
|
107 |
netserverslist.h |
555 | 108 |
chatwidget.h |
579 | 109 |
SDLs.h |
597
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
592
diff
changeset
|
110 |
playrecordpage.h |
612
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
597
diff
changeset
|
111 |
selectWeapon.h |
624 | 112 |
itemNum.h |
653
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
633
diff
changeset
|
113 |
input_ip.h |
624 | 114 |
weaponItem.h) |
184 | 115 |
|
477 | 116 |
set(hwfr_hdrs |
117 |
binds.h |
|
118 |
ui_hwform.h |
|
119 |
predefteams.h |
|
120 |
KB.h |
|
579 | 121 |
hwconsts.h |
477 | 122 |
) |
184 | 123 |
|
124 |
set(hwfr_rez |
|
125 |
hedgewars.qrc) |
|
126 |
||
127 |
qt4_add_resources(hwfr_rez_src |
|
128 |
${hwfr_rez}) |
|
129 |
||
130 |
qt4_wrap_cpp(hwfr_moc_srcs |
|
131 |
${hwfr_moc_hdrs}) |
|
132 |
||
133 |
add_executable(hedgewars WIN32 |
|
134 |
${hwfr_src} |
|
135 |
${hwfr_moc_srcs} |
|
477 | 136 |
${hwfr_hdrs} |
184 | 137 |
${hwfr_rez_src}) |
495 | 138 |
|
555 | 139 |
set(HW_LINK_LIBS |
140 |
${QT_LIBRARIES} |
|
141 |
${SDL_LIBRARY} |
|
142 |
) |
|
184 | 143 |
|
144 |
if(WIN32 AND NOT UNIX) |
|
555 | 145 |
if(NOT SDL_LIBRARY) |
146 |
set(HW_LINK_LIBS |
|
147 |
${HW_LINK_LIBS} |
|
148 |
SDL |
|
149 |
) |
|
150 |
endif(NOT SDL_LIBRARY) |
|
151 |
||
495 | 152 |
set(HW_LINK_LIBS |
153 |
${HW_LINK_LIBS} |
|
154 |
ole32 |
|
155 |
winspool |
|
555 | 156 |
uuid |
157 |
) |
|
495 | 158 |
endif(WIN32 AND NOT UNIX) |
184 | 159 |
|
495 | 160 |
target_link_libraries(hedgewars |
161 |
${HW_LINK_LIBS}) |
|
162 |
||
163 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin) |