make sure that git repo info is only added if the musrfit project source is indeed a git repo, and not e.g. a download.

This commit is contained in:
2021-07-12 15:34:07 +02:00
parent f41c633bfe
commit daa2ea1347
31 changed files with 279 additions and 70 deletions

View File

@@ -1,5 +1,12 @@
#--- musredit for Qt > 6.0 ----------------------------------------------------
#--- check if project source is repo ------------------------------------------
if (IS_GIT_REPO)
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
else (IS_GIT_REPO)
set(HAVE_GIT_REV_H "")
endif (IS_GIT_REPO)
set(qt_libs Qt6::Core Qt6::Widgets Qt6::Network Qt6::Xml Qt6::Svg Qt6::PrintSupport)
set(musredit_src
@@ -115,6 +122,11 @@ target_include_directories(musredit
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
)
target_compile_options(musredit
PRIVATE
"${HAVE_GIT_REV_H}"
)
target_link_libraries(musredit ${qt_libs})
#--- installation info --------------------------------------------------------