Skip to content

Commit e11711d

Browse files
committed
snap: use proper snap dir when inside snapcraft
1 parent a7eb75d commit e11711d

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

snap/CMakeLists.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,14 @@ if(NOT ${GIT_REVISION} STREQUAL ${REMMINA_VERSION_SUFFIX} AND
3737
set(SNAP_VERSION ${SNAP_VERSION}+git${GIT_REVISION})
3838
endif()
3939

40-
set(SNAP_DIR ${CMAKE_CURRENT_SOURCE_DIR})
40+
if(DEFINED ENV{SNAPCRAFT_PROJECT_NAME})
41+
# We're building in snapcraft so, the source dir will be
42+
# parts/remmina/src
43+
set(SNAP_DIR ${CMAKE_SOURCE_DIR}/../../../snap)
44+
else()
45+
set(SNAP_DIR ${CMAKE_CURRENT_SOURCE_DIR})
46+
endif()
47+
4148
set(SNAP_GUI_DIR ${SNAP_DIR}/gui)
4249

4350
file(MAKE_DIRECTORY ${SNAP_GUI_DIR})
@@ -47,11 +54,6 @@ file(RELATIVE_PATH CMAKE_SOURCE_DIR_RELATIVE ${SNAP_DIR}
4754
configure_file(${SNAP_DIR}/SNAP_VERSION.in
4855
${SNAP_DIR}/SNAP_VERSION @ONLY)
4956

50-
set(REMMINA_BINARY_PATH "remmina")
51-
set(REMMINA_ICON "\${SNAP}/meta/gui/icon.svg")
52-
configure_file(${CMAKE_SOURCE_DIR}/remmina/desktop/remmina.desktop.in
53-
${SNAP_GUI_DIR}/${UNIQUE_APPNAME}.desktop @ONLY)
54-
5557
configure_file(${CMAKE_SOURCE_DIR}/LICENSE
5658
${SNAP_GUI_DIR}/license.txt COPYONLY)
5759

0 commit comments

Comments
 (0)