diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index d1a9a10..46b67e4 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -52,6 +52,7 @@ CHECK_INCLUDE_FILES( linux/stat.h HAVE_LINUXSTAT_H) CHECK_INCLUDE_FILES( sys/uio.h HAVE_SYSUIO_H) CHECK_INCLUDE_FILES( termios.h HAVE_TERMIOS_H) CHECK_INCLUDE_FILES( unistd.h HAVE_UNISTD_H) +CHECK_INCLUDE_FILES( mqueue.h HAVE_MQUEUE_H) INCLUDE(CheckFunctionExists) @@ -72,6 +73,23 @@ CHECK_FUNCTION_EXISTS( strerror HAVE_FUNC_STRERROR) CHECK_FUNCTION_EXISTS( strstr HAVE_FUNC_STRSTR) CHECK_FUNCTION_EXISTS( strtol HAVE_FUNC_STRTOL) +# Message queue +find_library(RT_LIBRARY rt) +if(RT_LIBRARY) + include(CheckLibraryExists) + CHECK_LIBRARY_EXISTS( ${RT_LIBRARY} mq_open mqueue.h HAVE_FUNC_MQOPEN) + CHECK_LIBRARY_EXISTS( ${RT_LIBRARY} mq_close mqueue.h HAVE_FUNC_MQCLOSE) + CHECK_LIBRARY_EXISTS( ${RT_LIBRARY} mq_unlink mqueue.h HAVE_FUNC_MQUNLINK) + CHECK_LIBRARY_EXISTS( ${RT_LIBRARY} mq_send mqueue.h HAVE_FUNC_MQSEND) + CHECK_LIBRARY_EXISTS( ${RT_LIBRARY} mq_receive mqueue.h HAVE_FUNC_MQRECEIVE) +else() + CHECK_FUNCTION_EXISTS( mq_open HAVE_FUNC_MQOPEN) + CHECK_FUNCTION_EXISTS( mq_close HAVE_FUNC_MQCLOSE) + CHECK_FUNCTION_EXISTS( mq_unlink HAVE_FUNC_MQUNLINK) + CHECK_FUNCTION_EXISTS( mq_send HAVE_FUNC_MQSEND) + CHECK_FUNCTION_EXISTS( mq_receive HAVE_FUNC_MQRECEIVE) +endif() + if(WITH_CHECK_CONFIG_FILE) configure_file(${PROJECT_SOURCE_DIR}/cmake/config.h.cmake ${PROJECT_BINARY_DIR}/include/dlt/config.h) endif(WITH_CHECK_CONFIG_FILE) |