Skip to content

Commit

Permalink
Fix build for macOS (#346)
Browse files Browse the repository at this point in the history
* Add Twitter and Readthedocs shields (#307) (#308)

* Add Twitter and Readthedocs shields

Signed-off-by: Pablo Garrido <[email protected]>

* Update

Signed-off-by: Pablo Garrido <[email protected]>

* Fix

Signed-off-by: Pablo Garrido <[email protected]>
(cherry picked from commit 8b78d22)

Co-authored-by: Pablo Garrido <[email protected]>

* Fix build for macOS

- Add check for CMAKE_SYSTEM_NAME "Darwin".

Signed-off-by: Rhys Mainwaring <[email protected]>

---------

Signed-off-by: Rhys Mainwaring <[email protected]>
Co-authored-by: Pablo Garrido <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 2, 2023
1 parent 8dfd8dc commit 85d83a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
set(UCLIENT_PLATFORM_LINUX ON)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(UCLIENT_PLATFORM_WINDOWS ON)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(UCLIENT_PLATFORM_MACOS ON)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Generic")
if(PLATFORM_NAME STREQUAL "nuttx")
set(UCLIENT_PLATFORM_NUTTX ON)
Expand All @@ -160,7 +162,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Generic")
endif()
endif()

if(UCLIENT_PLATFORM_LINUX OR UCLIENT_PLATFORM_NUTTX OR UCLIENT_PLATFORM_ZEPHYR)
if(UCLIENT_PLATFORM_LINUX OR UCLIENT_PLATFORM_MACOS OR UCLIENT_PLATFORM_NUTTX OR UCLIENT_PLATFORM_ZEPHYR)
set(UCLIENT_PLATFORM_POSIX ON)
endif()

Expand Down

0 comments on commit 85d83a9

Please sign in to comment.