From 5fa54a2dc09ac1080992e62e9aab7985c8f3ee7b Mon Sep 17 00:00:00 2001 From: John Szakmeister Date: Sun, 14 Sep 2014 04:51:20 -0400 Subject: third-party: avoid using `rm` in the install command Also, the command was removing only .so versions of the library, and not the the `.dylib` under Mac OS X, and in a way that it would fail if the files weren't present. Instead, let's delegate to a CMake script--to get the portability--and use a glob to detect and remove the shared versions of the library. Hopefully, this will become unnecessary as msgpack's build becomes more full-featured, and we can just tell it to build the static version instead. --- third-party/cmake/InstallMsgpack.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 third-party/cmake/InstallMsgpack.cmake (limited to 'third-party/cmake/InstallMsgpack.cmake') diff --git a/third-party/cmake/InstallMsgpack.cmake b/third-party/cmake/InstallMsgpack.cmake new file mode 100644 index 0000000000..d5e5d7e816 --- /dev/null +++ b/third-party/cmake/InstallMsgpack.cmake @@ -0,0 +1,12 @@ +execute_process( + COMMAND ${MAKE_PRG} install + RESULT_VARIABLE res) + +if(NOT res EQUAL 0) + message(FATAL_ERROR "Installing msgpack failed.") +endif() + +file(GLOB FILES_TO_REMOVE ${REMOVE_FILE_GLOB}) +if(FILES_TO_REMOVE) + file(REMOVE ${FILES_TO_REMOVE}) +endif() -- cgit