From 69541cde5e583104fbe31017aed3e919796286cb Mon Sep 17 00:00:00 2001 From: Vasily Kiniv Date: Tue, 6 Sep 2022 15:30:17 +0300 Subject: [PATCH] Fix building on Apple machines (#30) --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60825ab7..496fca16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,11 +11,20 @@ endif() set(RPLIDAR_SDK_PATH "./sdk/") +if(APPLE) +add_compile_definitions(_MACOS) +FILE(GLOB RPLIDAR_SDK_SRC + "${RPLIDAR_SDK_PATH}/src/arch/macOS/*.cpp" + "${RPLIDAR_SDK_PATH}/src/hal/*.cpp" + "${RPLIDAR_SDK_PATH}/src/*.cpp" +) +else() FILE(GLOB RPLIDAR_SDK_SRC "${RPLIDAR_SDK_PATH}/src/arch/linux/*.cpp" "${RPLIDAR_SDK_PATH}/src/hal/*.cpp" "${RPLIDAR_SDK_PATH}/src/*.cpp" ) +endif() set(req_deps "rclcpp"