From 1433ef6edc9cbfb279b44d69c9f52e529f7f7f5c Mon Sep 17 00:00:00 2001 From: Mack Date: Mon, 21 Oct 2024 15:04:59 +0800 Subject: [PATCH] ENH:Add FLATPAK variable to skip installing FFmpeg GITHUB: #5008 Change-Id: Id4e9637f13580bda4c74197ca302c7f5f8ad5a25 --- CMakeLists.txt | 4 +++- src/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c4d9e1227..040317889 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,8 @@ set(SLIC3R_GTK "2" CACHE STRING "GTK version to use with wxWidgets on Linux") set(IS_CROSS_COMPILE FALSE) +set(FLATPAK FALSE CACHE BOOL "Not copy FFMPEG file") + if (APPLE) set(CMAKE_FIND_FRAMEWORK LAST) @@ -760,7 +762,7 @@ else () install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources") endif () -if (CMAKE_SYSTEM_NAME STREQUAL "Linux") +if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT FLATPAK) set(LIBRARY_FILES ${LIBDIR_BIN}/libavcodec.so.61 ${LIBDIR_BIN}/libavcodec.so.61.3.100 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c20a0dda3..bb2f2db2e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -218,7 +218,7 @@ if (WIN32) else () - if (NOT APPLE) + if (NOT APPLE AND NOT FLATPAK) set(output_sos_Release "") set(output_sos_Debug "") add_custom_target(BambuStudioSosCopy ALL DEPENDS BambuStudio)