cmake_minimum_required(VERSION 3.6) project(TeaSpeak-Files) #set(CMAKE_CXX_STANDARD 17) #set(CMAKE_CXX_STANDARD_REQUIRED ON) add_library(TeaSpeak-FileServer STATIC local_server/LocalFileServer.cpp local_server/LocalFileSystem.cpp local_server/clnpath.cpp ) target_link_libraries(TeaSpeak-FileServer PUBLIC TeaSpeak ${StringVariable_LIBRARIES_STATIC} stdc++fs libevent::core libevent::pthreads) target_include_directories(TeaSpeak-FileServer PUBLIC include/) add_executable(TeaSpeak-FileServerTest test/main.cpp) target_link_libraries(TeaSpeak-FileServerTest PUBLIC TeaSpeak-FileServer TeaMusic #Static (Must be in here, so we link against TeaMusic which uses C++11. That forbids GCC to use the newer glibc version) CXXTerminal::static #Static stdc++fs ) add_executable(FileServer-CLNText local_server/clnpath.cpp) target_compile_definitions(FileServer-CLNText PUBLIC -DCLN_EXEC)