Browse Source

cmake: fix wrong library naming scheme

hl_urbicide
Andrey Akhmichin 3 years ago
parent
commit
630217f0b1
No known key found for this signature in database
GPG Key ID: 1F180D249B0643C0
  1. 2
      CMakeLists.txt
  2. 6
      cmake/LibraryNaming.cmake
  3. 2
      dlls/CMakeLists.txt

2
CMakeLists.txt

@ -48,7 +48,7 @@ option(64BIT "Disable auto -m32 appending to compiler flags" OFF) @@ -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 \

6
cmake/LibraryNaming.cmake

@ -65,7 +65,11 @@ endif() @@ -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)

2
dlls/CMakeLists.txt

@ -169,7 +169,7 @@ add_library (${SVDLL_LIBRARY} SHARED ${SVDLL_SOURCES}) @@ -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

Loading…
Cancel
Save