From 877fb5cf558174fcb4ad24e304a32e17cf6ecf7e Mon Sep 17 00:00:00 2001 From: Mart Jansink Date: Mon, 26 Apr 2021 11:50:25 +0200 Subject: Prefer the tags directory specified in LIBDCP_RESOURCES --- src/util.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') 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 } -- cgit v1.2.3