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 edeff3563c
commit d3d55f8719
31 changed files with 279 additions and 70 deletions

View File

@@ -1,5 +1,12 @@
#--- musrWiz for Qt > 5.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 Qt5::Core Qt5::Widgets Qt5::Svg Qt5::Xml)
set(musrWiz_src
@@ -51,6 +58,11 @@ target_include_directories(musrWiz
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
)
target_compile_options(musrWiz
PRIVATE
"${HAVE_GIT_REV_H}"
)
target_link_libraries(musrWiz ${qt_libs})
#--- installation info --------------------------------------------------------