diff --git a/neo/config.h.in b/neo/config.h.in index 39fcf5bf..9c0c951f 100644 --- a/neo/config.h.in +++ b/neo/config.h.in @@ -4,6 +4,8 @@ #define BUILD_OS "@os@" #define BUILD_CPU "@cpu@" +#define BUILD_LIBRARY_SUFFIX "@CMAKE_SHARED_LIBRARY_SUFFIX@" + #cmakedefine HAVE_JPEG_MEM_SRC #cmakedefine ID_ENABLE_CURL diff --git a/neo/sys/sys_local.cpp b/neo/sys/sys_local.cpp index 13630883..efc63893 100644 --- a/neo/sys/sys_local.cpp +++ b/neo/sys/sys_local.cpp @@ -98,15 +98,7 @@ void idSysLocal::DLL_Unload( uintptr_t dllHandle ) { } void idSysLocal::DLL_GetFileName( const char *baseName, char *dllName, int maxLength ) { -#ifdef _WIN32 - idStr::snPrintf( dllName, maxLength, "%s.dll", baseName ); -#elif defined( __unix__ ) - idStr::snPrintf( dllName, maxLength, "%s.so", baseName ); -#elif defined( MACOS_X ) - idStr::snPrintf( dllName, maxLength, "%s.dylib", baseName ); -#else -#error OS define is required -#endif + idStr::snPrintf( dllName, maxLength, "%s" BUILD_LIBRARY_SUFFIX, baseName ); } sysEvent_t idSysLocal::GenerateMouseButtonEvent( int button, bool down ) {