]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
CMake: Install liblzma.pc even with MSVC
authorLasse Collin <lasse.collin@tukaani.org>
Mon, 3 Jun 2024 14:44:50 +0000 (17:44 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Mon, 3 Jun 2024 14:44:50 +0000 (17:44 +0300)
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

index 59ecf010be99e3910f17b5e70363517825e79f68..80183b05302a053da59a7c57691334f8c8ac641e 100644 (file)
@@ -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)
 
 
 #############################################################################