Skip to content

Commit

Permalink
libmxf: use cmake vars to set default platform name
Browse files Browse the repository at this point in the history
The platform name is used in the Identification::Platform property
value. This commit keeps the existing names for known platforms,
but uses the names provided by CMAKE if the platform is unknown.
  • Loading branch information
philipnbbc committed Jun 26, 2024
1 parent f61b837 commit fe76997
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions deps/libMXF/config.h.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* Default platform name */
#define LIBMXF_DEFAULT_PLATFORM_NAME "@CMAKE_SYSTEM_NAME@ @CMAKE_SYSTEM_PROCESSOR@"
#define LIBMXF_DEFAULT_PLATFORM_WNAME L"@CMAKE_SYSTEM_NAME@ @CMAKE_SYSTEM_PROCESSOR@"

/* library names */
#define LIBMXF_LIBRARY_NAME "@PROJECT_NAME@"
#define LIBMXF_LIBRARY_WNAME L"@PROJECT_NAME@"
Expand Down
4 changes: 2 additions & 2 deletions deps/libMXF/mxf/mxf_version.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ static const mxfUTF16Char *g_libmxfPlatformWString = L"" LIBMXF_LIBRARY_WNAME L
static const char *g_libmxfPlatformString = LIBMXF_LIBRARY_NAME " (PowerPC Darwin 64-bit)";
static const mxfUTF16Char *g_libmxfPlatformWString = L"" LIBMXF_LIBRARY_WNAME L" (PowerPC Darwin 64-bit)";
#else
static const char *g_libmxfPlatformString = LIBMXF_LIBRARY_NAME " (Unknown)";
static const mxfUTF16Char *g_libmxfPlatformWString = L"" LIBMXF_LIBRARY_WNAME L" (Unknown)";
static const char *g_libmxfPlatformString = LIBMXF_LIBRARY_NAME " (" LIBMXF_DEFAULT_PLATFORM_NAME ")";
static const mxfUTF16Char *g_libmxfPlatformWString = L"" LIBMXF_LIBRARY_WNAME L" (" LIBMXF_DEFAULT_PLATFORM_WNAME L")";
#endif

static const char *g_regtestPlatformString = "libMXF (Linux)";
Expand Down

0 comments on commit fe76997

Please sign in to comment.