From a00870aa9b93bd31b0e79b14dea72e2c680bc7e5 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Wed, 15 Jan 2020 16:39:22 -0500 Subject: [PATCH] Set snapcraft.yaml version from cmake. (#101) --- CMakeLists.txt | 3 +++ snap/{snapcraft.yaml => snapcraft.yaml.in} | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) rename snap/{snapcraft.yaml => snapcraft.yaml.in} (98%) diff --git a/CMakeLists.txt b/CMakeLists.txt index f02cbf51..b2f51cd0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,9 @@ ADD_DEFINITIONS(-DPROJECT_PREFIX="${PROJECT_PREFIX}") ADD_DEFINITIONS(-DPROJECT_VERSION="${PROJECT_VERSION}") ADD_DEFINITIONS(-DPROJECT_NAME="${PROJECT_NAME}") +CONFIGURE_FILE(snap/snapcraft.yaml.in ${PROJECT_SOURCE_DIR}/snap/snapcraft.yaml) +message(STATUS "\"snap/snapcraft.yaml\" has been generated with version \"${PROJECT_VERSION}\". To create a snap, do \"snapcraft\" in find-object's root directory.") + ####### DEPENDENCIES ####### FIND_PACKAGE(OpenCV REQUIRED) # tested on 2.3.1 diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml.in similarity index 98% rename from snap/snapcraft.yaml rename to snap/snapcraft.yaml.in index 99b8cb3c..932ad263 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml.in @@ -1,6 +1,6 @@ name: find-object base: core18 -version: '0.6.2+git' +version: '@PROJECT_VERSION@+git' summary: Find-Object project, visit http://introlab.github.io/find-object/ description: | Features: