Commit 454b54c2 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Add liblzma to the external deps

On windows we use the official binary.
parent e079849f
......@@ -169,6 +169,7 @@ if (MINGW)
add_subdirectory( ext_patch )
add_subdirectory( ext_png2ico )
endif ()
add_subdirectory( ext_lzma )
add_subdirectory( ext_iconv )
add_subdirectory( ext_gettext )
add_subdirectory( ext_zlib )
......
SET(PREFIX_ext_lmza "${EXTPREFIX}" )
if (MINGW)
if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") # 64 bits
ExternalProject_Add( ext_lmza
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://tukaani.org/xz/xz-5.2.4-windows.zip
URL_MD5 3a4467e74e1eafb89b517aae7044e46c
CONFIGURE_COMMAND ""
BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying 64-bit liblzma.dll
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin_x86-64/liblzma.dll ${PREFIX_ext_lzma}/bin/
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin_x86-64/liblzma.a ${PREFIX_ext_lzma}/bin/
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/filter.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/hardware.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/index_hash.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/version.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/delta.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/index.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/check.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/stream_flags.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/bcj.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/lzma12.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/block.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/base.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/container.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/vli.h ${PREFIX_ext_lzma}/include
INSTALL_DIR ${PREFIX_ext_lmza}
UPDATE_COMMAND ""
)
else() # 32 bits
ExternalProject_Add( ext_lmza
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://tukaani.org/xz/xz-5.2.4-windows.zip
URL_MD5 3a4467e74e1eafb89b517aae7044e46c
INSTALL_DIR ${PREFIX_ext_lmza}
CONFIGURE_COMMAND ""
BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying 32-bit liblzma.dll
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin_i686-sse2/liblzma.dll ${PREFIX_ext_lzma}/bin/
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/bin_i686-sse2/liblzma.a ${PREFIX_ext_lzma}/bin/
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/filter.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/hardware.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/index_hash.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/version.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/delta.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/index.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/check.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/stream_flags.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/bcj.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/lzma12.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/block.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/base.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/container.h ${PREFIX_ext_lzma}/include
COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/include/lzma/vli.h ${PREFIX_ext_lzma}/include
UPDATE_COMMAND ""
)
endif()
else ()
ExternalProject_Add( ext_lmza
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://tukaani.org/xz/xz-5.2.3.tar.xz
URL_MD5 60fb79cab777e3f71ca43d298adacbd5
INSTALL_DIR ${PREFIX_ext_lmza}
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/iconv.diff
CONFIGURE_COMMAND ./configure --prefix=${PREFIX_ext_lmza} --disable-xz --disable-xzdec --disable-lzmadec --disable-lzmainfo --disable-lzma-links --disable-scripts --disable-doc --disable-static --enable-shared ${GLOBAL_AUTOMAKE_PROFILE}
BUILD_COMMAND make
INSTALL_COMMAND make install
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
)
endif ()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment