Fixed dependency mess

This commit is contained in:
WolverinDEV 2019-11-12 22:52:47 +01:00
parent 7cf7995371
commit 55631bfb82
2 changed files with 15 additions and 8 deletions

View File

@ -57,11 +57,17 @@ resolve_library(LIBRARY_PATH_ED255 OFF "${LIBRARY_PATH}/ed25519/bui
resolve_library(LIBRARY_PATH_DATA_PIPES OFF "${LIBRARY_PATH}/DataPipes/build/libDataPipes.so" "${LIBRARY_PATH}/DataPipes/cmake-build-release/libDataPipes.so" "${LIBRARY_PATH}/DataPipes/cmake-build-debug/libDataPipes.so") resolve_library(LIBRARY_PATH_DATA_PIPES OFF "${LIBRARY_PATH}/DataPipes/build/libDataPipes.so" "${LIBRARY_PATH}/DataPipes/cmake-build-release/libDataPipes.so" "${LIBRARY_PATH}/DataPipes/cmake-build-debug/libDataPipes.so")
resolve_library(LIBRARY_PATH_OPUS OFF "${LIBRARY_PATH}/opus/build/.libs/libopus.a") resolve_library(LIBRARY_PATH_OPUS OFF "${LIBRARY_PATH}/opus/build/.libs/libopus.a")
resolve_library(LIBRARY_PATH_NICE OFF "${LIBRARY_PATH}/libnice/linux_${BUILD_OS_ARCH}/lib/libnice.so.10") resolve_library(LIBRARY_PATH_NICE OFF "${LIBRARY_PATH}/libnice/linux_${BUILD_OS_ARCH}/lib/libnice.so.10")
include_directories(${LIBRARY_PATH}/libnice/linux_${BUILD_OS_ARCH}/include) message("Found libnice at ${LIBRARY_PATH_NICE}")
include_directories(${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/include)
include_directories(${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/include/glib-2.0) if (EXISTS "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/i386-linux-gnu/")
include_directories(${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/x86_64-linux-gnu/glib-2.0/include/) set(GLIBC_LIB_DIR "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/i386-linux-gnu/")
include_directories(${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/i386-linux-gnu/glib-2.0/include/) 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}/libglib-2.0.a;${GLIBC_LIB_DIR}/libgobject-2.0.a;${GLIBC_LIB_DIR}/libffi.a")
add_definitions(-DINET -DINET6) add_definitions(-DINET -DINET6)
add_subdirectory(shared/) add_subdirectory(shared/)

View File

@ -3,7 +3,7 @@ project(TeaSpeak-Server)
set(CMAKE_VERBOSE_MAKEFILE ON) set(CMAKE_VERBOSE_MAKEFILE ON)
#--allow-multiple-definition #--allow-multiple-definition
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -Wall -Wno-reorder -Wno-sign-compare -static-libgcc -static-libstdc++ -g -Wl,-no-whole-archive,--no-undefined -pthread ${MEMORY_DEBUG_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -Wall -Wno-reorder -Wno-sign-compare -static-libgcc -static-libstdc++ -g -Wl,-no-whole-archive,--allow-shlib-undefined -pthread ${MEMORY_DEBUG_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3")
@ -268,14 +268,12 @@ target_link_libraries(TeaSpeakServer
${LIBRARY_PATH_BREAKPAD} ${LIBRARY_PATH_BREAKPAD}
${LIBRARY_PATH_PROTOBUF} ${LIBRARY_PATH_PROTOBUF}
${LIBRARY_PATH_NICE}
#${LIBWEBRTC_LIBRARIES} #ATTENTIAN! WebRTC does not work with crypto! (Already contains a crypto version) #${LIBWEBRTC_LIBRARIES} #ATTENTIAN! WebRTC does not work with crypto! (Already contains a crypto version)
${LIBRARY_TOM_CRYPT} ${LIBRARY_TOM_CRYPT}
${LIBRARY_TOM_MATH} ${LIBRARY_TOM_MATH}
mysqlclient.a mysqlclient.a
z
${LIBRARY_PATH_ED255} ${LIBRARY_PATH_ED255}
) )
@ -285,12 +283,15 @@ if(${COMPILE_WEB_CLIENT})
target_link_libraries(TeaSpeakServer target_link_libraries(TeaSpeakServer
${LIBRARY_PATH_DATA_PIPES} ${LIBRARY_PATH_DATA_PIPES}
) )
target_link_options(TeaSpeakServer PUBLIC "-Wl,--no-as-needed" "${LIBRARY_PATH_NICE}" "-Wl,--as-needed")
endif() endif()
include_directories(${LIBRARY_PATH}/boringssl/include/) include_directories(${LIBRARY_PATH}/boringssl/include/)
target_link_libraries(TeaSpeakServer target_link_libraries(TeaSpeakServer
${LIBRARY_PATH_BORINGSSL_SSL} ${LIBRARY_PATH_BORINGSSL_SSL}
${LIBRARY_PATH_BORINGSSL_CRYPTO} ${LIBRARY_PATH_BORINGSSL_CRYPTO}
dl dl
z
) )
set(DISABLE_JEMALLOC ON) set(DISABLE_JEMALLOC ON)