From 98791a0ea51c8f66dd63f0969e2ad999fb28f88d Mon Sep 17 00:00:00 2001 From: dhewg Date: Tue, 3 Jul 2012 18:26:24 +0200 Subject: [PATCH] Drop the CPU suffix from libraries on all platforms --- CMakeLists.txt | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 584ac68..c2cab6e 100644 --- a/CMakeLists.txt +++ b/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()