diff options
author | David Robillard <d@drobilla.net> | 2022-08-18 03:23:56 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-18 03:23:56 -0400 |
commit | 59015f84ae9e0816c45e9b1aaa827a61395aa1a1 (patch) | |
tree | 23920d07efe651b9ffc0c494daf1397533155e7f | |
parent | d8e1c0a515d4bb5818c7e6185d75a96f285d253d (diff) | |
download | patchage-59015f84ae9e0816c45e9b1aaa827a61395aa1a1.tar.gz patchage-59015f84ae9e0816c45e9b1aaa827a61395aa1a1.tar.bz2 patchage-59015f84ae9e0816c45e9b1aaa827a61395aa1a1.zip |
Fix fallback configuration on MacOS
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | src/UIFile.hpp | 4 | ||||
-rw-r--r-- | src/patchage_config.h | 8 |
3 files changed, 11 insertions, 3 deletions
diff --git a/meson.build b/meson.build index 0ea228a..20642d8 100644 --- a/meson.build +++ b/meson.build @@ -59,7 +59,7 @@ int main(void) { return !!&jack_set_property; }''' if cpp.compiles(dladdr_code, args: platform_defines, name: 'dladdr') platform_defines += [ '-DHAVE_DLADDR=1', - '-DPATCHAGE_BINLOC=1', + '-DPATCHAGE_BUNDLED=1', ] else platform_defines += ['-DHAVE_DLADDR=0'] diff --git a/src/UIFile.hpp b/src/UIFile.hpp index 6eb9d9c..6fc4b94 100644 --- a/src/UIFile.hpp +++ b/src/UIFile.hpp @@ -6,7 +6,7 @@ #include "patchage_config.h" -#ifdef PATCHAGE_BINLOC +#if PATCHAGE_BUNDLED # include "binary_location.h" #endif @@ -37,7 +37,7 @@ public: std::cout << "Base name: " << base_name << std::endl; std::string ui_filename = base_name + ".ui"; -#ifdef PATCHAGE_BINLOC +#if PATCHAGE_BUNDLED const std::string bundle = bundle_location(); if (!bundle.empty()) { const std::string bundle_ui_filename = bundle + "/" + ui_filename; diff --git a/src/patchage_config.h b/src/patchage_config.h index e0d0ff0..1797539 100644 --- a/src/patchage_config.h +++ b/src/patchage_config.h @@ -85,4 +85,12 @@ # define PATCHAGE_USE_LIGHT_THEME 0 #endif +#ifndef PATCHAGE_BUNDLED +# ifdef __APPLE__ +# define PATCHAGE_BUNDLED 1 +# else +# define PATCHAGE_BUNDLED 0 +# endif +#endif + #endif // PATCHAGE_CONFIG_H |