mirror of
https://github.com/rehlds/rehlds.git
synced 2025-02-05 02:00:34 +03:00
CMakeLists.txt: Fix build with cmake 3.7.2 [skip ci]
This commit is contained in:
parent
b0488cf081
commit
0c47c1c28b
@ -219,10 +219,10 @@ if (CMAKE_BUILD_TYPE MATCHES Unittests)
|
||||
endif()
|
||||
|
||||
set(LINK_FLAGS "${LINK_FLAGS} -no-pie -Wl,--no-export-dynamic")
|
||||
add_executable(engine ${appversion.sh})
|
||||
add_executable(engine ${appversion.sh} ${ENGINE_SRCS})
|
||||
target_link_libraries(engine PRIVATE cppunitlite)
|
||||
else()
|
||||
add_library(engine SHARED ${appversion.sh})
|
||||
add_library(engine SHARED ${appversion.sh} ${ENGINE_SRCS})
|
||||
endif()
|
||||
|
||||
if (NOT TARGET bzip2)
|
||||
@ -268,7 +268,6 @@ target_compile_definitions(engine PRIVATE
|
||||
)
|
||||
|
||||
target_sources(engine PRIVATE
|
||||
${ENGINE_SRCS}
|
||||
${COMMON_SRCS}
|
||||
${PUBLIC_SRCS}
|
||||
|
||||
|
@ -84,7 +84,7 @@ if (NOT TARGET appversion)
|
||||
add_custom_target(appversion DEPENDS COMMAND "${PROJECT_SOURCE_DIR}/../../version/appversion.sh" "${PROJECT_SOURCE_DIR}/../../..")
|
||||
endif()
|
||||
|
||||
add_executable(hltv ${appversion.sh})
|
||||
add_executable(hltv ${appversion.sh} ${HLTV_SRCS})
|
||||
add_dependencies(hltv appversion)
|
||||
|
||||
target_include_directories(hltv PRIVATE
|
||||
@ -106,7 +106,6 @@ target_compile_definitions(hltv PRIVATE
|
||||
)
|
||||
|
||||
target_sources(hltv PRIVATE
|
||||
${HLTV_SRCS}
|
||||
${COMMON_SRCS}
|
||||
)
|
||||
|
||||
|
@ -101,7 +101,7 @@ set(COMMON_SRCS
|
||||
"../../engine/mem.cpp"
|
||||
)
|
||||
|
||||
add_library(core SHARED)
|
||||
add_library(core SHARED ${CORE_SRCS})
|
||||
|
||||
target_include_directories(core PRIVATE
|
||||
${PROJECT_SRC_DIR}
|
||||
@ -123,7 +123,6 @@ target_compile_definitions(core PRIVATE
|
||||
)
|
||||
|
||||
target_sources(core PRIVATE
|
||||
${CORE_SRCS}
|
||||
${COMMON_SRCS}
|
||||
)
|
||||
|
||||
|
@ -76,7 +76,7 @@ set(COMMON_SRCS
|
||||
"../../engine/mem.cpp"
|
||||
)
|
||||
|
||||
add_library(demoplayer SHARED)
|
||||
add_library(demoplayer SHARED ${DEMOPLAYER_SRCS})
|
||||
|
||||
target_include_directories(demoplayer PRIVATE
|
||||
${PROJECT_SRC_DIR}
|
||||
@ -97,7 +97,6 @@ target_compile_definitions(demoplayer PRIVATE
|
||||
)
|
||||
|
||||
target_sources(demoplayer PRIVATE
|
||||
${DEMOPLAYER_SRCS}
|
||||
${COMMON_SRCS}
|
||||
)
|
||||
|
||||
|
@ -77,7 +77,7 @@ set(COMMON_SRCS
|
||||
"../../engine/mem.cpp"
|
||||
)
|
||||
|
||||
add_library(director SHARED)
|
||||
add_library(director SHARED ${DIRECTOR_SRCS})
|
||||
|
||||
target_include_directories(director PRIVATE
|
||||
${PROJECT_SRC_DIR}
|
||||
@ -99,7 +99,6 @@ target_compile_definitions(director PRIVATE
|
||||
)
|
||||
|
||||
target_sources(director PRIVATE
|
||||
${DIRECTOR_SRCS}
|
||||
${COMMON_SRCS}
|
||||
)
|
||||
|
||||
|
@ -107,7 +107,7 @@ set(COMMON_SRCS
|
||||
"../../engine/mem.cpp"
|
||||
)
|
||||
|
||||
add_library(proxy SHARED)
|
||||
add_library(proxy SHARED ${PROXY_SRCS})
|
||||
|
||||
target_include_directories(proxy PRIVATE
|
||||
${PROJECT_SRC_DIR}
|
||||
@ -129,7 +129,6 @@ target_compile_definitions(proxy PRIVATE
|
||||
)
|
||||
|
||||
target_sources(proxy PRIVATE
|
||||
${PROXY_SRCS}
|
||||
${COMMON_SRCS}
|
||||
)
|
||||
|
||||
|
@ -85,7 +85,7 @@ if (NOT TARGET appversion)
|
||||
add_custom_target(appversion DEPENDS COMMAND "${PROJECT_SOURCE_DIR}/../version/appversion.sh" "${PROJECT_SOURCE_DIR}/../..")
|
||||
endif()
|
||||
|
||||
add_executable(hlds ${appversion.sh})
|
||||
add_executable(hlds ${appversion.sh} ${DEDICATED_SRCS})
|
||||
add_dependencies(hlds appversion)
|
||||
|
||||
target_include_directories(hlds PRIVATE
|
||||
@ -106,7 +106,6 @@ target_compile_definitions(hlds PRIVATE
|
||||
)
|
||||
|
||||
target_sources(hlds PRIVATE
|
||||
${DEDICATED_SRCS}
|
||||
${COMMON_SRCS}
|
||||
)
|
||||
|
||||
|
@ -31,7 +31,7 @@ else()
|
||||
-mtune=generic -msse3\
|
||||
-fpermissive -fno-sized-deallocation\
|
||||
-Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-result -Wno-unused-function\
|
||||
-Wno-write-strings -Wno-sign-compare")
|
||||
-Wno-write-strings -Wno-sign-compare -Wno-strict-aliasing")
|
||||
|
||||
# Check if not Clang compiler AND GCC >= 8.3
|
||||
if (NOT "$ENV{CXX}" MATCHES "clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
|
||||
@ -95,10 +95,6 @@ target_compile_definitions(filesystem_stdio PRIVATE
|
||||
_unlink=unlink
|
||||
)
|
||||
|
||||
target_sources(filesystem_stdio PRIVATE
|
||||
${FILESYSTEM_STDIO_SRCS}
|
||||
)
|
||||
|
||||
target_link_libraries(filesystem_stdio PRIVATE
|
||||
dl
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user