Improved webclient handling

This commit is contained in:
WolverinDEV 2020-01-24 21:05:10 +01:00
parent 9e41b825c0
commit 43c4277b04
2 changed files with 21 additions and 21 deletions

View File

@ -10,6 +10,14 @@ set(TEASPEAK_SERVER ON)
#set(MEMORY_DEBUG_FLAGS " -fsanitize=leak -fsanitize=address -fstack-protector-all ") #set(MEMORY_DEBUG_FLAGS " -fsanitize=leak -fsanitize=address -fstack-protector-all ")
#set(MEMORY_DEBUG_FLAGS "-fsanitize=address") #set(MEMORY_DEBUG_FLAGS "-fsanitize=address")
if (NOT BUILD_OS_ARCH)
set(BUILD_OS_ARCH $ENV{build_os_arch})
endif ()
if (NOT BUILD_OS_ARCH)
set(BUILD_OS_ARCH $ENV{build_os_arch})
endif ()
set(LIBRARY_PATH "${CMAKE_SOURCE_DIR}/../libraries/") set(LIBRARY_PATH "${CMAKE_SOURCE_DIR}/../libraries/")
if (BUILD_INCLUDE_FILE) if (BUILD_INCLUDE_FILE)
include(${BUILD_INCLUDE_FILE}) include(${BUILD_INCLUDE_FILE})
@ -37,14 +45,6 @@ function(resolve_library VARIABLE FALLBACK PATHS)
endif() endif()
endfunction() endfunction()
if (NOT BUILD_OS_ARCH)
set(BUILD_OS_ARCH $ENV{BUILD_OS_ARCH})
endif ()
if (NOT BUILD_OS_ARCH)
set(BUILD_OS_ARCH $ENV{build_os_arch})
endif ()
find_package(TomMath REQUIRED) find_package(TomMath REQUIRED)
find_package(TomCrypt REQUIRED) find_package(TomCrypt REQUIRED)
find_package(Breakpad REQUIRED) find_package(Breakpad REQUIRED)
@ -78,19 +78,6 @@ include_directories(${DataPipes_INCLUDE_DIR})
include_directories(${LIBEVENT_INCLUDE_DIRS}) include_directories(${LIBEVENT_INCLUDE_DIRS})
include_directories(${StringVariable_INCLUDE_DIR}) include_directories(${StringVariable_INCLUDE_DIR})
resolve_library(LIBRARY_PATH_NICE OFF "${LIBRARY_PATH}/libnice/linux_${BUILD_OS_ARCH}/lib/libnice.a")
message("Found libnice at ${LIBRARY_PATH_NICE}")
if (EXISTS "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/i386-linux-gnu/")
set(GLIBC_LIB_DIR "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/i386-linux-gnu/")
elseif(EXISTS "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/x86_64-linux-gnu/")
set(GLIBC_LIB_DIR "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/x86_64-linux-gnu/")
else()
message(FATAL_ERROR "Failed to find glibc")
endif ()
message("Found GLIBC lib dir at ${GLIBC_LIB_DIR}")
set(LIBRARY_PATH_GLIBC "${GLIBC_LIB_DIR}/libgio-2.0.a;${GLIBC_LIB_DIR}/libgmodule-2.0.a;${GLIBC_LIB_DIR}/libgobject-2.0.a;${GLIBC_LIB_DIR}/libglib-2.0.a;${GLIBC_LIB_DIR}/libffi.a;resolv")
add_definitions(-DINET -DINET6) add_definitions(-DINET -DINET6)
add_subdirectory(shared/) add_subdirectory(shared/)
add_subdirectory(server/) add_subdirectory(server/)

View File

@ -280,6 +280,19 @@ target_link_libraries(TeaSpeakServer
) )
if (COMPILE_WEB_CLIENT) if (COMPILE_WEB_CLIENT)
resolve_library(LIBRARY_PATH_NICE OFF "${LIBRARY_PATH}/libnice/linux_${BUILD_OS_ARCH}/lib/libnice.a")
message("Found libnice at ${LIBRARY_PATH_NICE}")
if (EXISTS "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/i386-linux-gnu/")
set(GLIBC_LIB_DIR "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/i386-linux-gnu/")
elseif(EXISTS "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/x86_64-linux-gnu/")
set(GLIBC_LIB_DIR "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/x86_64-linux-gnu/")
else()
message(FATAL_ERROR "Failed to find glibc")
endif ()
message("Found GLIBC lib dir at ${GLIBC_LIB_DIR}")
set(LIBRARY_PATH_GLIBC "${GLIBC_LIB_DIR}/libgio-2.0.a;${GLIBC_LIB_DIR}/libgmodule-2.0.a;${GLIBC_LIB_DIR}/libgobject-2.0.a;${GLIBC_LIB_DIR}/libglib-2.0.a;${GLIBC_LIB_DIR}/libffi.a;resolv")
find_package(UsrSCTP REQUIRED) find_package(UsrSCTP REQUIRED)
target_link_libraries(TeaSpeakServer target_link_libraries(TeaSpeakServer
${LIBRARY_PATH_NICE} ${LIBRARY_PATH_NICE}