From e909d8a74b4cf6dd953cdf77667690f7a61b9a4d Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 31 Dec 2024 15:08:29 +0100 Subject: [PATCH] Simplify cmake config chainloading (#4727) * CMake: Remove stray config file * Simplify cmake config chainloading --- CMakeLists.txt | 3 --- src/bin/CMakeLists.txt | 2 +- src/bin/msquic-config-unix.cmake.in | 5 ----- src/bin/msquic-config.cmake.in | 3 +-- 4 files changed, 2 insertions(+), 11 deletions(-) delete mode 100644 src/bin/msquic-config-unix.cmake.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 718247224d..a32b057c25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,9 +67,6 @@ elseif (UNIX) endif() message(STATUS "QUIC Platform: ${CX_PLATFORM}") -set(FILENAME_DEP_REPLACE "get_filename_component(SELF_DIR \"$\{CMAKE_CURRENT_LIST_FILE\}\" PATH)") -set(SELF_DIR "$\{SELF_DIR\}") - enable_testing() # Set the default TLS method for each platform. diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt index 6b84d4555c..352536f946 100644 --- a/src/bin/CMakeLists.txt +++ b/src/bin/CMakeLists.txt @@ -269,7 +269,7 @@ else() endif() install(FILES ${PUBLIC_HEADERS} DESTINATION include) -configure_file(msquic-config.cmake.in ${CMAKE_BINARY_DIR}/msquic-config.cmake) +configure_file(msquic-config.cmake.in ${CMAKE_BINARY_DIR}/msquic-config.cmake @ONLY) install(FILES ${CMAKE_BINARY_DIR}/msquic-config.cmake DESTINATION share/msquic) diff --git a/src/bin/msquic-config-unix.cmake.in b/src/bin/msquic-config-unix.cmake.in deleted file mode 100644 index 9292018b12..0000000000 --- a/src/bin/msquic-config-unix.cmake.in +++ /dev/null @@ -1,5 +0,0 @@ -include(CMakeFindDependencyMacro) -@FILENAME_DEP_REPLACE@ - -include(${SELF_DIR}/msquic.cmake) -include(${SELF_DIR}/msquictraceprovider.cmake) diff --git a/src/bin/msquic-config.cmake.in b/src/bin/msquic-config.cmake.in index fba676be99..e61e63feab 100644 --- a/src/bin/msquic-config.cmake.in +++ b/src/bin/msquic-config.cmake.in @@ -1,7 +1,6 @@ include(CMakeFindDependencyMacro) -@FILENAME_DEP_REPLACE@ -include(${SELF_DIR}/msquic.cmake) +include("${CMAKE_CURRENT_LIST_DIR}/msquic.cmake") foreach(_t IN ITEMS msquic msquic_platform) if(TARGET msquic::${_t} AND NOT TARGET ${_t})