Commit ed84158c authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4814] make ninja work with cmake and depend on lzma properly

git-svn-id: file:///svn/toku/tokudb@43208 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4967e2ca
......@@ -24,7 +24,20 @@ else()
list(APPEND xz_configure_opts --enable-debug)
endif()
ExternalProject_Add(build_lzma
if (CMAKE_GENERATOR STREQUAL "Ninja")
ExternalProject_Add(ep_lzma
PREFIX xz
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xz-4.999.9beta
CONFIGURE_COMMAND
${CMAKE_CURRENT_SOURCE_DIR}/xz-4.999.9beta/configure ${xz_configure_opts}
"--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz"
BUILD_COMMAND
make -C src/liblzma
INSTALL_COMMAND
make -C src/liblzma install
)
else ()
ExternalProject_Add(ep_lzma
PREFIX xz
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xz-4.999.9beta
CONFIGURE_COMMAND
......@@ -35,6 +48,8 @@ ExternalProject_Add(build_lzma
INSTALL_COMMAND
$(MAKE) -C src/liblzma install
)
endif ()
add_custom_target(build_lzma DEPENDS ep_lzma)
add_library(lzma STATIC IMPORTED)
set_target_properties(lzma PROPERTIES IMPORTED_LOCATION
......
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