From d3f11e3b7b86eda4733ece84294d9dc8da1d23bc Mon Sep 17 00:00:00 2001 From: Daniil Rozanov Date: Wed, 5 Jul 2023 03:11:34 +0300 Subject: Added declaration of connection class with connect and execute members. Created detail and impl folder. Created one example's file --- CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d04ea4..b332a52 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,3 +3,40 @@ project( ftp VERSION 0.0.1 LANGUAGES CXX) + +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +option(FTP_BUILD_TESTS "Enable tests build" OFF) +option(FTP_BUILD_EXAMPLES "Enable examples build" ON) +option(FTP_HEADER_ONLY "Install as header only" ON) + +find_package(Boost 1.82.0 REQUIRED COMPONENTS system thread regex context) + +add_library(ftp INTERFACE) +add_library(ftp::ftp ALIAS ftp) + +target_include_directories( + ftp INTERFACE $ + $) + +target_compile_features(ftp INTERFACE cxx_std_17) + +if(FTP_HEADER_ONLY) + target_compile_definitions(ftp INTERFACE "FTP_HEADER_ONLY") + target_sources(ftp INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include/ftp/impl) +endif() + +target_link_libraries(ftp INTERFACE Boost::thread) + +set(CMAKE_CXX_EXTENSIONS OFF) + +if(FTP_BUILD_TESTS) + message("Building tests") + add_subdirectory(tests) +endif() + +message(${FTP_BUILD_EXAMPLES}) +if(FTP_BUILD_EXAMPLES) + message("Building examples") + add_subdirectory(examples) +endif() -- cgit v1.2.3