diff --git a/cmake/CEPCSWDependencies.cmake b/cmake/CEPCSWDependencies.cmake index d0bafcede1c74738d9724edc3bb0aa770bd968a6..bcac3afdfe62151d01f333f5f8183cd02504bf0c 100644 --- a/cmake/CEPCSWDependencies.cmake +++ b/cmake/CEPCSWDependencies.cmake @@ -36,4 +36,11 @@ find_package(PandoraSDK REQUIRED) find_package(podio REQUIRED) find_package(ROOT COMPONENTS EG Graf Graf3d Gpad MathCore Net RIO Tree TreePlayer REQUIRED) find_package(GenFit) -find_package(BelleIICKF) + +if (CEPCSW_USE_SYSTEM_CKF_BELLE) + message("Try to use an existing installation of CKF BELLE") + find_package(BelleIICKF) +else() + message("Try to use an internal installation of CKF BELLE") + include("${CMAKE_CURRENT_LIST_DIR}/internal_ckf.cmake") +endif() diff --git a/cmake/CEPCSWOptions.cmake b/cmake/CEPCSWOptions.cmake index 4db3c7f8412fb4bb638a5584648de4c3e5832b30..32e00142e62ddd467f0cb89b23b8cbecb69b2e25 100644 --- a/cmake/CEPCSWOptions.cmake +++ b/cmake/CEPCSWOptions.cmake @@ -5,21 +5,6 @@ ############################################################################## option(CEPCSW_USE_SYSTEM_CKF_BELLE - "Use the existing installation of CKF BELLE" - TRUE) + "Use the existing installation of CKF BELLE. Otherwise the internal version will be used." + FALSE) -if (CEPCSW_USE_SYSTEM_CKF_BELLE) - message("Try to use an existing installation of CKF BELLE") -else() - message("Try to use an internal installation of CKF BELLE") - - include(FetchContent) - - FetchContent_Declare( - ckf_belle - GIT_REPOSITORY https://code.ihep.ac.cn/cepc/externals/ckf_belle.git - GIT_TAG 11624a552a9d2382bba3ce9ed9b0cf2d05a89b6e - ) - - FetchContent_MakeAvailable(ckf_belle) -endif() diff --git a/cmake/internal_ckf.cmake b/cmake/internal_ckf.cmake new file mode 100644 index 0000000000000000000000000000000000000000..f160a6a090cb8472ed4d95e597a5f5b8f9851127 --- /dev/null +++ b/cmake/internal_ckf.cmake @@ -0,0 +1,10 @@ + +include(FetchContent) + +FetchContent_Declare( + ckf_belle + GIT_REPOSITORY https://code.ihep.ac.cn/cepc/externals/ckf_belle.git + GIT_TAG 72707998dfc4f7dbe4a91f995d03649cb217474d + ) + +FetchContent_MakeAvailable(ckf_belle)