cmake: Detect whether msgpack-c has MSGPACK_OBJECT_FLOAT{32,64} types

This commit is contained in:
James McCoy 2017-03-30 11:05:48 -04:00
parent d92add8a4b
commit af2ee9c5d1
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB

View File

@ -310,6 +310,21 @@ include_directories(SYSTEM ${LIBUV_INCLUDE_DIRS})
find_package(Msgpack 1.0.0 REQUIRED) find_package(Msgpack 1.0.0 REQUIRED)
include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS}) include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_INCLUDES "${MSGPACK_INCLUDE_DIRS}")
check_c_source_compiles("
#include <msgpack.h>
int
main(void)
{
return MSGPACK_OBJECT_FLOAT32;
}
" MSGPACK_HAS_FLOAT32)
if(MSGPACK_HAS_FLOAT32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVIM_MSGPACK_HAS_FLOAT32")
endif()
if(UNIX) if(UNIX)
option(FEAT_TUI "Enable the Terminal UI" ON) option(FEAT_TUI "Enable the Terminal UI" ON)
else() else()