Skip to content

Commit

Permalink
CMake: Install liblzma.pc even with MSVC
Browse files Browse the repository at this point in the history
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
microsoft/vcpkg#39024 (comment)
  • Loading branch information
Larhzu committed Jun 3, 2024
1 parent 35f8649 commit afa938e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)


#############################################################################
Expand Down

0 comments on commit afa938e

Please sign in to comment.