neovim/cmake.deps/cmake/BuildMsgpack.cmake
dundargoc f4d83ac1e2
build: consistently use the provided option paths
We provide options such as "DEPS_BIN_DIR" for the user to set, but only
sometimes use them. This makes binaries and other files to be spread out
if the user defines a custom DEPS_BIN_DIR location.
2023-03-05 15:21:46 +01:00

18 lines
626 B
CMake

ExternalProject_Add(msgpack
URL ${MSGPACK_URL}
URL_HASH SHA256=${MSGPACK_SHA256}
DOWNLOAD_NO_PROGRESS TRUE
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/msgpack
CMAKE_ARGS ${DEPS_CMAKE_ARGS}
-D MSGPACK_BUILD_TESTS=OFF
-D MSGPACK_BUILD_EXAMPLES=OFF
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
if (NOT MSVC)
add_custom_target(clean_shared_libraries_msgpack ALL
COMMAND ${CMAKE_COMMAND}
-D REMOVE_FILE_GLOB=${DEPS_LIB_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}*${CMAKE_SHARED_LIBRARY_SUFFIX}*
-P ${PROJECT_SOURCE_DIR}/cmake/RemoveFiles.cmake)
add_dependencies(clean_shared_libraries_msgpack msgpack)
endif()