From e25899fec3aeeeea8645f7c373bac081f09e8330 Mon Sep 17 00:00:00 2001 From: Pat Viafore Date: Thu, 11 Jan 2024 17:21:35 -0600 Subject: [PATCH] Restore Snap Support pt 4. Update CMAKE file to use correct variable expansion. --- snapcraft.yaml | 5 +++-- src/snap/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index dd55df8c..ef58b0f3 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -38,9 +38,10 @@ parts: source-branch: master cmake-parameters: - $SNAPCRAFT_PART_SRC/src - override-pull: | - craftctl default + override-build: | cp $SNAPCRAFT_PART_SRC/src/snap/CMakeLists.txt $SNAPCRAFT_PART_SRC/src/CMakeLists.txt + craftctl default + build-packages: - build-essential - qt6-base-dev diff --git a/src/snap/CMakeLists.txt b/src/snap/CMakeLists.txt index 59bb39e9..f1222c3b 100644 --- a/src/snap/CMakeLists.txt +++ b/src/snap/CMakeLists.txt @@ -95,7 +95,7 @@ qt_add_executable(packetsender ${SOURCES} ${HEADERS} ${FORMS} ${RESOURCES} ${CSS} ) -execute_process(COMMAND git -C $SNAPCRAFT_PART_SRC/src rev-parse --short HEAD OUTPUT_VARIABLE GIT_SHA COMMAND_ERROR_IS_FATAL ANY OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND git -C ${PROJECT_SOURCE_DIR} rev-parse --short HEAD OUTPUT_VARIABLE GIT_SHA COMMAND_ERROR_IS_FATAL ANY OUTPUT_STRIP_TRAILING_WHITESPACE) target_compile_definitions(packetsender PRIVATE GUI_BUILD