cmake: Add ZIP_SUFFIX option, for build configs.

Add a ZIP_SUFFIX option defaulting to "" that is added to the generated
.zip file with UPSTREAM_RELEASE before the .zip extension.

For example, for an experimental feature you could pass
-DZIP_SUFFIX=-timer_loop and the resulting .zip file would be
visualboyadvance-m-Win-64bit-timer_loop.zip or
visualboyadvance-m-Win-64bit-debug-timer_loop.zip for a debug build.

Also add a modeline to this cmake file because vim-sleuth always gets
the settings wrong. Or it could be the cmake filetype plugins.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2020-03-17 03:24:43 +00:00
parent abb8234174
commit 60f05cedc2
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 7 additions and 3 deletions

View File

@ -1017,6 +1017,8 @@ if(GPG_PROGRAM)
)
endif()
option(ZIP_SUFFIX [=[suffix for release zip files, e.g. "-somebranch".zip]=] "")
if(UPSTREAM_RELEASE AND WIN32)
set(home "$ENV{HOME}")
@ -1053,9 +1055,9 @@ if(UPSTREAM_RELEASE AND WIN32)
endif()
if(CMAKE_BUILD_TYPE MATCHES Debug)
set(exezip visualboyadvance-m-Win-${BITS}bit-debug.zip)
set(exezip visualboyadvance-m-Win-${BITS}bit-debug${ZIP_SUFFIX}.zip)
else()
set(exezip visualboyadvance-m-Win-${BITS}bit.zip)
set(exezip visualboyadvance-m-Win-${BITS}bit${ZIP_SUFFIX}.zip)
endif()
unset(pdb_file)
@ -1163,7 +1165,7 @@ if(UPSTREAM_RELEASE AND APPLE)
message(WARNING "Set the environment variable LOGIN_KEYCHAIN_PASSWORD to your login keychain password to codesign.")
endif()
set(appzip visualboyadvance-m-Mac-${BITS}bit.zip)
set(appzip visualboyadvance-m-Mac-${BITS}bit${ZIP_SUFFIX}.zip)
add_custom_command(
TARGET visualboyadvance-m
@ -1203,3 +1205,5 @@ install(
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
)
# vim:sw=4 tw=0