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
|
|
58 |
about.h)
|
184
|
59 |
|
|
60 |
|
|
61 |
set(hwfr_rez
|
|
62 |
hedgewars.qrc)
|
|
63 |
|
|
64 |
qt4_add_resources(hwfr_rez_src
|
|
65 |
${hwfr_rez})
|
|
66 |
|
|
67 |
qt4_wrap_cpp(hwfr_moc_srcs
|
|
68 |
${hwfr_moc_hdrs})
|
|
69 |
|
|
70 |
add_executable(hedgewars WIN32
|
|
71 |
${hwfr_src}
|
|
72 |
${hwfr_moc_srcs}
|
|
73 |
${hwfr_rez_src})
|
|
74 |
|
|
75 |
target_link_libraries(hedgewars
|
|
76 |
${QT_QTCORE_LIBRARY}
|
|
77 |
${QT_QTGUI_LIBRARY}
|
|
78 |
${QT_QTNETWORK_LIBRARY}
|
|
79 |
${QT_QTMAIN_LIBRARY})
|
|
80 |
|
|
81 |
install(PROGRAMS "hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin)
|
|
82 |
|
|
83 |
|
|
84 |
if(WIN32 AND NOT UNIX)
|
|
85 |
string(REPLACE "\\" "/" QT_BIN_DIR $ENV{QTDIR}/bin)
|
|
86 |
|
|
87 |
install(FILES
|
|
88 |
"${QT_BIN_DIR}/QtNetwork4.dll"
|
|
89 |
"${QT_BIN_DIR}/QtGui4.dll"
|
|
90 |
"${QT_BIN_DIR}/QtCore4.dll"
|
|
91 |
"${QT_BIN_DIR}/mingwm10.dll"
|
|
92 |
DESTINATION bin)
|
|
93 |
endif(WIN32 AND NOT UNIX)
|