aboutsummaryrefslogtreecommitdiff
path: root/ports/telnetpp/fix-build-error.patch
blob: d72ced01e7527418726e00a464504ae4ebc6f8ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 09b4f9b..6f72c41 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,8 +22,8 @@ message("Building Telnet++ with zlib: ${TELNETPP_WITH_ZLIB}")
 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)
+find_package(gsl-lite REQUIRED)
+find_package(Boost REQUIRED COMPONENTS container)
 
 # The required C++ Standard for Telnet++ is C++14.
 set(CMAKE_CXX_STANDARD 14)
@@ -154,18 +154,24 @@ add_library(telnetpp
     ${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
+        gsl::gsl-lite
+        Boost::boost
+        Boost::container
 )
 
 if (TELNETPP_WITH_ZLIB)
+    find_package(ZLIB REQUIRED)
     target_link_libraries(telnetpp
         PRIVATE
-            CONAN_PKG::zlib
+            ZLIB::ZLIB
     )
 endif()
 
@@ -179,8 +185,7 @@ set_target_properties(telnetpp
 target_include_directories(telnetpp
     PUBLIC
         $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
-        $<INSTALL_INTERFACE:include/telnetpp-${TELNETPP_VERSION}>
-        "${Boost_INCLUDE_DIRS}"
+        $<INSTALL_INTERFACE:include>
 )
 
 generate_export_header(telnetpp
@@ -197,17 +202,19 @@ install(
         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(
@@ -221,7 +228,7 @@ install(
     EXPORT
         telnetpp-config
     DESTINATION
-        lib/telnetpp-${TELNETPP_VERSION}
+        share/telnetpp
 )
 
 include(CMakePackageConfigHelpers)
@@ -236,7 +243,7 @@ install(
     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
index 2362fac..8710d36 100644
--- 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>
+#include <gsl/gsl-lite.hpp>
 #include <string>
 #include <cstdint>
 
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>