diff options
| author | Mart Jansink <mart@gofilex.nl> | 2021-04-26 11:50:25 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-04-30 22:29:09 +0200 |
| commit | 877fb5cf558174fcb4ad24e304a32e17cf6ecf7e (patch) | |
| tree | 335fe06165b34fcb2aa55d61d86f695deffed502 /src | |
| parent | a6a6788f870d554c86e9c635c05540f1150b5e0f (diff) | |
Prefer the tags directory specified in LIBDCP_RESOURCES
Diffstat (limited to 'src')
| -rw-r--r-- | src/util.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/util.cc b/src/util.cc index 0b011bf9..5133a43b 100644 --- a/src/util.cc +++ b/src/util.cc @@ -453,16 +453,17 @@ boost::filesystem::path dcp::directory_containing_executable () boost::filesystem::path dcp::resources_directory () { -#if defined(LIBDCP_OSX) - return directory_containing_executable().parent_path() / "Resources"; -#elif defined(LIBDCP_WINDOWS) - return directory_containing_executable().parent_path(); -#else /* We need a way to specify the tags directory for running un-installed binaries */ char* prefix = getenv("LIBDCP_RESOURCES"); if (prefix) { return prefix; } + +#if defined(LIBDCP_OSX) + return directory_containing_executable().parent_path() / "Resources"; +#elif defined(LIBDCP_WINDOWS) + return directory_containing_executable().parent_path(); +#else return directory_containing_executable().parent_path() / "share" / "libdcp"; #endif } |
