Skip to content

Commit

Permalink
Support building for Android with NDK. (eProsima#269)
Browse files Browse the repository at this point in the history
Treat Android as Linux.

Signed-off-by: Joel Cao <joel.cao@oppo.com>

Co-authored-by: Joel Cao <joel.cao@oppo.com>
Signed-off-by: Patrick Roncagliolo <ronca.pat@gmail.com>
  • Loading branch information
2 people authored and roncapat committed Nov 15, 2021
1 parent 603acf6 commit f1afafc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ endforeach()
# Sources
###############################################################################
# Check platform.
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
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)
Expand Down Expand Up @@ -325,7 +325,7 @@ if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND (UCLIENT_TARGET_TYPE STREQUAL "SHA
)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
find_package(Threads REQUIRED)
endif()

Expand Down Expand Up @@ -590,4 +590,4 @@ if(BUILD_DOCUMENTATION)
DESTINATION ${DOC_INSTALL_DIR}
COMPONENT documentation
)
endif()
endif()

0 comments on commit f1afafc

Please sign in to comment.