Some fixes

This commit is contained in:
WolverinDEV 2019-07-02 02:02:50 +02:00
parent 96b1ed363e
commit 5cace54457
2 changed files with 37 additions and 38 deletions

View File

@ -1,3 +1,4 @@
#X
cmake_minimum_required(VERSION 3.6) cmake_minimum_required(VERSION 3.6)
project(TeaSpeak-Shared) project(TeaSpeak-Shared)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
@ -7,11 +8,10 @@ if(NOT WIN32)
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif() endif()
if(CMAKE_PLATFORM_INCLUDE AND NOT CMAKE_PLATFORM_INCLUDE STREQUAL "")
include(${CMAKE_PLATFORM_INCLUDE})
endif()
if(NOT TEASPEAK_SERVER) if(NOT TEASPEAK_SERVER)
set(CMAKE_MODULE_PATH "C:/Users/WolverinDEV/TeaSpeak/cmake")
include(${CMAKE_MODULE_PATH}/libraries_wolverin_lap.cmake)
find_package(TomMath REQUIRED) find_package(TomMath REQUIRED)
include_directories(${TomMath_INCLUDE_DIR}) include_directories(${TomMath_INCLUDE_DIR})
@ -22,21 +22,20 @@ if(NOT TEASPEAK_SERVER)
include_directories(${DataPipes_INCLUDE_DIR}) include_directories(${DataPipes_INCLUDE_DIR})
message("Include: ${DataPipes_INCLUDE_DIR}") message("Include: ${DataPipes_INCLUDE_DIR}")
find_package(Libevent REQUIRED) find_package(LibEvent REQUIRED)
include_directories(${LIBEVENT_INCLUDE_DIRS}) include_directories(${LIBEVENT_INCLUDE_DIRS})
find_package(StringVariable REQUIRED) find_package(StringVariable REQUIRED)
include_directories(${StringVariable_INCLUDE_DIR}) include_directories(${StringVariable_INCLUDE_DIR})
find_package(Ed25519 REQUIRED) find_package(ed25519 REQUIRED)
include_directories(${ed25519_INCLUDE_DIR}) include_directories(${ed25519_INCLUDE_DIR})
find_package(ThreadPool REQUIRED) find_package(ThreadPool REQUIRED)
include_directories(${ThreadPool_INCLUDE_DIR}) include_directories(${ThreadPool_INCLUDE_DIR})
if(WIN32)
add_definitions(-DWINDOWS) #Required for ThreadPool add_definitions(-DWINDOWS) #Required for ThreadPool
endif()
find_package(spdlog CONFIG REQUIRED) find_package(SpdLog CONFIG REQUIRED)
link_libraries(spdlog::spdlog) #Its a header only lib so we should be fine :) link_libraries(spdlog::spdlog) #Its a header only lib so we should be fine :)
add_definitions(-DNO_OPEN_SSL) add_definitions(-DNO_OPEN_SSL)
@ -71,6 +70,7 @@ set(SOURCE_FILES
src/misc/rnd.cpp src/misc/rnd.cpp
src/misc/time.cpp src/misc/time.cpp
src/misc/memtracker.cpp src/misc/memtracker.cpp
src/misc/base64.cpp
#Logger #Logger
src/log/LogUtils.cpp src/log/LogUtils.cpp
@ -164,9 +164,8 @@ if(HAVE_OPEN_SSL)
endif() endif()
if (NOT WIN32) if (NOT WIN32)
#TODO: Do we really need that anymroe?
set(SOURCE_FILES ${SOURCE_FILES} set(SOURCE_FILES ${SOURCE_FILES}
#src/misc/TraceUtils.cpp src/misc/TraceUtils.cpp
) )
set(HEADER_FILES ${HEADER_FILES} set(HEADER_FILES ${HEADER_FILES}
@ -199,12 +198,9 @@ set(TEST_LIBRARIES
include_directories(src/) include_directories(src/)
option(BUILD_TESTS "Enable/disable test building" ON) add_executable(RingTest test/RingTest.cpp ${SOURCE_FILES})
if(BUILD_TESTS) target_link_libraries(RingTest ${TEST_LIBRARIES})
add_executable(RingTest test/RingTest.cpp ${SOURCE_FILES}) if(NOT WIN32)
target_link_libraries(RingTest ${TEST_LIBRARIES})
if(NOT WIN32)
add_executable(CommandTest ${SOURCE_FILES} ${HEADER_FILES} test/CommandTest.cpp src/log/LogSinks.cpp src/log/LogSinks.h) add_executable(CommandTest ${SOURCE_FILES} ${HEADER_FILES} test/CommandTest.cpp src/log/LogSinks.cpp src/log/LogSinks.h)
target_link_libraries(CommandTest ${TEST_LIBRARIES}) target_link_libraries(CommandTest ${TEST_LIBRARIES})
@ -232,5 +228,4 @@ if(BUILD_TESTS)
add_executable(LinkedTest test/LinkedTest.cpp ${SOURCE_FILES}) add_executable(LinkedTest test/LinkedTest.cpp ${SOURCE_FILES})
target_link_libraries(LinkedTest ${TEST_LIBRARIES}) target_link_libraries(LinkedTest ${TEST_LIBRARIES})
endif()
endif() endif()

4
src/misc/base64.cpp Normal file
View File

@ -0,0 +1,4 @@
//
// Created by wolverindev on 02.07.19.
//