add ability to change openssl and zlib

This commit is contained in:
Lion Kortlepel 2022-09-27 23:46:19 +02:00
parent ae38f01fdc
commit dccdd3f5f2
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B

View File

@ -90,11 +90,28 @@ add_subdirectory(deps)
# ------------------------ VARIABLES --------------------------------- # ------------------------ VARIABLES ---------------------------------
include(FindLua) option(FIND_OPENSSL "Whether or not to find openssl automatically (keep on unless you know what you're doing)" ON)
option(FIND_ZLIB "Whether or not to find zlib automatically (keep on unless you know what you're doing)" ON)
include(FindOpenSSL) include(FindOpenSSL)
if (${FIND_OPENSSL})
set(OPENSSL_CRYPTO OpenSSL::Crypto)
set(OPENSSL_SSL OpenSSL::SSL)
else()
message(STATUS "Using custom openssl libs: ${OPENSSL_CRYPTO} ${OPENSSL_SSL}")
endif()
include(FindLua)
include(FindThreads) include(FindThreads)
include(FindZLIB) include(FindZLIB)
if (${FIND_ZLIB})
set(ZLIB_ZLIB ZLIB::ZLIB)
else()
message(STATUS "Using custom zlib: ${ZLIB_ZLIB}")
endif()
set(BeamMP_Sources set(BeamMP_Sources
include/TConsole.h src/TConsole.cpp include/TConsole.h src/TConsole.cpp
include/TServer.h src/TServer.cpp include/TServer.h src/TServer.cpp
@ -171,12 +188,12 @@ endif()
set(BeamMP_Libraries set(BeamMP_Libraries
doctest::doctest doctest::doctest
OpenSSL::SSL ${OPENSSL_SSL}
OpenSSL::Crypto ${OPENSSL_CRYPTO}
sol2::sol2 sol2::sol2
fmt::fmt fmt::fmt
Threads::Threads Threads::Threads
ZLIB::ZLIB ${ZLIB_ZLIB}
${LUA_LIBRARIES} ${LUA_LIBRARIES}
commandline commandline
sentry sentry