[cmake] correctly link WinPR to FreeRDP

This commit is contained in:
akallabeth 2023-08-31 10:53:49 +02:00 committed by akallabeth
parent 285add3a85
commit 539546a6be

View File

@ -387,6 +387,8 @@ endif()
# /primitives
list(APPEND LIBFREERDP_PUB_LIBS winpr)
list(REMOVE_DUPLICATES LIBFREERDP_DEFINITIONS)
list(REMOVE_DUPLICATES LIBFREERDP_LIBS)
list(REMOVE_DUPLICATES LIBFREERDP_PUB_LIBS)
@ -421,9 +423,7 @@ endif()
target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
target_link_libraries(${MODULE_NAME} PRIVATE ${LIBFREERDP_LIBS})
if (LIBFREERDP_PUB_LIBS)
target_link_libraries(${MODULE_NAME} PUBLIC ${LIBFREERDP_PUB_LIBS} winpr)
endif()
target_link_libraries(${MODULE_NAME} PUBLIC ${LIBFREERDP_PUB_LIBS})
install(TARGETS ${MODULE_NAME} COMPONENT libraries EXPORT FreeRDPTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}