From a2cf58f6cb939a4280965ce02e88cc9496e14455 Mon Sep 17 00:00:00 2001 From: Jiakun Yan Date: Thu, 7 Nov 2024 16:27:49 -0600 Subject: [PATCH] improve LCIConfig.cmake.in PACKAGE_CMAKE_INSTALL_XXX can be changed by find_dependency --- LCIConfig.cmake.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/LCIConfig.cmake.in b/LCIConfig.cmake.in index d831ed8a..257b0349 100644 --- a/LCIConfig.cmake.in +++ b/LCIConfig.cmake.in @@ -3,15 +3,15 @@ if (NOT TARGET LCI::LCT) @PACKAGE_INIT@ LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/LCI") - include(CMakeFindDependencyMacro) + set_and_check(LCT_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") + set_and_check(LCT_SHARED_LIBRARY "@PACKAGE_CMAKE_INSTALL_LIBDIR@/@CMAKE_SHARED_LIBRARY_PREFIX@lct@CMAKE_SHARED_LIBRARY_SUFFIX@") + + include(CMakeFindDependencyMacro) set(CMAKE_THREAD_PREFER_PTHREAD TRUE) set(THREADS_PREFER_PTHREAD_FLAG TRUE) find_dependency(Threads) - set_and_check(LCT_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") - set_and_check(LCT_SHARED_LIBRARY "@PACKAGE_CMAKE_INSTALL_LIBDIR@/@CMAKE_SHARED_LIBRARY_PREFIX@lct@CMAKE_SHARED_LIBRARY_SUFFIX@") - add_library(LCI::LCT SHARED IMPORTED) set_target_properties(LCI::LCT PROPERTIES IMPORTED_LOCATION ${LCT_SHARED_LIBRARY}