diff --git a/neo/CMakeLists.txt b/neo/CMakeLists.txt index 584ac68f..c2cab6eb 100644 --- a/neo/CMakeLists.txt +++ b/neo/CMakeLists.txt @@ -52,9 +52,6 @@ if (cpu STREQUAL "x86_64" AND X86) set(cpu "x86") endif() -# game library suffix -set(gamesuffix ${cpu}) - # target os if (APPLE) set(os "macosx") @@ -155,9 +152,6 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang") endif() if (APPLE) - # no suffix for .dylib - set(gamesuffix "") - add_definitions(-DMACOS_X=1) if (cpu STREQUAL "x86_64") @@ -754,21 +748,21 @@ if (DEDICATED) endif() if (GAME) - add_library(game${gamesuffix} SHARED ${src_game}) - set_target_properties(game${gamesuffix} PROPERTIES PREFIX "") - set_target_properties(game${gamesuffix} PROPERTIES COMPILE_DEFINITIONS "GAME_DLL") - set_target_properties(game${gamesuffix} PROPERTIES COMPILE_FLAGS "-I${CMAKE_SOURCE_DIR}/game") - set_target_properties(game${gamesuffix} PROPERTIES LINK_FLAGS "${ldflags}") - set_target_properties(game${gamesuffix} PROPERTIES INSTALL_NAME_DIR "@executable_path") - target_link_libraries(game${gamesuffix} idlib) + add_library(game SHARED ${src_game}) + set_target_properties(game PROPERTIES PREFIX "") + set_target_properties(game PROPERTIES COMPILE_DEFINITIONS "GAME_DLL") + set_target_properties(game PROPERTIES COMPILE_FLAGS "-I${CMAKE_SOURCE_DIR}/game") + set_target_properties(game PROPERTIES LINK_FLAGS "${ldflags}") + set_target_properties(game PROPERTIES INSTALL_NAME_DIR "@executable_path") + target_link_libraries(game idlib) endif() if (D3XP) - add_library(d3xp${gamesuffix} SHARED ${src_d3xp}) - set_target_properties(d3xp${gamesuffix} PROPERTIES PREFIX "") - set_target_properties(d3xp${gamesuffix} PROPERTIES COMPILE_DEFINITIONS "GAME_DLL;_D3XP;CTF") - set_target_properties(d3xp${gamesuffix} PROPERTIES COMPILE_FLAGS "-I${CMAKE_SOURCE_DIR}/d3xp") - set_target_properties(d3xp${gamesuffix} PROPERTIES LINK_FLAGS "${ldflags}") - set_target_properties(d3xp${gamesuffix} PROPERTIES INSTALL_NAME_DIR "@executable_path") - target_link_libraries(d3xp${gamesuffix} idlib) + add_library(d3xp SHARED ${src_d3xp}) + set_target_properties(d3xp PROPERTIES PREFIX "") + set_target_properties(d3xp PROPERTIES COMPILE_DEFINITIONS "GAME_DLL;_D3XP;CTF") + set_target_properties(d3xp PROPERTIES COMPILE_FLAGS "-I${CMAKE_SOURCE_DIR}/d3xp") + set_target_properties(d3xp PROPERTIES LINK_FLAGS "${ldflags}") + set_target_properties(d3xp PROPERTIES INSTALL_NAME_DIR "@executable_path") + target_link_libraries(d3xp idlib) endif() diff --git a/neo/sys/sys_local.cpp b/neo/sys/sys_local.cpp index 28ff8bf7..13630883 100644 --- a/neo/sys/sys_local.cpp +++ b/neo/sys/sys_local.cpp @@ -99,11 +99,11 @@ 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" BUILD_CPU ".dll", baseName ); + idStr::snPrintf( dllName, maxLength, "%s.dll", baseName ); #elif defined( __unix__ ) - idStr::snPrintf( dllName, maxLength, "%s" BUILD_CPU ".so", baseName ); + idStr::snPrintf( dllName, maxLength, "%s.so", baseName ); #elif defined( MACOS_X ) - idStr::snPrintf( dllName, maxLength, "%s" ".dylib", baseName ); + idStr::snPrintf( dllName, maxLength, "%s.dylib", baseName ); #else #error OS define is required #endif