2019-08-25 04:43:57 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2020-01-31 03:36:12 +08:00
|
|
|
index 09b4f9b..6f72c41 100644
|
2019-08-25 04:43:57 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2020-01-31 03:36:12 +08:00
|
|
|
@@ -22,8 +22,8 @@ message("Building Telnet++ with zlib: ${TELNETPP_WITH_ZLIB}")
|
2019-08-25 04:43:57 +08:00
|
|
|
message("Building Telnet++ with code coverage: ${TELNETPP_COVERAGE}")
|
|
|
|
message("Building Telnet++ with sanitizers: ${TELNETPP_SANITIZE}")
|
|
|
|
|
|
|
|
-include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
|
|
|
-conan_basic_setup(TARGETS NO_OUTPUT_DIRS)
|
2020-01-31 03:36:12 +08:00
|
|
|
+find_package(gsl-lite REQUIRED)
|
|
|
|
+find_package(Boost REQUIRED COMPONENTS container)
|
|
|
|
|
2019-08-25 04:43:57 +08:00
|
|
|
# The required C++ Standard for Telnet++ is C++14.
|
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
2020-01-31 03:36:12 +08:00
|
|
|
@@ -154,18 +154,24 @@ add_library(telnetpp
|
2019-08-25 04:43:57 +08:00
|
|
|
${TELNETPP_PRIVATE_INCLUDE_FILES}
|
|
|
|
)
|
|
|
|
|
|
|
|
+if (BUILD_SHARED_LIBS)
|
|
|
|
+ add_definitions(-Dtelnetpp_EXPORTS)
|
|
|
|
+else()
|
|
|
|
+ add_definitions(-DTELNETPP_STATIC_DEFINE)
|
|
|
|
+endif()
|
|
|
|
+
|
|
|
|
target_link_libraries(telnetpp
|
|
|
|
PUBLIC
|
|
|
|
- CONAN_PKG::gsl-lite
|
|
|
|
- CONAN_PKG::boost_container
|
|
|
|
- CONAN_PKG::boost_signals2
|
|
|
|
- CONAN_PKG::boost_variant
|
2020-01-31 03:36:12 +08:00
|
|
|
+ gsl::gsl-lite
|
|
|
|
+ Boost::boost
|
|
|
|
+ Boost::container
|
2019-08-25 04:43:57 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if (TELNETPP_WITH_ZLIB)
|
|
|
|
+ find_package(ZLIB REQUIRED)
|
|
|
|
target_link_libraries(telnetpp
|
|
|
|
PRIVATE
|
|
|
|
- CONAN_PKG::zlib
|
2020-01-31 03:36:12 +08:00
|
|
|
+ ZLIB::ZLIB
|
2019-08-25 04:43:57 +08:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-01-31 03:36:12 +08:00
|
|
|
@@ -179,8 +185,7 @@ set_target_properties(telnetpp
|
|
|
|
target_include_directories(telnetpp
|
2019-08-25 04:43:57 +08:00
|
|
|
PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
2020-01-31 03:36:12 +08:00
|
|
|
- $<INSTALL_INTERFACE:include/telnetpp-${TELNETPP_VERSION}>
|
2019-08-25 04:43:57 +08:00
|
|
|
- "${Boost_INCLUDE_DIRS}"
|
2020-01-31 03:36:12 +08:00
|
|
|
+ $<INSTALL_INTERFACE:include>
|
2019-08-25 04:43:57 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
generate_export_header(telnetpp
|
2020-01-31 03:36:12 +08:00
|
|
|
@@ -197,17 +202,19 @@ install(
|
2019-08-25 04:43:57 +08:00
|
|
|
telnetpp
|
|
|
|
EXPORT
|
|
|
|
telnetpp-config
|
|
|
|
+ RUNTIME DESTINATION
|
|
|
|
+ bin
|
|
|
|
ARCHIVE DESTINATION
|
|
|
|
- lib/telnetpp-${TELNETPP_VERSION}
|
|
|
|
+ lib
|
|
|
|
LIBRARY DESTINATION
|
|
|
|
- lib/telnetpp-${TELNETPP_VERSION}
|
|
|
|
+ lib
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
DIRECTORY
|
|
|
|
include/
|
|
|
|
DESTINATION
|
|
|
|
- include/telnetpp-${TELNETPP_VERSION}
|
|
|
|
+ include
|
|
|
|
)
|
|
|
|
|
|
|
|
export(
|
2020-01-31 03:36:12 +08:00
|
|
|
@@ -221,7 +228,7 @@ install(
|
2019-08-25 04:43:57 +08:00
|
|
|
EXPORT
|
|
|
|
telnetpp-config
|
|
|
|
DESTINATION
|
|
|
|
- lib/telnetpp-${TELNETPP_VERSION}
|
|
|
|
+ share/telnetpp
|
|
|
|
)
|
|
|
|
|
|
|
|
include(CMakePackageConfigHelpers)
|
2020-01-31 03:36:12 +08:00
|
|
|
@@ -236,7 +243,7 @@ install(
|
2019-08-25 04:43:57 +08:00
|
|
|
FILES
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/telnetpp-config-version.cmake"
|
|
|
|
DESTINATION
|
|
|
|
- lib/telnetpp-${TELNETPP_VERSION}
|
|
|
|
+ share/telnetpp
|
|
|
|
)
|
|
|
|
|
|
|
|
if (TELNETPP_WITH_TESTS)
|
|
|
|
diff --git a/include/telnetpp/core.hpp b/include/telnetpp/core.hpp
|
2020-01-31 03:36:12 +08:00
|
|
|
index 2362fac..8710d36 100644
|
2019-08-25 04:43:57 +08:00
|
|
|
--- a/include/telnetpp/core.hpp
|
|
|
|
+++ b/include/telnetpp/core.hpp
|
|
|
|
@@ -1,7 +1,7 @@
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "telnetpp/detail/export.hpp"
|
|
|
|
-#include <gsl-lite.h>
|
2020-01-31 03:36:12 +08:00
|
|
|
+#include <gsl/gsl-lite.hpp>
|
2019-08-25 04:43:57 +08:00
|
|
|
#include <string>
|
|
|
|
#include <cstdint>
|
|
|
|
|
2020-01-31 03:36:12 +08:00
|
|
|
diff --git a/src/options/msdp/detail/decoder.cpp b/src/options/msdp/detail/decoder.cpp
|
|
|
|
index c0b7906..e725693 100644
|
|
|
|
--- a/src/options/msdp/detail/decoder.cpp
|
|
|
|
+++ b/src/options/msdp/detail/decoder.cpp
|
|
|
|
@@ -1,5 +1,6 @@
|
|
|
|
#include "telnetpp/options/msdp/detail/decoder.hpp"
|
|
|
|
#include "telnetpp/options/msdp/detail/protocol.hpp"
|
|
|
|
+#include <vector>
|
|
|
|
#include <cassert>
|
|
|
|
#include <functional>
|
|
|
|
|