From 630217f0b111a51cce24a83c7377958588d0a083 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Sat, 4 Jun 2022 21:17:26 +0500 Subject: [PATCH] cmake: fix wrong library naming scheme --- CMakeLists.txt | 2 +- cmake/LibraryNaming.cmake | 6 +++++- dlls/CMakeLists.txt | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab3160c1..2c6e0987 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ option(64BIT "Disable auto -m32 appending to compiler flags" OFF) set(GAMEDIR "valve" CACHE STRING "Gamedir path") set(SERVER_INSTALL_DIR "dlls" CACHE STRING "Where put server dll") set(CLIENT_INSTALL_DIR "cl_dlls" CACHE STRING "Where put client dll") -set(SERVER_LIBRARY_NAME "hl" CACHE STRING "Library name for Linux/MacOS/Windows") +set(SERVER_LIBRARY_NAME "hl" CACHE STRING "Library name for PC platforms") #----------------- # MAIN BUILD CODE \ diff --git a/cmake/LibraryNaming.cmake b/cmake/LibraryNaming.cmake index 22a70eb3..ca6fb42e 100644 --- a/cmake/LibraryNaming.cmake +++ b/cmake/LibraryNaming.cmake @@ -65,7 +65,11 @@ endif() if(XASH_AMD64) set(BUILDARCH "amd64") elseif(XASH_X86) - set(BUILDARCH "") + if(XASH_WIN32 OR XASH_LINUX OR XASH_APPLE) + set(BUILDARCH "") # no prefix for default OS + else() + set(BUILDARCH "i386") + endif() elseif(XASH_ARM AND XASH_64BIT) set(BUILDARCH "arm64") elseif(XASH_ARM) diff --git a/dlls/CMakeLists.txt b/dlls/CMakeLists.txt index 4f8e60ac..77cd47e6 100644 --- a/dlls/CMakeLists.txt +++ b/dlls/CMakeLists.txt @@ -169,7 +169,7 @@ add_library (${SVDLL_LIBRARY} SHARED ${SVDLL_SOURCES}) set_target_properties (${SVDLL_LIBRARY} PROPERTIES POSITION_INDEPENDENT_CODE 1) -if(APPLE OR WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") +if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android") set(SVDLL_NAME "${SERVER_LIBRARY_NAME}") set_target_properties(${SVDLL_LIBRARY} PROPERTIES