Skip to content

Commit c6541a5

Browse files
committed
fix dart define (again)
1 parent 7db51e3 commit c6541a5

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

changelog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ This project loosely follows Keep a Changelog and uses Semantic Versioning.
77
---
88

99
## [Unreleased]
10-
11-
No Changes Yet.
10+
### Changed
11+
- Changes namespace `com.nokarin.FrameExtractor` -> `xyz.nokarin.FrameExtractor`
1212

1313
---
1414

linux/CMakeLists.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,22 @@ set(BINARY_NAME "FrameExtractor")
99
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
1010
set(APPLICATION_ID "xyz.nokarin.frameextractor")
1111

12-
# Get enviroment
13-
set(DART_DEFINES $ENV{DART_DEFINES})
12+
option(FLATPAK "Build for Flatpak" OFF)
13+
14+
if($ENV{FLATPAK} STREQUAL "true")
15+
set(FLATPAK ON)
16+
endif()
1417

1518
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
1619
# versions of CMake.
1720
cmake_policy(SET CMP0063 NEW)
1821

1922
# Load bundled libraries from the lib/ directory relative to the binary.
20-
if(DART_DEFINES MATCHES "FLATPAK=true")
23+
if(FLATPAK)
24+
message(STATUS "Using Flatpak-specific RPATH settings")
2125
set(CMAKE_INSTALL_RPATH "/app/lib")
2226
else()
27+
message(STATUS "Using default RPATH settings")
2328
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
2429
endif()
2530

@@ -95,8 +100,8 @@ install(CODE "
95100
file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
96101
" COMPONENT Runtime)
97102

98-
if(DART_DEFINES MATCHES "FLATPAK=true")
99-
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/${APPLICATION_ID}data")
103+
if(FLATPAK)
104+
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/${APPLICATION_ID}/data")
100105
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib/${APPLICATION_ID}")
101106
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/share/${APPLICATION_ID}"
102107
COMPONENT Runtime)

0 commit comments

Comments
 (0)