Skip to content

Commit

Permalink
Android & iOS curl build
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFTKP committed Dec 16, 2023
1 parent 22eb1c5 commit ba77dcd
Show file tree
Hide file tree
Showing 29 changed files with 11 additions and 11,533 deletions.
20 changes: 11 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ if (SE_PLATFORM_LINUX OR SE_PLATFORM_FREEBSD)
find_package(X11 REQUIRED)
endif()

if(NOT EMSCRIPTEN AND NOT ANDROID AND NOT IOS)
if(NOT EMSCRIPTEN)
set(WITH_APPS OFF) # don't build executable
add_subdirectory(src/openssl)

Expand All @@ -106,7 +106,9 @@ if(NOT EMSCRIPTEN AND NOT ANDROID AND NOT IOS)
set(BUILD_CURL_EXE OFF)
set(BUILD_SHARED_LIBS OFF)
set(BUILD_STATIC_LIBS ON)
set(CURL_STATIC_CRT ON)
if (WIN32)
set(CURL_STATIC_CRT ON)
endif()
# see "Important static libcurl usage note" in INSTALL.md
add_definitions(-DCURL_STATICLIB)
add_subdirectory(src/curl)
Expand Down Expand Up @@ -187,9 +189,9 @@ set(SOKOL_HEADERS
src/sokol/sokol_glue.h)
if(ANDROID)
add_definitions(-DSE_PLATFORM_ANDROID)
set(LINK_LIBS ${LINK_LIBS} GLESv3 EGL OpenSLES log android curl z)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/curl-mobile/android/${ANDROID_ABI})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/curl-mobile/android/include)
set(LINK_LIBS ${LINK_LIBS} GLESv3 EGL OpenSLES log android)
# link_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/curl-mobile/android/${ANDROID_ABI})
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/curl-mobile/android/include)
message("Android Build!")
endif()
if(MACOS OR IOS)
Expand Down Expand Up @@ -297,9 +299,9 @@ endif()
if(IOS)
set(SKYEMU_SRC ${SKYEMU_SRC} src/ios_support.m)
add_definitions(-DSE_PLATFORM_IOS)
set(LINK_LIBS ${LINK_LIBS} curl z)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/curl-mobile/iOS)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/curl-mobile/iOS/include)
# set(LINK_LIBS ${LINK_LIBS} curl z)
# link_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/curl-mobile/iOS)
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/curl-mobile/iOS/include)
endif()

if(WIN32)
Expand Down Expand Up @@ -337,7 +339,7 @@ if (EMSCRIPTEN)
endif ()
set(LINK_LIBS ${LINK_LIBS} sokol ${ALSA_LIBRARIES})

if(NOT EMSCRIPTEN AND NOT ANDROID AND NOT IOS)
if(NOT EMSCRIPTEN)
target_include_directories(${PROJECT_NAME} PRIVATE src/openssl/include)
target_include_directories(${PROJECT_NAME} PRIVATE src/curl/include)
set(LINK_LIBS ${LINK_LIBS} libcurl_static)
Expand Down
Binary file removed src/curl-mobile/android/arm64-v8a/libcurl.a
Binary file not shown.
Binary file removed src/curl-mobile/android/armeabi-v7a/libcurl.a
Binary file not shown.
5 changes: 0 additions & 5 deletions src/curl-mobile/android/include/Makefile.am

This file was deleted.

Loading

0 comments on commit ba77dcd

Please sign in to comment.