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:
@@ -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 --------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user