c wrapper: link statically when required

This commit is contained in:
Adrien Béraud committed 2019-12-05 18:35:43 -05:00
1 parent f331f39c77
commit 4ce78bdb4d
1 file changed
+6 -1
+6 -1
View File
@@ -322,7 +322,12 @@ if (OPENDHT_C)
c/opendht_c.h
)
target_compile_definitions(opendht-c PRIVATE OPENDHT_C_BUILD)
target_link_libraries(opendht-c opendht)
if (OPENDHT_SHARED)
target_link_libraries(opendht-c opendht)
else ()
target_link_libraries(opendht-c opendht-static)
endif ()
# PkgConfig module
configure_file (
opendht-c.pc.in