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