Do not export symbols from private "/common/utils"
Libraries and applications (libdnf5.so, dnf5, dnf5daemon-client...) use (and statically link) private utilities from "/common/utils". And they also publicly export the symbols of these private utilities. This modification hides the symbols of utilities linked from "/common/utils".
This commit is contained in:
parent
62b8503e52
commit
9b8f32dbb6
|
@ -4,6 +4,7 @@ include_directories(.)
|
||||||
|
|
||||||
add_library(common OBJECT ${COMMON_SOURCES})
|
add_library(common OBJECT ${COMMON_SOURCES})
|
||||||
set_property(TARGET common PROPERTY POSITION_INDEPENDENT_CODE ON)
|
set_property(TARGET common PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||||
|
set_target_properties(common PROPERTIES C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden)
|
||||||
|
|
||||||
# required by clang
|
# required by clang
|
||||||
target_link_libraries(common PUBLIC stdc++)
|
target_link_libraries(common PUBLIC stdc++)
|
||||||
|
|
|
@ -33,6 +33,8 @@ install(TARGETS libdnf5-cli LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
|
||||||
|
|
||||||
# link libraries and set pkg-config requires
|
# link libraries and set pkg-config requires
|
||||||
|
|
||||||
|
target_link_libraries(libdnf5-cli PRIVATE common)
|
||||||
|
|
||||||
target_link_libraries(libdnf5-cli PUBLIC libdnf5)
|
target_link_libraries(libdnf5-cli PUBLIC libdnf5)
|
||||||
|
|
||||||
pkg_check_modules(LIBFMT REQUIRED fmt)
|
pkg_check_modules(LIBFMT REQUIRED fmt)
|
||||||
|
|
Loading…
Reference in New Issue