Commit b74292c6 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 0fa4c3c9
...@@ -24,17 +24,32 @@ else() ...@@ -24,17 +24,32 @@ else()
list(APPEND xz_configure_opts --enable-debug) list(APPEND xz_configure_opts --enable-debug)
endif() endif()
ExternalProject_Add(build_lzma if (CMAKE_GENERATOR STREQUAL "Ninja")
PREFIX xz ExternalProject_Add(ep_lzma
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xz-4.999.9beta PREFIX xz
CONFIGURE_COMMAND SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xz-4.999.9beta
${CMAKE_CURRENT_SOURCE_DIR}/xz-4.999.9beta/configure ${xz_configure_opts} CONFIGURE_COMMAND
"--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz" ${CMAKE_CURRENT_SOURCE_DIR}/xz-4.999.9beta/configure ${xz_configure_opts}
BUILD_COMMAND "--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz"
$(MAKE) -C src/liblzma BUILD_COMMAND
INSTALL_COMMAND make -C src/liblzma
$(MAKE) -C src/liblzma install 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
${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
)
endif ()
add_custom_target(build_lzma DEPENDS ep_lzma)
add_library(lzma STATIC IMPORTED) add_library(lzma STATIC IMPORTED)
set_target_properties(lzma PROPERTIES IMPORTED_LOCATION 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