summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-07 14:34:32 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-07 14:34:32 +0200
commit70fd111b6a0a10478c179187b7bb6dfaae1da4d8 (patch)
tree2b9a4cbf69440212392fc547d98c1bb3ca7b192f /CMakeLists.txt
parentf7b449ce404767ed99e384eb50521e0402a6ed2a (diff)
Added build option to always do relative resource lookup
This is to facilitate AppImage packaging for Linux.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files 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)
29option (ENABLE_X11_SWRENDER "Use software rendering under X11" OFF) 29option (ENABLE_X11_SWRENDER "Use software rendering under X11" OFF)
30option (ENABLE_KERNING "Enable kerning in font renderer (slower)" ON) 30option (ENABLE_KERNING "Enable kerning in font renderer (slower)" ON)
31option (ENABLE_RESOURCE_EMBED "Embed resources inside the executable" OFF) 31option (ENABLE_RESOURCE_EMBED "Embed resources inside the executable" OFF)
32option (ENABLE_RELATIVE_EMBED "Resources should always be found via relative path" OFF)
32option (ENABLE_WINDOWPOS_FIX "Set position after showing window (workaround for SDL bug)" OFF) 33option (ENABLE_WINDOWPOS_FIX "Set position after showing window (workaround for SDL bug)" OFF)
33option (ENABLE_IDLE_SLEEP "While idle, sleep in the main thread instead of waiting for events" ON) 34option (ENABLE_IDLE_SLEEP "While idle, sleep in the main thread instead of waiting for events" ON)
34option (ENABLE_DOWNLOAD_EDIT "Allow changing the Downloads directory" ON) 35option (ENABLE_DOWNLOAD_EDIT "Allow changing the Downloads directory" ON)
@@ -303,8 +304,10 @@ MimeType=x-scheme-handler/gemini;x-scheme-handler/gopher
303 DESTINATION share/metainfo 304 DESTINATION share/metainfo
304 ) 305 )
305 if (NOT ENABLE_RESOURCE_EMBED) 306 if (NOT ENABLE_RESOURCE_EMBED)
306 target_compile_definitions (app PUBLIC 307 if (NOT ENABLE_RELATIVE_EMBED)
307 LAGRANGE_EMB_BIN="${CMAKE_INSTALL_PREFIX}/share/lagrange/resources.lgr") 308 target_compile_definitions (app PUBLIC
309 LAGRANGE_EMB_BIN="${CMAKE_INSTALL_PREFIX}/share/lagrange/resources.lgr")
310 endif ()
308 install (FILES ${EMB_BIN} DESTINATION share/lagrange) 311 install (FILES ${EMB_BIN} DESTINATION share/lagrange)
309 endif () 312 endif ()
310endif () 313endif ()