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