Skip to content

Commit

Permalink
[libtins] Fix include header file cannot be found (microsoft#34461)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimwang118 authored and clementperon committed Oct 16, 2023
1 parent db8aa42 commit 007d462
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
22 changes: 22 additions & 0 deletions ports/libtins/fix_include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 94bc8bf..14a15e9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -211,6 +211,7 @@ ADD_LIBRARY(
)

TARGET_LINK_LIBRARIES(tins ${PCAP_LIBRARY} ${OPENSSL_LIBRARIES} ${LIBTINS_OS_LIBS})
+target_include_directories(tins PUBLIC $<INSTALL_INTERFACE:include>)

SET_TARGET_PROPERTIES(tins PROPERTIES OUTPUT_NAME tins)
SET_TARGET_PROPERTIES(tins PROPERTIES VERSION ${LIBTINS_VERSION} SOVERSION ${LIBTINS_VERSION} )
diff --git a/libtins.pc.in b/libtins.pc.in
index e9a5c29..c7e3f6c 100644
--- a/libtins.pc.in
+++ b/libtins.pc.in
@@ -7,4 +7,4 @@ Name: libtins
Description: C++ packet crafting, sniffing and interpretation library.
Version: @pkgconfig_version@
Libs: -L${libdir} -ltins
-Cflags: -I${includedir}/tins
+Cflags: -I${includedir}
1 change: 1 addition & 0 deletions ports/libtins/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ vcpkg_from_github(
PATCHES
fix-source-writes.patch
find-pcap_static.patch
fix_include.patch
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBTINS_BUILD_SHARED)
Expand Down
2 changes: 1 addition & 1 deletion ports/libtins/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libtins",
"version": "4.3",
"port-version": 6,
"port-version": 7,
"description": "High-level, multiplatform C++ network packet sniffing and crafting library",
"license": "BSD-2-Clause",
"supports": "!uwp",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4778,7 +4778,7 @@
},
"libtins": {
"baseline": "4.3",
"port-version": 6
"port-version": 7
},
"libtomcrypt": {
"baseline": "1.18.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libtins.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "30fbfd14d90e9aedac77f8272135a7e51444b01f",
"version": "4.3",
"port-version": 7
},
{
"git-tree": "4a1470befea5c6b5c7418f9b85f37d6f8733d7d5",
"version": "4.3",
Expand Down

0 comments on commit 007d462

Please sign in to comment.