From ee344aa6c91f440d5315251c5fb0d075f839721e Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 15 Feb 2021 15:06:05 -0500 Subject: [PATCH] Modules expose transitive link dependencies... ... which will simplify CMakeLists when modules depend on other modules --- cmake-proxies/cmake-modules/AudacityFunctions.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake-proxies/cmake-modules/AudacityFunctions.cmake b/cmake-proxies/cmake-modules/AudacityFunctions.cmake index d22dfdca0..036464c7d 100644 --- a/cmake-proxies/cmake-modules/AudacityFunctions.cmake +++ b/cmake-proxies/cmake-modules/AudacityFunctions.cmake @@ -229,7 +229,7 @@ function( audacity_module NAME SOURCES IMPORT_TARGETS ) # compute LIBRARIES - set( LIBRARIES PRIVATE ) + set( LIBRARIES ) foreach( IMPORT ${IMPORT_TARGETS} ) list( APPEND LIBRARIES "${IMPORT}" ) endforeach() @@ -243,12 +243,11 @@ function( audacity_module NAME SOURCES IMPORT_TARGETS ) # list( TRANSFORM SOURCES PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/" ) - list( PREPEND SOURCES "PRIVATE" ) organize_source( "${TARGET_ROOT}" "" "${SOURCES}" ) target_sources( ${TARGET} PRIVATE ${SOURCES} ) target_compile_definitions( ${TARGET} PRIVATE ${ADDITIONAL_DEFINES} ) target_include_directories( ${TARGET} PUBLIC ${TARGET_ROOT} ) target_link_options( ${TARGET} PRIVATE ${LOPTS} ) - target_link_libraries( ${TARGET} PRIVATE ${LIBRARIES} ) + target_link_libraries( ${TARGET} PUBLIC ${LIBRARIES} ) endfunction()