Add build flags to output of lmms --version (#7780)
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
ADD_SUBDIRECTORY(3rdparty)
|
||||
|
||||
CONFIGURE_FILE("lmmsconfig.h.in" "${CMAKE_BINARY_DIR}/lmmsconfig.h")
|
||||
|
||||
# Provide config flags to lmmsversion.h
|
||||
get_cmake_property(_define_vars VARIABLES)
|
||||
foreach (_define_var ${_define_vars})
|
||||
if(_define_var MATCHES "^WANT|LMMS_(HAVE|DEBUG)" )
|
||||
list(APPEND LMMS_BUILD_OPTIONS "${_define_var}='${${_define_var}}'")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Format for readibility
|
||||
string(REPLACE ";" " " LMMS_BUILD_OPTIONS "${LMMS_BUILD_OPTIONS}")
|
||||
|
||||
CONFIGURE_FILE("lmmsversion.h.in" "${CMAKE_BINARY_DIR}/lmmsversion.h")
|
||||
|
||||
SET(LMMS_SRCS "")
|
||||
|
||||
@@ -140,15 +140,16 @@ inline void loadTranslation( const QString & tname,
|
||||
|
||||
void printVersion( char *executableName )
|
||||
{
|
||||
printf( "LMMS %s\n(%s %s, Qt %s, %s)\n\n"
|
||||
printf("LMMS %s\n(%s %s, Qt %s, %s)\n\n"
|
||||
"Build options:\n%s\n\n"
|
||||
"Copyright (c) %s\n\n"
|
||||
"This program is free software; you can redistribute it and/or\n"
|
||||
"modify it under the terms of the GNU General Public\n"
|
||||
"License as published by the Free Software Foundation; either\n"
|
||||
"version 2 of the License, or (at your option) any later version.\n\n"
|
||||
"Try \"%s --help\" for more information.\n\n", LMMS_VERSION,
|
||||
LMMS_BUILDCONF_PLATFORM, LMMS_BUILDCONF_MACHINE, QT_VERSION_STR, LMMS_BUILDCONF_COMPILER_VERSION,
|
||||
LMMS_PROJECT_COPYRIGHT, executableName );
|
||||
LMMS_BUILDCONF_PLATFORM, LMMS_BUILDCONF_MACHINE, QT_VERSION_STR, LMMS_BUILDCONF_COMPILER_VERSION, LMMS_BUILD_OPTIONS,
|
||||
LMMS_PROJECT_COPYRIGHT, executableName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
#define LMMS_VERSION "@VERSION@"
|
||||
#define LMMS_PROJECT_COPYRIGHT "@PROJECT_COPYRIGHT@"
|
||||
#define LMMS_BUILD_OPTIONS "@LMMS_BUILD_OPTIONS@"
|
||||
|
||||
Reference in New Issue
Block a user