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