diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 78f81a0..d92d73d 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,28 +1,28 @@ set(example_dir "${CMAKE_CURRENT_SOURCE_DIR}") file(GLOB source_files ${example_dir}/*.cc) if(NOT ROOT_FOUND) list(REMOVE_ITEM source_files "${example_dir}/AnalysisROOT.cc" "${example_dir}/WRapidityAnalysisROOT.cc") endif() foreach(source ${source_files}) get_filename_component(name ${source} NAME_WE) add_library(${name}_lib SHARED ${source}) set_target_properties(${name}_lib PROPERTIES OUTPUT_NAME "${name}") if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # Clang warns about `std::unique_ptr` in C linked (`extern "C"`) function # `make_analysis`. However this call is safe from C++, and we don't care # about pure C. We can ignore the warning. target_compile_options(${name}_lib PRIVATE "-Wno-return-type-c-linkage") endif() target_compile_options(${name}_lib PRIVATE "-fvisibility=hidden") ## link library target_link_libraries(${name}_lib HEJ) endforeach(source) if(ROOT_FOUND) set(ROOT_LIBS ROOT::Core ROOT::Hist ROOT::RIO) - target_link_libraries(AnalysisROOT_lib $(ROOT_LIBS)) - target_link_libraries(WRapidityAnalysisROOT_lib $(ROOT_LIBS)) + target_link_libraries(AnalysisROOT_lib ${ROOT_LIBS}) + target_link_libraries(WRapidityAnalysisROOT_lib ${ROOT_LIBS}) endif()