equal
deleted
inserted
replaced
|
1 # Configure for Qt4 |
1 set(QT_MIN_VERSION "4.2.0") |
2 set(QT_MIN_VERSION "4.2.0") |
2 |
3 |
3 set(QT_USE_QTCORE TRUE) |
4 set(QT_USE_QTCORE TRUE) |
4 set(QT_USE_QTGUI TRUE) |
5 set(QT_USE_QTGUI TRUE) |
5 set(QT_USE_QTNETWORK TRUE) |
6 set(QT_USE_QTNETWORK TRUE) |
8 set(QT_USE_QTMAIN TRUE) |
9 set(QT_USE_QTMAIN TRUE) |
9 |
10 |
10 find_package(Qt4 REQUIRED) |
11 find_package(Qt4 REQUIRED) |
11 include(${QT_USE_FILE}) |
12 include(${QT_USE_FILE}) |
12 |
13 |
|
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 |
13 include_directories(.) |
22 include_directories(.) |
14 |
23 |
15 if(WIN32 AND NOT UNIX) |
24 if(WIN32 AND NOT UNIX) |
16 set(HEDGEWARS_BINDIR ".") |
25 set(HEDGEWARS_BINDIR ".") |
17 set(HEDGEWARS_DATADIR "../share/") |
26 set(HEDGEWARS_DATADIR "../share/") |
54 netconnectedclient.cpp |
63 netconnectedclient.cpp |
55 newnetclient.cpp |
64 newnetclient.cpp |
56 netudpserver.cpp |
65 netudpserver.cpp |
57 netudpwidget.cpp |
66 netudpwidget.cpp |
58 chatwidget.cpp |
67 chatwidget.cpp |
59 binds.cpp) |
68 binds.cpp |
|
69 SDLs.cpp) |
60 |
70 |
61 if (WIN32) |
71 if (WIN32) |
62 set(hwfr_src ${hwfr_src} res/hedgewars.rc) |
72 set(hwfr_src ${hwfr_src} res/hedgewars.rc) |
63 endif (WIN32) |
73 endif (WIN32) |
64 |
74 |
83 netserver.h |
93 netserver.h |
84 netconnectedclient.h |
94 netconnectedclient.h |
85 newnetclient.h |
95 newnetclient.h |
86 netudpserver.h |
96 netudpserver.h |
87 netudpwidget.h |
97 netudpwidget.h |
88 chatwidget.h) |
98 chatwidget.h |
|
99 SDLs.h) |
89 |
100 |
90 set(hwfr_hdrs |
101 set(hwfr_hdrs |
91 binds.h |
102 binds.h |
92 ui_hwform.h |
103 ui_hwform.h |
93 predefteams.h |
104 predefteams.h |
107 ${hwfr_src} |
118 ${hwfr_src} |
108 ${hwfr_moc_srcs} |
119 ${hwfr_moc_srcs} |
109 ${hwfr_hdrs} |
120 ${hwfr_hdrs} |
110 ${hwfr_rez_src}) |
121 ${hwfr_rez_src}) |
111 |
122 |
112 set(HW_LINK_LIBS ${QT_LIBRARIES}) |
123 set(HW_LINK_LIBS |
|
124 ${QT_LIBRARIES} |
|
125 ${SDL_LIBRARY} |
|
126 ) |
113 |
127 |
114 if(WIN32 AND NOT UNIX) |
128 if(WIN32 AND NOT UNIX) |
|
129 if(NOT SDL_LIBRARY) |
|
130 set(HW_LINK_LIBS |
|
131 ${HW_LINK_LIBS} |
|
132 SDL |
|
133 ) |
|
134 endif(NOT SDL_LIBRARY) |
|
135 |
115 set(HW_LINK_LIBS |
136 set(HW_LINK_LIBS |
116 ${HW_LINK_LIBS} |
137 ${HW_LINK_LIBS} |
117 ole32 |
138 ole32 |
118 winspool |
139 winspool |
119 uuid) |
140 uuid |
|
141 ) |
120 endif(WIN32 AND NOT UNIX) |
142 endif(WIN32 AND NOT UNIX) |
121 |
143 |
122 target_link_libraries(hedgewars |
144 target_link_libraries(hedgewars |
123 ${HW_LINK_LIBS}) |
145 ${HW_LINK_LIBS}) |
124 |
146 |