mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-04 00:36:14 +00:00
potential fix to #141
This commit is contained in:
parent
2b61f11a86
commit
83fb387dfe
@ -28,6 +28,8 @@ set(SENTRY_BUILD_SHARED_LIBS OFF)
|
|||||||
|
|
||||||
add_compile_definitions(CPPHTTPLIB_OPENSSL_SUPPORT=1)
|
add_compile_definitions(CPPHTTPLIB_OPENSSL_SUPPORT=1)
|
||||||
|
|
||||||
|
option(WIN32_STATIC_RUNTIME "Build statically-linked runtime on windows (don't touch unless you know what you're doing)" ON)
|
||||||
|
|
||||||
# ------------------------ APPLE ---------------------------------
|
# ------------------------ APPLE ---------------------------------
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
if(IS_DIRECTORY /opt/homebrew/Cellar/lua@5.3/5.3.6)
|
if(IS_DIRECTORY /opt/homebrew/Cellar/lua@5.3/5.3.6)
|
||||||
@ -46,18 +48,14 @@ if(APPLE)
|
|||||||
link_directories(/usr/local/opt/openssl@1.1/lib)
|
link_directories(/usr/local/opt/openssl@1.1/lib)
|
||||||
endif()
|
endif()
|
||||||
# ------------------------ WINDOWS ---------------------------------
|
# ------------------------ WINDOWS ---------------------------------
|
||||||
option(WIN32_STATIC_RUNTIME "Build statically-linked runtime on windows (don't touch unless you know what you're doing)" ON)
|
|
||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
# this has to happen before sentry, so that crashpad on windows links with these settings.
|
|
||||||
if (WIN32_STATIC_RUNTIME)
|
if (WIN32_STATIC_RUNTIME)
|
||||||
message(STATUS "MSVC -> forcing use of statically-linked runtime.")
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
|
|
||||||
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
|
|
||||||
endif()
|
endif()
|
||||||
# ------------------------ LINUX ---------------------------------
|
# ------------------------ UNIX ------------------------------------
|
||||||
elseif (UNIX)
|
elseif (UNIX)
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fno-builtin")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
|
||||||
option(SANITIZE "Turns on thread and UB sanitizers" OFF)
|
option(SANITIZE "Turns on thread and UB sanitizers" OFF)
|
||||||
if (SANITIZE)
|
if (SANITIZE)
|
||||||
message(STATUS "sanitize is ON")
|
message(STATUS "sanitize is ON")
|
||||||
@ -82,9 +80,6 @@ add_subdirectory("deps/sentry-native")
|
|||||||
|
|
||||||
# ------------------------ C++ SETUP ---------------------------------
|
# ------------------------ C++ SETUP ---------------------------------
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
if (MSVC)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# ------------------------ DEPENDENCIES ------------------------------
|
# ------------------------ DEPENDENCIES ------------------------------
|
||||||
message(STATUS "Adding local source dependencies")
|
message(STATUS "Adding local source dependencies")
|
||||||
@ -177,6 +172,11 @@ if (UNIX)
|
|||||||
-fstack-protector
|
-fstack-protector
|
||||||
-Wzero-as-null-pointer-constant
|
-Wzero-as-null-pointer-constant
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
|
||||||
|
set(BeamMP_CompileOptions
|
||||||
|
/bigobj
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(BeamMP_Libraries
|
set(BeamMP_Libraries
|
||||||
|
Loading…
x
Reference in New Issue
Block a user