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
|
|
32 |
tcpBase.cpp)
|
|
33 |
|
|
34 |
if (WIN32)
|
|
35 |
set(hwfr_src ${hwfr_src} res/hedgewars.rc)
|
|
36 |
endif (WIN32)
|
|
37 |
|
|
38 |
set(hwfr_moc_hdrs
|
|
39 |
game.h
|
|
40 |
hwform.h
|
|
41 |
binds.h
|
|
42 |
netclient.h
|
|
43 |
teamselect.h
|
|
44 |
teamselhelper.h
|
|
45 |
frameTeam.h
|
|
46 |
vertScrollArea.h
|
|
47 |
gameuiconfig.h
|
|
48 |
ui_hwform.h
|
|
49 |
gamecfgwidget.h
|
|
50 |
predefteams.h
|
|
51 |
pages.h
|
|
52 |
SquareLabel.h
|
|
53 |
hedgehogerWidget.h
|
|
54 |
hwmap.h
|
|
55 |
mapContainer.h
|
|
56 |
tcpBase.h)
|
|
57 |
|
|
58 |
|
|
59 |
set(hwfr_rez
|
|
60 |
hedgewars.qrc)
|
|
61 |
|
|
62 |
qt4_add_resources(hwfr_rez_src
|
|
63 |
${hwfr_rez})
|
|
64 |
|
|
65 |
qt4_wrap_cpp(hwfr_moc_srcs
|
|
66 |
${hwfr_moc_hdrs})
|
|
67 |
|
|
68 |
add_executable(hedgewars WIN32
|
|
69 |
${hwfr_src}
|
|
70 |
${hwfr_moc_srcs}
|
|
71 |
${hwfr_rez_src})
|
|
72 |
|
|
73 |
target_link_libraries(hedgewars
|
|
74 |
${QT_QTCORE_LIBRARY}
|
|
75 |
${QT_QTGUI_LIBRARY}
|
|
76 |
${QT_QTNETWORK_LIBRARY}
|
|
77 |
${QT_QTMAIN_LIBRARY})
|
|
78 |
|
|
79 |
install(PROGRAMS "hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin)
|
|
80 |
|
|
81 |
|
|
82 |
if(WIN32 AND NOT UNIX)
|
|
83 |
string(REPLACE "\\" "/" QT_BIN_DIR $ENV{QTDIR}/bin)
|
|
84 |
|
|
85 |
install(FILES
|
|
86 |
"${QT_BIN_DIR}/QtNetwork4.dll"
|
|
87 |
"${QT_BIN_DIR}/QtGui4.dll"
|
|
88 |
"${QT_BIN_DIR}/QtCore4.dll"
|
|
89 |
"${QT_BIN_DIR}/mingwm10.dll"
|
|
90 |
DESTINATION bin)
|
|
91 |
endif(WIN32 AND NOT UNIX)
|