184
|
1 |
find_package(Qt4 REQUIRED)
|
|
2 |
|
|
3 |
include_directories(${QT_INCLUDES} .)
|
|
4 |
|
|
5 |
if(WIN32 AND NOT UNIX)
|
|
6 |
set(HEDGEWARS_BINDIR ".")
|
|
7 |
else(WIN32 AND NOT UNIX)
|
|
8 |
set(HEDGEWARS_BINDIR ${CMAKE_INSTALL_PREFIX})
|
|
9 |
endif(WIN32 AND NOT UNIX)
|
|
10 |
|
|
11 |
configure_file(${hedgewars_SOURCE_DIR}/QTfrontend/main.cpp.in
|
|
12 |
${hedgewars_SOURCE_DIR}/QTfrontend/main.cpp)
|
|
13 |
|
|
14 |
set(hwfr_src
|
|
15 |
game.cpp
|
|
16 |
main.cpp
|
|
17 |
hwform.cpp
|
|
18 |
team.cpp
|
|
19 |
netclient.cpp
|
|
20 |
teamselect.cpp
|
|
21 |
teamselhelper.cpp
|
|
22 |
frameTeam.cpp
|
|
23 |
vertScrollArea.cpp
|
|
24 |
gameuiconfig.cpp
|
|
25 |
ui_hwform.cpp
|
|
26 |
gamecfgwidget.cpp
|
|
27 |
pages.cpp
|
|
28 |
SquareLabel.cpp
|
|
29 |
hedgehogerWidget.cpp
|
|
30 |
hwmap.cpp
|
|
31 |
mapContainer.cpp
|
187
|
32 |
tcpBase.cpp
|
|
33 |
about.cpp)
|
184
|
34 |
|
|
35 |
if (WIN32)
|
|
36 |
set(hwfr_src ${hwfr_src} res/hedgewars.rc)
|
|
37 |
endif (WIN32)
|
|
38 |
|
|
39 |
set(hwfr_moc_hdrs
|
|
40 |
game.h
|
|
41 |
hwform.h
|
|
42 |
binds.h
|
|
43 |
netclient.h
|
|
44 |
teamselect.h
|
|
45 |
teamselhelper.h
|
|
46 |
frameTeam.h
|
|
47 |
vertScrollArea.h
|
|
48 |
gameuiconfig.h
|
|
49 |
ui_hwform.h
|
|
50 |
gamecfgwidget.h
|
|
51 |
predefteams.h
|
|
52 |
pages.h
|
|
53 |
SquareLabel.h
|
|
54 |
hedgehogerWidget.h
|
|
55 |
hwmap.h
|
|
56 |
mapContainer.h
|
187
|
57 |
tcpBase.h
|
208
|
58 |
about.h
|
|
59 |
KB.h)
|
184
|
60 |
|
|
61 |
|
|
62 |
set(hwfr_rez
|
|
63 |
hedgewars.qrc)
|
|
64 |
|
|
65 |
qt4_add_resources(hwfr_rez_src
|
|
66 |
${hwfr_rez})
|
|
67 |
|
|
68 |
qt4_wrap_cpp(hwfr_moc_srcs
|
|
69 |
${hwfr_moc_hdrs})
|
|
70 |
|
|
71 |
add_executable(hedgewars WIN32
|
|
72 |
${hwfr_src}
|
|
73 |
${hwfr_moc_srcs}
|
|
74 |
${hwfr_rez_src})
|
|
75 |
|
|
76 |
target_link_libraries(hedgewars
|
|
77 |
${QT_QTCORE_LIBRARY}
|
|
78 |
${QT_QTGUI_LIBRARY}
|
|
79 |
${QT_QTNETWORK_LIBRARY}
|
|
80 |
${QT_QTMAIN_LIBRARY})
|
|
81 |
|
|
82 |
install(PROGRAMS "hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin)
|
|
83 |
|
|
84 |
|
|
85 |
if(WIN32 AND NOT UNIX)
|
|
86 |
string(REPLACE "\\" "/" QT_BIN_DIR $ENV{QTDIR}/bin)
|
|
87 |
|
|
88 |
install(FILES
|
|
89 |
"${QT_BIN_DIR}/QtNetwork4.dll"
|
|
90 |
"${QT_BIN_DIR}/QtGui4.dll"
|
|
91 |
"${QT_BIN_DIR}/QtCore4.dll"
|
|
92 |
"${QT_BIN_DIR}/mingwm10.dll"
|
|
93 |
DESTINATION bin)
|
|
94 |
endif(WIN32 AND NOT UNIX)
|