From afa938e429c1ce07d26d02999352fb014b62ff3d Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Mon, 3 Jun 2024 17:44:50 +0300 Subject: [PATCH] CMake: Install liblzma.pc even with MSVC I had misunderstood that it wouldn't be useful with MSVC. vcpkg had been installing liblzma.pc with custom rules since 2020, years before liblzma.pc support was added to CMakeLists.txt. See: https://github.com/microsoft/vcpkg/blob/eb895b95aac6fd7485373702f29f508c42a180a0/ports/liblzma/portfile.cmake https://github.com/microsoft/vcpkg/pull/39024#issuecomment-2145064670 --- CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59ecf010..80183b05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1411,11 +1411,9 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config.cmake" DESTINATION "${liblzma_INSTALL_CMAKEDIR}" COMPONENT liblzma_Development) -if(NOT MSVC) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblzma.pc" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" - COMPONENT liblzma_Development) -endif() +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblzma.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" + COMPONENT liblzma_Development) #############################################################################