Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/snap
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2018-04-06 04:15:19 +0300
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2018-04-06 04:20:38 +0300
commite11711d71e540ba2bf919aaf6abc1aecc5233f34 (patch)
treee44f681653d758b5371b94702e7ab047af78f45e /snap
parenta7eb75d56c2585872a37010aa2d3cb193fc80e38 (diff)
snap: use proper snap dir when inside snapcraft
Diffstat (limited to 'snap')
-rw-r--r--snap/CMakeLists.txt14
1 files changed, 8 insertions, 6 deletions
diff --git a/snap/CMakeLists.txt b/snap/CMakeLists.txt
index dfefff2f9..b0a21848d 100644
--- a/snap/CMakeLists.txt
+++ b/snap/CMakeLists.txt
@@ -37,7 +37,14 @@ if(NOT ${GIT_REVISION} STREQUAL ${REMMINA_VERSION_SUFFIX} AND
set(SNAP_VERSION ${SNAP_VERSION}+git${GIT_REVISION})
endif()
-set(SNAP_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+if(DEFINED ENV{SNAPCRAFT_PROJECT_NAME})
+ # We're building in snapcraft so, the source dir will be
+ # parts/remmina/src
+ set(SNAP_DIR ${CMAKE_SOURCE_DIR}/../../../snap)
+else()
+ set(SNAP_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+endif()
+
set(SNAP_GUI_DIR ${SNAP_DIR}/gui)
file(MAKE_DIRECTORY ${SNAP_GUI_DIR})
@@ -47,11 +54,6 @@ file(RELATIVE_PATH CMAKE_SOURCE_DIR_RELATIVE ${SNAP_DIR}
configure_file(${SNAP_DIR}/SNAP_VERSION.in
${SNAP_DIR}/SNAP_VERSION @ONLY)
-set(REMMINA_BINARY_PATH "remmina")
-set(REMMINA_ICON "\${SNAP}/meta/gui/icon.svg")
-configure_file(${CMAKE_SOURCE_DIR}/remmina/desktop/remmina.desktop.in
- ${SNAP_GUI_DIR}/${UNIQUE_APPNAME}.desktop @ONLY)
-
configure_file(${CMAKE_SOURCE_DIR}/LICENSE
${SNAP_GUI_DIR}/license.txt COPYONLY)