From 70fd111b6a0a10478c179187b7bb6dfaae1da4d8 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 7 Feb 2021 14:34:32 +0200 Subject: Added build option to always do relative resource lookup This is to facilitate AppImage packaging for Linux. --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a0e0f8f..9ef96a28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ option (ENABLE_MPG123 "Use mpg123 for decoding MPEG audio" ON) option (ENABLE_X11_SWRENDER "Use software rendering under X11" OFF) option (ENABLE_KERNING "Enable kerning in font renderer (slower)" ON) option (ENABLE_RESOURCE_EMBED "Embed resources inside the executable" OFF) +option (ENABLE_RELATIVE_EMBED "Resources should always be found via relative path" OFF) option (ENABLE_WINDOWPOS_FIX "Set position after showing window (workaround for SDL bug)" OFF) option (ENABLE_IDLE_SLEEP "While idle, sleep in the main thread instead of waiting for events" ON) option (ENABLE_DOWNLOAD_EDIT "Allow changing the Downloads directory" ON) @@ -303,8 +304,10 @@ MimeType=x-scheme-handler/gemini;x-scheme-handler/gopher DESTINATION share/metainfo ) if (NOT ENABLE_RESOURCE_EMBED) - target_compile_definitions (app PUBLIC - LAGRANGE_EMB_BIN="${CMAKE_INSTALL_PREFIX}/share/lagrange/resources.lgr") + if (NOT ENABLE_RELATIVE_EMBED) + target_compile_definitions (app PUBLIC + LAGRANGE_EMB_BIN="${CMAKE_INSTALL_PREFIX}/share/lagrange/resources.lgr") + endif () install (FILES ${EMB_BIN} DESTINATION share/lagrange) endif () endif () -- cgit v1.2.3