mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-27 06:32:27 +00:00
Drop the CPU suffix from libraries on all platforms
This commit is contained in:
parent
ff00686218
commit
262df52cdd
2 changed files with 17 additions and 23 deletions
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue