This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG), Euroboros (EB), and Down Under Doomers (DUD).
リビジョン | 265da92bf492b5a0e13f9430e373d01b094d3ff6 (tree) |
---|---|
日時 | 2013-10-11 09:40:15 |
作者 | Braden Obrzut <admin@mani...> |
コミッター | Braden Obrzut |
- DYN_FLUIDSYNTH now defaults to ON.
- Added ZDOOM_OUTPUT_OLDSTYLE (could probably use a more descriptive name) which causes CMake to vary the executable name by build type and place the exes and pk3s into the directory specified in ZDOOM_OUTPUT_DIR.
- ALL_BUILD will now launch ZDoom.
@@ -1,6 +1,9 @@ | ||
1 | 1 | cmake_minimum_required( VERSION 2.4 ) |
2 | 2 | project(ZDoom) |
3 | 3 | |
4 | +list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ) | |
5 | +include( CreateLaunchers ) | |
6 | + | |
4 | 7 | # Generator expression are available some time in CMake 2.8. Due to |
5 | 8 | # cmake_minimum_required, we can assume a minor version of > 7 implies major >= 2 |
6 | 9 | if(${CMAKE_MAJOR_VERSION} GREATER 2 OR ${CMAKE_MINOR_VERSION} GREATER 7) |
@@ -19,16 +22,16 @@ | ||
19 | 22 | set( PK3_TARGET "pk3" ) |
20 | 23 | endif( ${PK3_TARGET} STREQUAL "zdoom_pk3" ) |
21 | 24 | |
22 | - if( NOT NO_GENERATOR_EXPRESSIONS ) | |
25 | + if( NOT NO_GENERATOR_EXPRESSIONS AND NOT ZDOOM_OUTPUT_OLDSTYLE ) | |
23 | 26 | add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} |
24 | 27 | COMMAND ${ZIPDIR_EXE} -udf ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} ${PK3_DIR} |
25 | 28 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} $<TARGET_FILE_DIR:zdoom> |
26 | 29 | DEPENDS zipdir ${PK3_DIR} ) |
27 | - else( NOT NO_GENERATOR_EXPRESSIONS ) | |
30 | + else( NOT NO_GENERATOR_EXPRESSIONS AND NOT ZDOOM_OUTPUT_OLDSTYLE ) | |
28 | 31 | add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} |
29 | 32 | COMMAND ${ZIPDIR_EXE} -udf ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} ${PK3_DIR} |
30 | 33 | DEPENDS zipdir ${PK3_DIR} ) |
31 | - endif( NOT NO_GENERATOR_EXPRESSIONS ) | |
34 | + endif( NOT NO_GENERATOR_EXPRESSIONS AND NOT ZDOOM_OUTPUT_OLDSTYLE ) | |
32 | 35 | |
33 | 36 | add_custom_target( ${PK3_TARGET} ALL |
34 | 37 | DEPENDS ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} ) |
@@ -42,6 +45,13 @@ | ||
42 | 45 | |
43 | 46 | set( ZDOOM_OUTPUT_DIR ${CMAKE_BINARY_DIR} CACHE PATH "Directory where zdoom.pk3 and the executable will be created." ) |
44 | 47 | set( ZDOOM_EXE_NAME "zdoom" CACHE FILEPATH "Name of the executable to create." ) |
48 | +if( MSVC ) | |
49 | + # Allow the user to use ZDOOM_OUTPUT_DIR as a single release point. | |
50 | + # Use zdoom, zdoomd, zdoom64, and zdoomd64 for the binary names | |
51 | + option( ZDOOM_OUTPUT_OLDSTYLE "Don't use Release/Debug directories." OFF ) | |
52 | +else( MSVC ) | |
53 | + set( ZDOOM_OUTPUT_OLDSTYLE OFF ) | |
54 | +endif( MSVC ) | |
45 | 55 | |
46 | 56 | if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) |
47 | 57 | set( PROFILE 0 CACHE BOOL "Enable profiling with gprof for Debug and RelWithDebInfo build types." ) |
@@ -0,0 +1,48 @@ | ||
1 | +# - Removes duplicate entries and non-directories from a provided list | |
2 | +# | |
3 | +# clean_directory_list(<listvar> [<additional list items>...]) | |
4 | +# | |
5 | +# Requires CMake 2.6 or newer (uses the 'function' command) | |
6 | +# | |
7 | +# Original Author: | |
8 | +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> | |
9 | +# http://academic.cleardefinition.com | |
10 | +# Iowa State University HCI Graduate Program/VRAC | |
11 | +# | |
12 | +# Copyright Iowa State University 2009-2010. | |
13 | +# Distributed under the Boost Software License, Version 1.0. | |
14 | +# (See accompanying file LICENSE_1_0.txt or copy at | |
15 | +# http://www.boost.org/LICENSE_1_0.txt) | |
16 | + | |
17 | +if(__clean_directory_list) | |
18 | + return() | |
19 | +endif() | |
20 | +set(__clean_directory_list YES) | |
21 | + | |
22 | +function(clean_directory_list _var) | |
23 | + # combine variable's current value with additional list items | |
24 | + set(_in ${${_var}} ${ARGN}) | |
25 | + | |
26 | + if(_in) | |
27 | + # Initial list cleaning | |
28 | + list(REMOVE_DUPLICATES _in) | |
29 | + | |
30 | + # Grab the absolute path of each actual directory | |
31 | + set(_out) | |
32 | + foreach(_dir ${_in}) | |
33 | + if(IS_DIRECTORY "${_dir}") | |
34 | + get_filename_component(_dir "${_dir}" ABSOLUTE) | |
35 | + file(TO_CMAKE_PATH "${_dir}" _dir) | |
36 | + list(APPEND _out "${_dir}") | |
37 | + endif() | |
38 | + endforeach() | |
39 | + | |
40 | + if(_out) | |
41 | + # Clean up the output list now | |
42 | + list(REMOVE_DUPLICATES _out) | |
43 | + endif() | |
44 | + | |
45 | + # return _out | |
46 | + set(${_var} "${_out}" PARENT_SCOPE) | |
47 | + endif() | |
48 | +endfunction() |
@@ -0,0 +1,336 @@ | ||
1 | +# - Create launchers to set working directory, env. vars, etc. | |
2 | +# | |
3 | +# include(CreateLaunchers) - to make these available | |
4 | +# guess_runtime_library_dirs(<outputvarname> [<extralibrary> ...]) | |
5 | +# create_default_target_launcher(<targetname> | |
6 | +# [ARGS <args...>] | |
7 | +# [FORWARD_ARGS] | |
8 | +# [RUNTIME_LIBRARY_DIRS <dir...>] | |
9 | +# [WORKING_DIRECTORY <dir>] | |
10 | +# [ENVIRONMENT <VAR=value> [<VAR=value>...]]) | |
11 | +# | |
12 | +# create_target_launcher(<targetname> | |
13 | +# [ARGS <args...>] | |
14 | +# [FORWARD_ARGS] | |
15 | +# [RUNTIME_LIBRARY_DIRS <dir...>] | |
16 | +# [WORKING_DIRECTORY <dir>] | |
17 | +# [ENVIRONMENT <VAR=value> [<VAR=value>...]]) | |
18 | +# | |
19 | +# create_generic_launcher(<launchername> | |
20 | +# [RUNTIME_LIBRARY_DIRS <dir...>] | |
21 | +# [WORKING_DIRECTORY <dir>] | |
22 | +# [ENVIRONMENT <VAR=value> [<VAR=value>...]]) | |
23 | +# - sets GENERIC_LAUNCHER_COMMAND and GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION | |
24 | +# | |
25 | +# Requires these CMake modules: | |
26 | +# ListFilter | |
27 | +# ProgramFilesGlob | |
28 | +# CleanDirectoryList | |
29 | +# | |
30 | +# Requires CMake 2.6 or newer (uses the 'function' command) | |
31 | +# | |
32 | +# Original Author: | |
33 | +# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net> | |
34 | +# http://academic.cleardefinition.com | |
35 | +# Iowa State University HCI Graduate Program/VRAC | |
36 | +# | |
37 | +# Copyright Iowa State University 2009-2010. | |
38 | +# Distributed under the Boost Software License, Version 1.0. | |
39 | +# (See accompanying file LICENSE_1_0.txt or copy at | |
40 | +# http://www.boost.org/LICENSE_1_0.txt) | |
41 | + | |
42 | +if(__create_launchers) | |
43 | + return() | |
44 | +endif() | |
45 | +set(__create_launchers YES) | |
46 | + | |
47 | +include(CleanDirectoryList) | |
48 | + | |
49 | +# We must run the following at "include" time, not at function call time, | |
50 | +# to find the path to this module rather than the path to a calling list file | |
51 | +get_filename_component(_launchermoddir | |
52 | + ${CMAKE_CURRENT_LIST_FILE} | |
53 | + PATH) | |
54 | +set(_launchermoddir "${_launchermoddir}/launcher-templates") | |
55 | + | |
56 | +macro(_launcher_system_settings) | |
57 | + if(CMAKE_SIZEOF_VOID_P EQUAL 8) | |
58 | + set(BITS 64) | |
59 | + else() | |
60 | + set(BITS 32) | |
61 | + endif() | |
62 | + | |
63 | + if(WIN32) | |
64 | + # Find user and system name | |
65 | + set(SYSTEM_NAME $ENV{USERDOMAIN}) | |
66 | + set(USER_NAME $ENV{USERNAME}) | |
67 | + set(VCPROJ_TYPE vcproj) | |
68 | + set(USERFILE_EXTENSION ${SYSTEM_NAME}.${USER_NAME}.user) | |
69 | + set(LAUNCHER_LINESEP "
") | |
70 | + if(MSVC90) | |
71 | + set(USERFILE_VC_VERSION 9.00) | |
72 | + elseif(MSVC80) | |
73 | + set(USERFILE_VC_VERSION 8.00) | |
74 | + elseif(MSVC71) | |
75 | + set(USERFILE_VC_VERSION 7.10) | |
76 | + elseif(MSVC10 OR (MSVC AND MSVC_VERSION GREATER 1600)) # 2010 or newer | |
77 | + set(LAUNCHER_LINESEP "\n") | |
78 | + set(USERFILE_VC_VERSION 10.00) | |
79 | + set(USERFILE_EXTENSION user) | |
80 | + set(VCPROJ_TYPE vcxproj) | |
81 | + endif() | |
82 | + if(BITS EQUAL 64) | |
83 | + set(USERFILE_PLATFORM x64) | |
84 | + else() | |
85 | + set(USERFILE_PLATFORM Win${BITS}) | |
86 | + endif() | |
87 | + set(_pathdelim ";") | |
88 | + set(_suffix "cmd") | |
89 | + else() | |
90 | + set(_pathdelim ":") | |
91 | + set(USERFILE_PLATFORM ${CMAKE_SYSTEM_NAME}${BITS}) | |
92 | + set(_suffix "sh") | |
93 | + find_package(GDB QUIET) | |
94 | + if(GDB_FOUND) | |
95 | + set(LAUNCHERS_GOT_GDB YES) | |
96 | + if(GDB_HAS_RETURN_CHILD_RESULT) | |
97 | + set(LAUNCHERS_GDB_ARG --return-child-result) | |
98 | + endif() | |
99 | + else() | |
100 | + set(LAUNCHERS_GOT_GDB) | |
101 | + endif() | |
102 | + endif() | |
103 | + | |
104 | + if(WIN32 AND NOT USERFILE_REMOTE_MACHINE) | |
105 | + site_name(USERFILE_REMOTE_MACHINE) | |
106 | + mark_as_advanced(USERFILE_REMOTE_MACHINE) | |
107 | + endif() | |
108 | +endmacro() | |
109 | + | |
110 | +macro(_launcher_process_args) | |
111 | + set(_nowhere) | |
112 | + set(_curdest _nowhere) | |
113 | + set(_val_args | |
114 | + ARGS | |
115 | + RUNTIME_LIBRARY_DIRS | |
116 | + WORKING_DIRECTORY | |
117 | + ENVIRONMENT) | |
118 | + set(_bool_args FORWARD_ARGS) | |
119 | + foreach(_arg ${_val_args} ${_bool_args}) | |
120 | + set(${_arg}) | |
121 | + endforeach() | |
122 | + foreach(_element ${ARGN}) | |
123 | + list(FIND _val_args "${_element}" _val_arg_find) | |
124 | + list(FIND _bool_args "${_element}" _bool_arg_find) | |
125 | + if("${_val_arg_find}" GREATER "-1") | |
126 | + set(_curdest "${_element}") | |
127 | + elseif("${_bool_arg_find}" GREATER "-1") | |
128 | + set("${_element}" ON) | |
129 | + set(_curdest _nowhere) | |
130 | + else() | |
131 | + list(APPEND ${_curdest} "${_element}") | |
132 | + endif() | |
133 | + endforeach() | |
134 | + | |
135 | + if(_nowhere) | |
136 | + message(FATAL_ERROR | |
137 | + "Syntax error in use of a function in CreateLaunchers!") | |
138 | + endif() | |
139 | + | |
140 | + # Turn into a list of native paths | |
141 | + set(_runtime_lib_dirs) | |
142 | + foreach(_dlldir ${RUNTIME_LIBRARY_DIRS}) | |
143 | + file(TO_NATIVE_PATH "${_dlldir}" _path) | |
144 | + set(_runtime_lib_dirs "${_runtime_lib_dirs}${_path}${_pathdelim}") | |
145 | + endforeach() | |
146 | + | |
147 | + if(NOT WORKING_DIRECTORY) | |
148 | + set(WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") | |
149 | + endif() | |
150 | + | |
151 | + if(FORWARD_ARGS) | |
152 | + if(WIN32) | |
153 | + set(FWD_ARGS %*) | |
154 | + else() | |
155 | + set(FWD_ARGS $*) | |
156 | + endif() | |
157 | + else() | |
158 | + set(FWD_ARGS) | |
159 | + endif() | |
160 | + | |
161 | + set(USERFILE_WORKING_DIRECTORY "${WORKING_DIRECTORY}") | |
162 | + set(USERFILE_COMMAND_ARGUMENTS "${ARGS}") | |
163 | + set(LAUNCHERSCRIPT_COMMAND_ARGUMENTS "${ARGS} ${FWD_ARGS}") | |
164 | + | |
165 | + if(WIN32) | |
166 | + set(RUNTIME_LIBRARIES_ENVIRONMENT "PATH=${_runtime_lib_dirs};%PATH%") | |
167 | + file(READ | |
168 | + "${_launchermoddir}/launcher.env.cmd.in" | |
169 | + _cmdenv) | |
170 | + else() | |
171 | + if(APPLE) | |
172 | + set(RUNTIME_LIBRARIES_ENVIRONMENT | |
173 | + "DYLD_LIBRARY_PATH=${_runtime_lib_dirs}:$DYLD_LIBRARY_PATH") | |
174 | + else() | |
175 | + set(RUNTIME_LIBRARIES_ENVIRONMENT | |
176 | + "LD_LIBRARY_PATH=${_runtime_lib_dirs}:$LD_LIBRARY_PATH") | |
177 | + endif() | |
178 | + file(READ | |
179 | + "${_launchermoddir}/launcher.env.sh.in" | |
180 | + _cmdenv) | |
181 | + endif() | |
182 | + set(USERFILE_ENVIRONMENT "${RUNTIME_LIBRARIES_ENVIRONMENT}") | |
183 | + | |
184 | + set(USERFILE_ENV_COMMANDS) | |
185 | + foreach(_arg "${RUNTIME_LIBRARIES_ENVIRONMENT}" ${ENVIRONMENT}) | |
186 | + string(CONFIGURE | |
187 | + "@USERFILE_ENVIRONMENT@@LAUNCHER_LINESEP@@_arg@" | |
188 | + USERFILE_ENVIRONMENT | |
189 | + @ONLY) | |
190 | + string(CONFIGURE | |
191 | + "@USERFILE_ENV_COMMANDS@${_cmdenv}" | |
192 | + USERFILE_ENV_COMMANDS | |
193 | + @ONLY) | |
194 | + endforeach() | |
195 | +endmacro() | |
196 | + | |
197 | +macro(_launcher_produce_vcproj_user) | |
198 | + if(MSVC) | |
199 | + file(READ | |
200 | + "${_launchermoddir}/perconfig.${VCPROJ_TYPE}.user.in" | |
201 | + _perconfig) | |
202 | + set(USERFILE_CONFIGSECTIONS) | |
203 | + foreach(USERFILE_CONFIGNAME ${CMAKE_CONFIGURATION_TYPES}) | |
204 | + get_target_property(USERFILE_${USERFILE_CONFIGNAME}_COMMAND | |
205 | + ${_targetname} | |
206 | + LOCATION_${USERFILE_CONFIGNAME}) | |
207 | + file(TO_NATIVE_PATH | |
208 | + "${USERFILE_${USERFILE_CONFIGNAME}_COMMAND}" | |
209 | + USERFILE_${USERFILE_CONFIGNAME}_COMMAND) | |
210 | + string(CONFIGURE "${_perconfig}" _temp @ONLY ESCAPE_QUOTES) | |
211 | + string(CONFIGURE | |
212 | + "${USERFILE_CONFIGSECTIONS}${_temp}" | |
213 | + USERFILE_CONFIGSECTIONS | |
214 | + ESCAPE_QUOTES) | |
215 | + endforeach() | |
216 | + | |
217 | + | |
218 | + configure_file("${_launchermoddir}/${VCPROJ_TYPE}.user.in" | |
219 | + ${VCPROJNAME}.${VCPROJ_TYPE}.${USERFILE_EXTENSION} | |
220 | + @ONLY) | |
221 | + endif() | |
222 | + | |
223 | +endmacro() | |
224 | + | |
225 | +macro(_launcher_configure_executable _src _tmp _target) | |
226 | +# get_filename_component(_targetname "${_target}" NAME) | |
227 | + get_filename_component(_targetpath "${_target}" PATH) | |
228 | + configure_file("${_src}" | |
229 | + "${_tmp}" | |
230 | + @ONLY) | |
231 | + file(COPY "${_tmp}" | |
232 | + DESTINATION "${_targetpath}" | |
233 | + FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) | |
234 | +endmacro() | |
235 | + | |
236 | +macro(_launcher_create_target_launcher) | |
237 | + if(CMAKE_CONFIGURATION_TYPES) | |
238 | + # Multi-config generator - multiple launchers | |
239 | + foreach(_config ${CMAKE_CONFIGURATION_TYPES}) | |
240 | + get_target_property(USERFILE_${_config}_COMMAND | |
241 | + ${_targetname} | |
242 | + LOCATION_${_config}) | |
243 | + file(TO_NATIVE_PATH | |
244 | + "${USERFILE_${_config}_COMMAND}" | |
245 | + USERFILE_COMMAND) | |
246 | + set(_fn "launch-${_targetname}-${_config}.${_suffix}") | |
247 | + _launcher_configure_executable("${_launchermoddir}/targetlauncher.${_suffix}.in" | |
248 | + "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${_fn}" | |
249 | + "${CMAKE_CURRENT_BINARY_DIR}/${_fn}") | |
250 | + endforeach() | |
251 | + else() | |
252 | + # Single-config generator - single launcher | |
253 | + get_target_property(USERFILE_COMMAND | |
254 | + ${_targetname} | |
255 | + LOCATION) | |
256 | + file(TO_NATIVE_PATH | |
257 | + "${USERFILE_COMMAND}" | |
258 | + USERFILE_COMMAND) | |
259 | + _launcher_configure_executable("${_launchermoddir}/targetlauncher.${_suffix}.in" | |
260 | + "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/launch-${_targetname}.${_suffix}" | |
261 | + "${CMAKE_CURRENT_BINARY_DIR}/launch-${_targetname}.${_suffix}" | |
262 | + @ONLY) | |
263 | + endif() | |
264 | +endmacro() | |
265 | + | |
266 | +function(create_default_target_launcher _targetname) | |
267 | + _launcher_system_settings() | |
268 | + _launcher_process_args(${ARGN}) | |
269 | + | |
270 | + set(VCPROJNAME "${CMAKE_BINARY_DIR}/ALL_BUILD") | |
271 | + _launcher_produce_vcproj_user() | |
272 | + | |
273 | + _launcher_create_target_launcher() | |
274 | +endfunction() | |
275 | + | |
276 | +function(create_target_launcher _targetname) | |
277 | + _launcher_system_settings() | |
278 | + _launcher_process_args(${ARGN}) | |
279 | + | |
280 | + set(VCPROJNAME "${CMAKE_CURRENT_BINARY_DIR}/${_targetname}") | |
281 | + _launcher_produce_vcproj_user() | |
282 | + | |
283 | + _launcher_create_target_launcher() | |
284 | +endfunction() | |
285 | + | |
286 | +function(create_generic_launcher _launchername) | |
287 | + _launcher_system_settings() | |
288 | + _launcher_process_args(${ARGN}) | |
289 | + | |
290 | + if(NOT IS_ABSOLUTE _launchername) | |
291 | + set(_launchername | |
292 | + "${CMAKE_CURRENT_BINARY_DIR}/${_launchername}.${_suffix}") | |
293 | + else() | |
294 | + set(_launchername "${_launchername}.${_suffix}") | |
295 | + endif() | |
296 | + if(WIN32) | |
297 | + set(GENERIC_LAUNCHER_COMMAND "${_launchername}" PARENT_SCOPE) | |
298 | + set(GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION) | |
299 | + else() | |
300 | + set(GENERIC_LAUNCHER_COMMAND sh "${_launchername}" PARENT_SCOPE) | |
301 | + set(GENERIC_LAUNCHER_FAIL_REGULAR_EXPRESSION | |
302 | + "Program terminated with signal") | |
303 | + endif() | |
304 | + | |
305 | + _launcher_configure_executable("${_launchermoddir}/genericlauncher.${_suffix}.in" | |
306 | + "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/genericlauncher.${_suffix}.in" | |
307 | + "${_launchername}") | |
308 | +endfunction() | |
309 | + | |
310 | +function(guess_runtime_library_dirs _var) | |
311 | + # Start off with the link directories of the calling listfile's directory | |
312 | + get_directory_property(_libdirs LINK_DIRECTORIES) | |
313 | + | |
314 | + # Add additional libraries passed to the function | |
315 | + foreach(_lib ${ARGN}) | |
316 | + get_filename_component(_libdir "${_lib}" PATH) | |
317 | + list(APPEND _libdirs "${_libdir}") | |
318 | + endforeach() | |
319 | + | |
320 | + # Now, build a list of potential dll directories | |
321 | + set(_dlldirs) | |
322 | + foreach(_libdir ${_libdirs}) | |
323 | + # Add the libdir itself | |
324 | + list(APPEND _dlldirs "${_libdir}") | |
325 | + | |
326 | + # Look also in libdir/../bin since the dll might not be with the lib | |
327 | + get_filename_component(_libdir "${_libdir}/../bin" ABSOLUTE) | |
328 | + list(APPEND _dlldirs "${_libdir}") | |
329 | + endforeach() | |
330 | + | |
331 | + # Only keep the valid, unique directories | |
332 | + clean_directory_list(_dlldirs) | |
333 | + | |
334 | + # Return _dlldirs | |
335 | + set(${_var} "${_dlldirs}" PARENT_SCOPE) | |
336 | +endfunction() |
@@ -0,0 +1,14 @@ | ||
1 | +cd @USERFILE_WORKING_DIRECTORY@ | |
2 | +@USERFILE_ENV_COMMANDS@ | |
3 | + | |
4 | +IF NOT [x%1]==[x--debugger] GOTO SkipDebuggingMess | |
5 | + | |
6 | +ECHO Need to ditch the debugger! | |
7 | +SHIFT /1 | |
8 | +%1 %2 %3 %4 %5 %6 %7 %8 %9 | |
9 | +GOTO EOF | |
10 | + | |
11 | +:SkipDebuggingMess | |
12 | +%* | |
13 | + | |
14 | +:EOF | |
\ No newline at end of file |
@@ -0,0 +1,1 @@ | ||
1 | +set @_arg@ |
@@ -0,0 +1,28 @@ | ||
1 | + <Configuration | |
2 | + Name="@USERFILE_CONFIGNAME@|@USERFILE_PLATFORM@" | |
3 | + > | |
4 | + <DebugSettings | |
5 | + Command="${USERFILE_@USERFILE_CONFIGNAME@_COMMAND}" | |
6 | + WorkingDirectory="@USERFILE_WORKING_DIRECTORY@" | |
7 | + CommandArguments="@USERFILE_COMMAND_ARGUMENTS@" | |
8 | + Attach="false" | |
9 | + DebuggerType="3" | |
10 | + Remote="1" | |
11 | + RemoteMachine="@USERFILE_REMOTE_MACHINE@" | |
12 | + RemoteCommand="" | |
13 | + HttpUrl="" | |
14 | + PDBPath="" | |
15 | + SQLDebugging="" | |
16 | + Environment="@USERFILE_ENVIRONMENT@" | |
17 | + EnvironmentMerge="true" | |
18 | + DebuggerFlavor="" | |
19 | + MPIRunCommand="" | |
20 | + MPIRunArguments="" | |
21 | + MPIRunWorkingDirectory="" | |
22 | + ApplicationCommand="" | |
23 | + ApplicationArguments="" | |
24 | + ShimCommand="" | |
25 | + MPIAcceptMode="" | |
26 | + MPIAcceptFilter="" | |
27 | + /> | |
28 | + </Configuration> |
@@ -0,0 +1,7 @@ | ||
1 | + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='@USERFILE_CONFIGNAME@|@USERFILE_PLATFORM@'"> | |
2 | + <LocalDebuggerEnvironment>@USERFILE_ENVIRONMENT@</LocalDebuggerEnvironment> | |
3 | + <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> | |
4 | + <LocalDebuggerCommand>${USERFILE_@USERFILE_CONFIGNAME@_COMMAND}</LocalDebuggerCommand> | |
5 | + <LocalDebuggerCommandArguments>@USERFILE_COMMAND_ARGUMENTS@</LocalDebuggerCommandArguments> | |
6 | + <LocalDebuggerWorkingDirectory>@USERFILE_WORKING_DIRECTORY@</LocalDebuggerWorkingDirectory> | |
7 | + </PropertyGroup> |
@@ -0,0 +1,8 @@ | ||
1 | +cd @USERFILE_WORKING_DIRECTORY@ | |
2 | +@USERFILE_ENV_COMMANDS@ | |
3 | +if [%1]==[--debugger] ( | |
4 | + SHIFT | |
5 | +) | |
6 | + | |
7 | +"@USERFILE_COMMAND@" @LAUNCHERSCRIPT_COMMAND_ARGUMENTS@ | |
8 | +pause |
@@ -0,0 +1,10 @@ | ||
1 | +<?xml version="1.0" encoding="Windows-1252"?> | |
2 | +<VisualStudioUserFile | |
3 | + ProjectType="Visual C++" | |
4 | + Version="@USERFILE_VC_VERSION@" | |
5 | + ShowAllFiles="false" | |
6 | + > | |
7 | + <Configurations> | |
8 | +@USERFILE_CONFIGSECTIONS@ | |
9 | + </Configurations> | |
10 | +</VisualStudioUserFile> |
@@ -0,0 +1,4 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
3 | +@USERFILE_CONFIGSECTIONS@ | |
4 | +</Project> |
@@ -24,7 +24,7 @@ | ||
24 | 24 | endif( APPLE ) |
25 | 25 | endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) |
26 | 26 | |
27 | -option( DYN_FLUIDSYNTH "Dynamically load fluidsynth" ) | |
27 | +option( DYN_FLUIDSYNTH "Dynamically load fluidsynth" ON ) | |
28 | 28 | |
29 | 29 | if( CMAKE_SIZEOF_VOID_P MATCHES "8" ) |
30 | 30 | set( X64 64 ) |
@@ -1087,10 +1087,32 @@ | ||
1087 | 1087 | |
1088 | 1088 | add_dependencies( zdoom revision_check ) |
1089 | 1089 | |
1090 | -# RUNTIME_OUTPUT_DIRECTORY does not exist in CMake 2.4. | |
1091 | -# Linux distributions are slow to adopt 2.6. :( | |
1092 | -set_target_properties( zdoom PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ZDOOM_OUTPUT_DIR} ) | |
1093 | -set_target_properties( zdoom PROPERTIES OUTPUT_NAME ${ZDOOM_EXE_NAME} ) | |
1090 | +if( MSVC ) | |
1091 | + set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO") | |
1092 | + add_custom_command(TARGET zdoom POST_BUILD | |
1093 | + COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\win32\\zdoom.exe.manifest\" -outputresource:\"$(TargetDir)$(TargetFileName)\"\;\#2 | |
1094 | + COMMENT "Adding manifest..." | |
1095 | + ) | |
1096 | + | |
1097 | + create_default_target_launcher( zdoom WORKING_DIRECTORY ${ZDOOM_OUTPUT_DIR} ) | |
1098 | +endif( MSVC ) | |
1099 | + | |
1100 | +if( ZDOOM_OUTPUT_OLDSTYLE AND NOT NO_GENERATOR_EXPRESSION ) | |
1101 | + set_target_properties( zdoom PROPERTIES | |
1102 | + RUNTIME_OUTPUT_NAME ${ZDOOM_EXE_NAME} | |
1103 | + RUNTIME_OUTPUT_NAME_DEBUG ${ZDOOM_EXE_NAME}d | |
1104 | + RUNTIME_OUTPUT_NAME_MINSIZEREL ${ZDOOM_EXE_NAME}msr | |
1105 | + RUNTIME_OUTPUT_NAME_RELWITHDEBINFO ${ZDOOM_EXE_NAME}rd | |
1106 | + ) | |
1107 | + add_custom_command(TARGET zdoom POST_BUILD | |
1108 | + COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:zdoom> ${ZDOOM_OUTPUT_DIR}/$<TARGET_FILE_NAME:zdoom> | |
1109 | + COMMENT "Copying to output directory..." ) | |
1110 | +else( ZDOOM_OUTPUT_OLDSTYLE AND NOT NO_GENERATOR_EXPRESSION ) | |
1111 | + # RUNTIME_OUTPUT_DIRECTORY does not exist in CMake 2.4. | |
1112 | + # Linux distributions are slow to adopt 2.6. :( | |
1113 | + set_target_properties( zdoom PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ZDOOM_OUTPUT_DIR} ) | |
1114 | + set_target_properties( zdoom PROPERTIES OUTPUT_NAME ${ZDOOM_EXE_NAME} ) | |
1115 | +endif( ZDOOM_OUTPUT_OLDSTYLE AND NOT NO_GENERATOR_EXPRESSION ) | |
1094 | 1116 | |
1095 | 1117 | if( NOT WIN32 ) |
1096 | 1118 | FILE( WRITE ${CMAKE_CURRENT_BINARY_DIR}/link-make "if [ ! -e ${ZDOOM_OUTPUT_DIR}/${ZDOOM_EXE_NAME} ]; then ln -sf ${CMAKE_CURRENT_BINARY_DIR}/${ZDOOM_EXE_NAME} ${ZDOOM_OUTPUT_DIR}/${ZDOOM_EXE_NAME}; fi" ) |
@@ -1108,14 +1130,6 @@ | ||
1108 | 1130 | endif( SSE_MATTERS ) |
1109 | 1131 | endif( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) |
1110 | 1132 | |
1111 | -if( MSVC ) | |
1112 | - set_target_properties(zdoom PROPERTIES LINK_FLAGS "/MANIFEST:NO") | |
1113 | - add_custom_command(TARGET zdoom POST_BUILD | |
1114 | - COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\win32\\zdoom.exe.manifest\" -outputresource:\"$(TargetDir)$(TargetFileName)\"\;\#2 | |
1115 | - COMMENT "Adding manifest..." | |
1116 | - ) | |
1117 | -endif( MSVC ) | |
1118 | - | |
1119 | 1133 | source_group("Assembly Files\\ia32" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/asm_ia32/.+") |
1120 | 1134 | source_group("Assembly Files\\x86_64" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/asm_x86_64/.+") |
1121 | 1135 | source_group("Audio Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sound/.+") |