1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:17:45 +00:00

Everywhere: Mark dependencies of most targets as PRIVATE

Otherwise, we end up propagating those dependencies into targets that
link against that library, which creates unnecessary link-time
dependencies.

Also included are changes to readd now missing dependencies to tools
that actually need them.
This commit is contained in:
Tim Schumacher 2022-10-21 21:43:56 +02:00 committed by Linus Groh
parent 678db534ff
commit ce2f1b845f
174 changed files with 386 additions and 384 deletions

View file

@ -3,7 +3,7 @@ macro(add_dlopen_lib NAME FUNCTION)
add_library(${NAME} SHARED Dynlib.cpp)
target_compile_definitions(${NAME} PRIVATE -DFUNCTION=${FUNCTION})
# LibLine is not special, just an "external" dependency
target_link_libraries(${NAME} LibLine)
target_link_libraries(${NAME} PRIVATE LibLine)
serenity_set_implicit_links(${NAME})
# Avoid execution by the test runner
install(TARGETS ${NAME}
@ -16,7 +16,7 @@ add_dlopen_lib(DynlibB dynlibb_function)
add_dlopen_lib(DynlibC dynlibc_function)
set(CMAKE_INSTALL_RPATH $ORIGIN)
add_dlopen_lib(DynlibD dynlibd_function)
target_link_libraries(DynlibD DynlibC)
target_link_libraries(DynlibD PRIVATE DynlibC)
unset(CMAKE_INSTALL_RPATH)
set(TEST_SOURCES