Skip to content

Commit

Permalink
Fix building on Apple machines (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
v-kiniv authored Sep 6, 2022
1 parent fe24d1d commit 69541cd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 69541cd

Please sign in to comment.