add first Qt6 version of musredit, mupp, etc.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# configure_mupp_version_file.cmake.in:
|
||||
set(SRC_DIR "@CMAKE_CURRENT_SOURCE_DIR@")
|
||||
set(BIN_DIR "@CMAKE_CURRENT_BINARY_DIR@")
|
||||
|
||||
# Set MUPP variables
|
||||
set(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
||||
set(MUPP_VERSION "@mupp_VERSION@")
|
||||
|
||||
# Get the current working branch
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# Get the latest abbreviated commit hash of the working branch
|
||||
execute_process(
|
||||
COMMAND git log -1 --pretty="%h, %ci"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
configure_file(
|
||||
${SRC_DIR}/cmake/mupp_version.h.in
|
||||
${BIN_DIR}/mupp_version.h
|
||||
@ONLY
|
||||
)
|
||||
# EOF
|
||||
11
src/musredit_qt6/mupp/cmake/mupp_version.h.in
Normal file
11
src/musredit_qt6/mupp/cmake/mupp_version.h.in
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef VERSION_H
|
||||
#define VERSION_H
|
||||
|
||||
#define MUPP_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
||||
#define MUPP_VERSION "@MUPP_VERSION@"
|
||||
|
||||
#define GIT_BRANCH "@GIT_BRANCH@"
|
||||
#define GIT_COMMIT_HASH @GIT_COMMIT_HASH@
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user