From 352dbd52e2d34ddae4052254189e76f022846a38 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Wed, 23 Jul 2014 19:08:30 +0200 Subject: [PATCH] winpr/comm: don't build on apple Since code is only defined on linux building comm causes /usr/bin/ranlib to warn about empty objects and the test doesn't build at all on apple. --- winpr/libwinpr/comm/CMakeLists.txt | 32 ++++++++++++++++-------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/winpr/libwinpr/comm/CMakeLists.txt b/winpr/libwinpr/comm/CMakeLists.txt index 58ff2fe1d..0fe9f566f 100644 --- a/winpr/libwinpr/comm/CMakeLists.txt +++ b/winpr/libwinpr/comm/CMakeLists.txt @@ -18,21 +18,23 @@ set(MODULE_NAME "winpr-comm") set(MODULE_PREFIX "WINPR_COMM") -set(${MODULE_PREFIX}_SRCS - comm.c - comm.h - comm_io.c - comm_ioctl.c - comm_ioctl.h - comm_serial_sys.c - comm_serial_sys.h - comm_sercx_sys.c - comm_sercx_sys.h - comm_sercx2_sys.c - comm_sercx2_sys.h) +if(UNIX AND NOT WIN32 AND NOT APPLE) + set(${MODULE_PREFIX}_SRCS + comm.c + comm.h + comm_io.c + comm_ioctl.c + comm_ioctl.h + comm_serial_sys.c + comm_serial_sys.h + comm_sercx_sys.c + comm_sercx_sys.h + comm_sercx2_sys.c + comm_sercx2_sys.h) -winpr_module_add(${${MODULE_PREFIX}_SRCS}) + winpr_module_add(${${MODULE_PREFIX}_SRCS}) -if(BUILD_TESTING AND UNIX AND NOT WIN32) - add_subdirectory(test) + if(BUILD_TESTING) + add_subdirectory(test) + endif() endif()