Get the shared library suffix from the build system

This commit is contained in:
dhewg 2012-07-03 18:30:14 +02:00
parent 262df52cdd
commit 3dad2151c5
2 changed files with 3 additions and 9 deletions

View file

@ -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

View file

@ -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 ) {