From 92bbc623de1ff263ef4ed06e5a1d9967e2959033 Mon Sep 17 00:00:00 2001 From: lintao <lintao51@gmail.com> Date: Wed, 9 Sep 2020 22:06:36 +0800 Subject: [PATCH] WIP: Fixed the hard-code problem. --- Utilities/KalDet/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Utilities/KalDet/CMakeLists.txt b/Utilities/KalDet/CMakeLists.txt index 52b96cf2..a5bac19d 100644 --- a/Utilities/KalDet/CMakeLists.txt +++ b/Utilities/KalDet/CMakeLists.txt @@ -31,7 +31,14 @@ FOREACH( lib_input_dir ${lib_input_dirs} ) LIST( APPEND ROOT_DICT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/${lib_input_dir} ) ENDFOREACH() -LIST( APPEND ROOT_DICT_INCLUDE_DIRS /workfs/bes/fucd/Key4hep/CEPCSW/Utilities/KalTest ) +# LIST( APPEND ROOT_DICT_INCLUDE_DIRS /workfs/bes/fucd/Key4hep/CEPCSW/Utilities/KalTest ) +# get the include directory of KalTest +get_target_property(to_incl KalTestLib SOURCE_DIR) +if (to_incl) + LIST( APPEND ROOT_DICT_INCLUDE_DIRS ${to_incl}) +else() + message(FATAL_ERROR "Failed to get the source dir for package KalTestLib") +endif() #MESSAGE( STATUS "ROOT_DICT_INCLUDE_DIRS: ${ROOT_DICT_INCLUDE_DIRS}" ) -- GitLab