neovim/third-party/cmake/BuildMsgpack.cmake
2015-03-09 13:24:21 +00:00

25 lines
959 B
CMake

ExternalProject_Add(msgpack
PREFIX ${DEPS_BUILD_DIR}
URL ${MSGPACK_URL}
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/msgpack
DOWNLOAD_COMMAND ${CMAKE_COMMAND}
-DPREFIX=${DEPS_BUILD_DIR}
-DDOWNLOAD_DIR=${DEPS_DOWNLOAD_DIR}/msgpack
-DURL=${MSGPACK_URL}
-DEXPECTED_SHA256=${MSGPACK_SHA256}
-DTARGET=msgpack
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadAndExtractFile.cmake
CONFIGURE_COMMAND cmake ${DEPS_BUILD_DIR}/src/msgpack
-DMSGPACK_ENABLE_CXX=OFF
-DMSGPACK_BUILD_TESTS=OFF
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
"-DCMAKE_C_FLAGS:STRING=${CMAKE_C_COMPILER_ARG1} -fPIC"
BUILD_COMMAND ${CMAKE_COMMAND} --build .
INSTALL_COMMAND ${CMAKE_COMMAND}
-DREMOVE_FILE_GLOB=${DEPS_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}msgpack*${CMAKE_SHARED_LIBRARY_SUFFIX}*
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/InstallMsgpack.cmake)
list(APPEND THIRD_PARTY_DEPS msgpack)