diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index a3f0de058..d2db89030 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -4,6 +4,7 @@ include_directories(.) add_library(common OBJECT ${COMMON_SOURCES}) 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 target_link_libraries(common PUBLIC stdc++) diff --git a/libdnf5-cli/CMakeLists.txt b/libdnf5-cli/CMakeLists.txt index 0874fcf5b..2367fc406 100644 --- a/libdnf5-cli/CMakeLists.txt +++ b/libdnf5-cli/CMakeLists.txt @@ -33,6 +33,8 @@ install(TARGETS libdnf5-cli LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) # link libraries and set pkg-config requires +target_link_libraries(libdnf5-cli PRIVATE common) + target_link_libraries(libdnf5-cli PUBLIC libdnf5) pkg_check_modules(LIBFMT REQUIRED fmt)