fix github actions

Possible fix for sentry url not showing up in windows build

possible fix for sentry, again

add static_assert in attempt to fix issue with sentry

use target_compile_definitions instead of add_compile_definitions
This commit is contained in:
Lion Kortlepel
2021-08-19 15:41:27 +02:00
committed by Lion
parent 7d137eb496
commit fe36191baf
4 changed files with 14 additions and 7 deletions
+2 -3
View File
@@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.0)
message(STATUS "You can find build instructions and a list of dependencies in the README at \
https://github.com/BeamMP/BeamMP-Server")
# ---- start of CXX section -----
project(BeamMP-Server
DESCRIPTION "Server for BeamMP - The Multiplayer Mod for BeamNG.drive"
HOMEPAGE_URL https://beammp.com
@@ -84,6 +83,8 @@ add_executable(BeamMP-Server
include/TPPSMonitor.h src/TPPSMonitor.cpp
include/TNetwork.h src/TNetwork.cpp)
target_compile_definitions(BeamMP-Server PRIVATE SECRET_SENTRY_URL="${BEAMMP_SECRET_SENTRY_URL}")
target_include_directories(BeamMP-Server PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/commandline")
@@ -105,7 +106,6 @@ find_package(OpenSSL REQUIRED)
message(STATUS "CURL IS ${CURL_LIBRARIES}")
if (UNIX)
add_definitions(-DSECRET_SENTRY_URL="${BEAMMP_SECRET_SENTRY_URL}")
target_link_libraries(BeamMP-Server
z
pthread
@@ -117,7 +117,6 @@ if (UNIX)
sioclient_tls
sentry)
elseif (WIN32)
add_definitions(/DSECRET_SENTRY_URL="${BEAMMP_SECRET_SENTRY_URL}")
include(FindLua)
message(STATUS "Looking for libz")
find_package(ZLIB REQUIRED)