diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt index d59001c0f..a89f8d716 100644 --- a/src/cpp/CMakeLists.txt +++ b/src/cpp/CMakeLists.txt @@ -264,7 +264,7 @@ target_include_directories(lcio PUBLIC $ ) -TARGET_LINK_LIBRARIES( lcio ${CMAKE_THREAD_LIBS_INIT} ) +TARGET_LINK_LIBRARIES( lcio PUBLIC ${CMAKE_THREAD_LIBS_INIT} ) TARGET_LINK_LIBRARIES( lcio PRIVATE SIO::sio ) ADD_CUSTOM_TARGET( lib DEPENDS lcio ) @@ -443,7 +443,7 @@ MACRO( ADD_LCIO_EXAMPLE file ) ADD_DEPENDENCIES( examples bin_${file} ) #MESSAGE( STATUS "ADD_LCIO_EXAMPLE: ${file} ./src/EXAMPLE/${file}.cc" ) SET_TARGET_PROPERTIES( bin_${file} PROPERTIES OUTPUT_NAME ${file} ) - TARGET_LINK_LIBRARIES( bin_${file} lcio ) + TARGET_LINK_LIBRARIES( bin_${file} PRIVATE lcio ) INSTALL( TARGETS bin_${file} DESTINATION "${CMAKE_INSTALL_BINDIR}" ) ENDMACRO() @@ -468,7 +468,7 @@ ADD_LCIO_EXAMPLE( lcio_parallel_processing ) IF( BUILD_ROOTDICT ) ADD_LCIO_EXAMPLE( lcio_io_benchmark ) - TARGET_LINK_LIBRARIES( bin_lcio_io_benchmark ${ROOT_LIBRARIES} ) + TARGET_LINK_LIBRARIES( bin_lcio_io_benchmark PRIVATE ${ROOT_LIBRARIES} ) ENDIF() IF( BUILD_LCIO_EXAMPLES )