vcpkg/ports/libpcap/install-pc-on-msvc.patch
NancyLi1013 5b2ac1fed8
[libhsplasma/libpcap/lv2/libcrafter] Update to the latest version (#19965)
* [libhsplasma/libpcap/lv2] Update to the latest version

* [libpcap] Remove unused comments

* Update version files

* [lv2] Fix usage
[libpcap] Update ci.baseline.txt

* [libhsplasma] Remove x64-windows-static=fail from ci.baseline.txt

* [libcrafter] Update to 1.0

* [libcrafter] Add vcpkg.json

* Update version files

* Add CRT check for libpcap and update version as versin-semver for libpcap

* Update version files

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2021-09-08 07:45:37 -07:00

38 lines
1.7 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b83fbbd..2f675d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2678,9 +2678,12 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap.h DESTINATION include)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-bpf.h DESTINATION include)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-namedb.h DESTINATION include)
-# On UN*X, and on Windows when not using MSVC, generate libpcap.pc and
-# pcap-config and process man pages and arrange that they be installed.
-if(NOT MSVC)
+# Generate libpcap.pc
+if(BUILD_SHARED_LIBS)
+ set(PACKAGE_NAME ${LIBRARY_NAME})
+else()
+ set(PACKAGE_NAME pcap)
+endif()
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}")
set(includedir "\${prefix}/include")
@@ -2715,10 +2718,14 @@ if(NOT MSVC)
foreach(LIB ${PCAP_LINK_LIBRARIES})
set(LIBS "${LIBS} -l${LIB}")
endforeach(LIB)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcap-config.in ${CMAKE_CURRENT_BINARY_DIR}/pcap-config @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpcap.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc @ONLY)
- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION bin)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc DESTINATION lib/pkgconfig)
+
+# On UN*X, and on Windows when not using MSVC, generate libpcap.pc and
+# pcap-config and process man pages and arrange that they be installed.
+if(NOT MSVC)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcap-config.in ${CMAKE_CURRENT_BINARY_DIR}/pcap-config @ONLY)
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION bin)
#
# Man pages.