mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 13:32:50 +08:00
[liblzma] Patch headers to fix https://github.com/OpenTTD/OpenTTD/pull/7614 (#7226)
* [liblzma] Patch headers to fix https://github.com/OpenTTD/OpenTTD/pull/7614 * Bump the version in CONTROL file Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com> Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
This commit is contained in:
parent
a2d3782198
commit
b93fa7a1b4
@ -1,4 +1,5 @@
|
||||
Source: liblzma
|
||||
Version: 5.2.5
|
||||
Port-Version: 1
|
||||
Homepage: https://github.com/xz-mirror/xz
|
||||
Description: Compression library with an API similar to that of zlib.
|
||||
|
@ -68,9 +68,13 @@ set(LZMA_FOUND TRUE CACHE BOOL \"\")
|
||||
set(LIBLZMA_FOUND TRUE CACHE BOOL \"\")
|
||||
")
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(APPEND ${CURRENT_PACKAGES_DIR}/share/liblzma/LibLZMAConfig.cmake "add_definitions(-DLZMA_API_STATIC)")
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/include/lzma.h _contents)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
string(REPLACE "defined(LZMA_API_STATIC)" "1" _contents "${_contents}")
|
||||
else()
|
||||
string(REPLACE "defined(LZMA_API_STATIC)" "0" _contents "${_contents}")
|
||||
endif()
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/lzma.h "${_contents}")
|
||||
|
||||
if (VCPKG_BUILD_TYPE STREQUAL debug)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
Loading…
Reference in New Issue
Block a user