author | displacer |
Thu, 20 Dec 2007 10:54:42 +0000 | |
changeset 683 | 57d624f71e65 |
parent 653 | 4f44fc06ca45 |
child 707 | 0a00c16022ca |
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 |
633 | 65 |
netwwwserver.cpp |
625 | 66 |
netwwwwidget.cpp |
633 | 67 |
netregister.cpp |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
625
diff
changeset
|
68 |
netserverslist.cpp |
539
6a9bf1852bbc
Ability to choose which info is shown above hedgehogs
unc0rr
parents:
502
diff
changeset
|
69 |
chatwidget.cpp |
555 | 70 |
binds.cpp |
579 | 71 |
SDLs.cpp |
72 |
playrecordpage.cpp |
|
597
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
592
diff
changeset
|
73 |
hwconsts.cpp |
612
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
597
diff
changeset
|
74 |
selectWeapon.cpp |
624 | 75 |
itemNum.cpp |
653
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
633
diff
changeset
|
76 |
input_ip.cpp |
624 | 77 |
weaponItem.cpp) |
184 | 78 |
|
79 |
if (WIN32) |
|
80 |
set(hwfr_src ${hwfr_src} res/hedgewars.rc) |
|
81 |
endif (WIN32) |
|
82 |
||
83 |
set(hwfr_moc_hdrs |
|
84 |
game.h |
|
85 |
hwform.h |
|
86 |
teamselect.h |
|
87 |
teamselhelper.h |
|
88 |
frameTeam.h |
|
89 |
vertScrollArea.h |
|
90 |
gameuiconfig.h |
|
91 |
gamecfgwidget.h |
|
92 |
pages.h |
|
93 |
SquareLabel.h |
|
94 |
hedgehogerWidget.h |
|
95 |
hwmap.h |
|
96 |
mapContainer.h |
|
187 | 97 |
tcpBase.h |
208 | 98 |
about.h |
297 | 99 |
proto.h |
314 | 100 |
fpsedit.h |
101 |
netserver.h |
|
420
6cdfc07dceed
netserver and netonnectedclient splited to different files
displacer
parents:
412
diff
changeset
|
102 |
netconnectedclient.h |
412 | 103 |
newnetclient.h |
104 |
netudpserver.h |
|
461 | 105 |
netudpwidget.h |
633 | 106 |
netwwwserver.h |
625 | 107 |
netwwwwidget.h |
633 | 108 |
netregister.h |
632
5e09ae25729f
Half implement possibility for different backends of servers list
unc0rr
parents:
625
diff
changeset
|
109 |
netserverslist.h |
555 | 110 |
chatwidget.h |
579 | 111 |
SDLs.h |
597
ec5f057ab268
kdevelop project add, initial weapons scheme button
displacer
parents:
592
diff
changeset
|
112 |
playrecordpage.h |
612
333d095319de
abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents:
597
diff
changeset
|
113 |
selectWeapon.h |
624 | 114 |
itemNum.h |
653
4f44fc06ca45
Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents:
633
diff
changeset
|
115 |
input_ip.h |
624 | 116 |
weaponItem.h) |
184 | 117 |
|
477 | 118 |
set(hwfr_hdrs |
119 |
binds.h |
|
120 |
ui_hwform.h |
|
121 |
predefteams.h |
|
122 |
KB.h |
|
579 | 123 |
hwconsts.h |
477 | 124 |
) |
184 | 125 |
|
126 |
set(hwfr_rez |
|
127 |
hedgewars.qrc) |
|
128 |
||
129 |
qt4_add_resources(hwfr_rez_src |
|
130 |
${hwfr_rez}) |
|
131 |
||
132 |
qt4_wrap_cpp(hwfr_moc_srcs |
|
133 |
${hwfr_moc_hdrs}) |
|
134 |
||
135 |
add_executable(hedgewars WIN32 |
|
136 |
${hwfr_src} |
|
137 |
${hwfr_moc_srcs} |
|
477 | 138 |
${hwfr_hdrs} |
184 | 139 |
${hwfr_rez_src}) |
495 | 140 |
|
555 | 141 |
set(HW_LINK_LIBS |
142 |
${QT_LIBRARIES} |
|
143 |
${SDL_LIBRARY} |
|
144 |
) |
|
184 | 145 |
|
146 |
if(WIN32 AND NOT UNIX) |
|
555 | 147 |
if(NOT SDL_LIBRARY) |
148 |
set(HW_LINK_LIBS |
|
149 |
${HW_LINK_LIBS} |
|
150 |
SDL |
|
151 |
) |
|
152 |
endif(NOT SDL_LIBRARY) |
|
153 |
||
495 | 154 |
set(HW_LINK_LIBS |
155 |
${HW_LINK_LIBS} |
|
156 |
ole32 |
|
157 |
winspool |
|
555 | 158 |
uuid |
159 |
) |
|
495 | 160 |
endif(WIN32 AND NOT UNIX) |
184 | 161 |
|
495 | 162 |
target_link_libraries(hedgewars |
163 |
${HW_LINK_LIBS}) |
|
164 |
||
165 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin) |