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