author | unc0rr |
Fri, 20 Jul 2007 12:25:40 +0000 | |
changeset 562 | d1a9035175ed |
parent 555 | 0376fdcc6322 |
child 579 | 94db15de0392 |
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 |
||
277 | 36 |
configure_file(${hedgewars_SOURCE_DIR}/QTfrontend/main.cpp.in |
37 |
${hedgewars_SOURCE_DIR}/QTfrontend/main.cpp) |
|
271 | 38 |
configure_file(${hedgewars_SOURCE_DIR}/QTfrontend/hwconsts.h.in |
39 |
${hedgewars_SOURCE_DIR}/QTfrontend/hwconsts.h) |
|
184 | 40 |
|
41 |
set(hwfr_src |
|
42 |
game.cpp |
|
43 |
main.cpp |
|
44 |
hwform.cpp |
|
45 |
team.cpp |
|
46 |
teamselect.cpp |
|
47 |
teamselhelper.cpp |
|
48 |
frameTeam.cpp |
|
49 |
vertScrollArea.cpp |
|
50 |
gameuiconfig.cpp |
|
51 |
ui_hwform.cpp |
|
52 |
gamecfgwidget.cpp |
|
53 |
pages.cpp |
|
54 |
SquareLabel.cpp |
|
55 |
hedgehogerWidget.cpp |
|
56 |
hwmap.cpp |
|
57 |
mapContainer.cpp |
|
187 | 58 |
tcpBase.cpp |
239 | 59 |
about.cpp |
297 | 60 |
proto.cpp |
314 | 61 |
fpsedit.cpp |
62 |
netserver.cpp |
|
420
6cdfc07dceed
netserver and netonnectedclient splited to different files
displacer
parents:
412
diff
changeset
|
63 |
netconnectedclient.cpp |
412 | 64 |
newnetclient.cpp |
65 |
netudpserver.cpp |
|
461 | 66 |
netudpwidget.cpp |
539
6a9bf1852bbc
Ability to choose which info is shown above hedgehogs
unc0rr
parents:
502
diff
changeset
|
67 |
chatwidget.cpp |
555 | 68 |
binds.cpp |
69 |
SDLs.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 |
99 |
SDLs.h) |
|
184 | 100 |
|
477 | 101 |
set(hwfr_hdrs |
102 |
binds.h |
|
103 |
ui_hwform.h |
|
104 |
predefteams.h |
|
105 |
KB.h |
|
106 |
) |
|
184 | 107 |
|
108 |
set(hwfr_rez |
|
109 |
hedgewars.qrc) |
|
110 |
||
111 |
qt4_add_resources(hwfr_rez_src |
|
112 |
${hwfr_rez}) |
|
113 |
||
114 |
qt4_wrap_cpp(hwfr_moc_srcs |
|
115 |
${hwfr_moc_hdrs}) |
|
116 |
||
117 |
add_executable(hedgewars WIN32 |
|
118 |
${hwfr_src} |
|
119 |
${hwfr_moc_srcs} |
|
477 | 120 |
${hwfr_hdrs} |
184 | 121 |
${hwfr_rez_src}) |
495 | 122 |
|
555 | 123 |
set(HW_LINK_LIBS |
124 |
${QT_LIBRARIES} |
|
125 |
${SDL_LIBRARY} |
|
126 |
) |
|
184 | 127 |
|
128 |
if(WIN32 AND NOT UNIX) |
|
555 | 129 |
if(NOT SDL_LIBRARY) |
130 |
set(HW_LINK_LIBS |
|
131 |
${HW_LINK_LIBS} |
|
132 |
SDL |
|
133 |
) |
|
134 |
endif(NOT SDL_LIBRARY) |
|
135 |
||
495 | 136 |
set(HW_LINK_LIBS |
137 |
${HW_LINK_LIBS} |
|
138 |
ole32 |
|
139 |
winspool |
|
555 | 140 |
uuid |
141 |
) |
|
495 | 142 |
endif(WIN32 AND NOT UNIX) |
184 | 143 |
|
495 | 144 |
target_link_libraries(hedgewars |
145 |
${HW_LINK_LIBS}) |
|
146 |
||
147 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin) |