Skip to content

Commit

Permalink
[vcpkg-tool] Fix undefined symbol posix_spawn for Android build. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
funsafe-ptr committed Jun 21, 2023
1 parent 5c1c6b0 commit 5443807
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,14 @@ elseif(NOT MSVC)
target_compile_options(vcpkglib PRIVATE -include "${CMAKE_CURRENT_SOURCE_DIR}/include/pch.h")
endif()

if(ANDROID)
if((CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_VERSION LESS "28")
OR CMAKE_SYSTEM_NAME STREQUAL "Linux")
# pkg install libandroid-spawn
target_link_libraries(vcpkglib PRIVATE android-spawn)
endif()
endif()

if(MINGW)
target_compile_definitions(vcpkglib
PUBLIC
Expand Down

0 comments on commit 5443807

Please sign in to comment.