Skip to content

Commit 0caa3a5

Browse files
authored
Link libpcap statically
1 parent 2d68361 commit 0caa3a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/c/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
22

3+
set(CMAKE_C_COMPILER "clang")
4+
35
project(pcap-native LANGUAGES C)
46

57
set(CMAKE_C_STANDARD 99)
68
set(CMAKE_C_STANDARD_REQUIRED ON)
79

810
add_subdirectory(libpcap)
9-
set_property(TARGET pcap PROPERTY SOVERSION)
10-
set_property(TARGET pcap PROPERTY VERSION)
1111

1212
set(LIB_OUTPUT_DIR ${CMAKE_BINARY_DIR}/lib)
1313
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR})
@@ -39,4 +39,4 @@ set(CMAKE_C_FLAGS_RELEASE "-O2 -Wall -Werror")
3939
include_directories(include)
4040
file(GLOB SOURCES src/*.c)
4141
add_library(pcap-native SHARED ${SOURCES})
42-
target_link_libraries(pcap-native pcap)
42+
target_link_libraries(pcap-native pcap_static -fuse-ld=lld)

0 commit comments

Comments
 (0)