[pkg-config] add private optional link libraries

This commit is contained in:
akallabeth 2024-03-14 10:21:38 +01:00 committed by akallabeth
parent 9a00f1ed4d
commit c591c2cd26
4 changed files with 10 additions and 2 deletions

View File

@ -92,6 +92,11 @@ if(WITH_CLIENT)
endforeach()
endif()
if (WITH_FUSE)
list(APPEND FREERDP_CLIENT_PC_PRIVATE_LIBS "-lfuse3")
endif()
list(JOIN FREERDP_CLIENT_PC_PRIVATE_LIBS " " FREERDP_CLIENT_PC_PRIVATE_LIBS)
include(pkg-config-install-prefix)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp-client.pc.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp-client${FREERDP_VERSION_MAJOR}.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp-client${FREERDP_VERSION_MAJOR}.pc DESTINATION ${PKG_CONFIG_PC_INSTALL_DIR})

View File

@ -11,5 +11,5 @@ Version: @FREERDP_VERSION@
Requires:
Requires.private: @WINPR_PKG_CONFIG_FILENAME@ freerdp@FREERDP_VERSION_MAJOR@
Libs: -L${libdir} ${libs}
Libs.private: -ldl -lpthread
Libs.private: -ldl -lpthread @FREERDP_CLIENT_PC_PRIVATE_LIBS@
Cflags: -I${includedir}

View File

@ -480,10 +480,13 @@ include(pkg-config-install-prefix)
set(FREERDP_REQUIRES_PRIVATE "")
if(cJSON_FOUND)
string(APPEND FREERDP_REQUIRES_PRIVATE " libcjson")
list(APPEND FREERDP_PC_PRIVATE_LIBS "-lcjson")
endif()
if(WITH_SMARTCARD_EMULATE)
string(APPEND FREERDP_REQUIRES_PRIVATE " zlib")
list(APPEND FREERDP_PC_PRIVATE_LIBS "-lz")
endif()
list(JOIN FREERDP_PC_PRIVATE_LIBS " " FREERDP_PC_PRIVATE_LIBS)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp${FREERDP_VERSION_MAJOR}.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp${FREERDP_VERSION_MAJOR}.pc DESTINATION ${PKG_CONFIG_PC_INSTALL_DIR})

View File

@ -16,5 +16,5 @@ Version: @FREERDP_VERSION@
Requires:
Requires.private: winpr@FREERDP_API_VERSION@ @FREERDP_REQUIRES_PRIVATE@
Libs: -L${libdir} ${libs}
Libs.private: -ldl -lpthread
Libs.private: -ldl -lpthread @FREERDP_PC_PRIVATE_LIBS@
Cflags: -I${includedir}