Skip to content

Commit

Permalink
Resolve android-build tools path (#2685)
Browse files Browse the repository at this point in the history
Fixes #2452

In a previous [commit](de98602)
a bunch of directories were moved under /tools, including android-build.
At this time, scripts and CMake configurations were not updated, which
has caused build failures.
  • Loading branch information
swan-amazon authored Sep 26, 2023
1 parent 1d42774 commit 16f2ed6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmake/build_external.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ if(BUILD_CURL OR BUILD_OPENSSL OR BUILD_ZLIB)
-DEXTERNAL_CXX_FLAGS=${EXTERNAL_CXX_FLAGS}
-DEXTERNAL_C_FLAGS=${EXTERNAL_C_FLAGS}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
${CMAKE_CURRENT_SOURCE_DIR}/android-build
${CMAKE_CURRENT_SOURCE_DIR}/tools/android-build
WORKING_DIRECTORY ${EXTERNAL_BUILD_DIR}
RESULT_VARIABLE CONFIGURE_DEPS_EXIT_CODE)

Expand Down
4 changes: 2 additions & 2 deletions tools/android-build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if(BUILD_OPENSSL)
GIT_REPOSITORY https://github.com/openssl/openssl.git
GIT_TAG e2e09d9fba1187f8d6aafaa34d4172f56f1ffb72 # 1.1.1g
UPDATE_COMMAND ""
PATCH_COMMAND cd ${CMAKE_BINARY_DIR} && python ${AWS_NATIVE_SDK_ROOT}/android-build/configure_openssl_cmake.py --source ${AWS_NATIVE_SDK_ROOT} --dest ${OPENSSL_SOURCE_DIR}
PATCH_COMMAND cd ${CMAKE_BINARY_DIR} && python ${AWS_NATIVE_SDK_ROOT}/tools/android-build/configure_openssl_cmake.py --source ${AWS_NATIVE_SDK_ROOT} --dest ${OPENSSL_SOURCE_DIR}
CMAKE_ARGS
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=${CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION}
Expand All @@ -66,7 +66,7 @@ if(BUILD_CURL)
UPDATE_COMMAND ""
PATCH_COMMAND ""
CMAKE_ARGS
-C ${AWS_NATIVE_SDK_ROOT}/android-build/CurlAndroidCrossCompile.cmake
-C ${AWS_NATIVE_SDK_ROOT}/tools/android-build/CurlAndroidCrossCompile.cmake
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=${CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION}
-DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL}
Expand Down
2 changes: 1 addition & 1 deletion tools/android-build/build_and_test_android.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def Main():
InstallTests(credentialsFile)

print("Installing certs...")
BuildAndInstallCertSet("android-build", buildDir)
BuildAndInstallCertSet("tools/android-build", buildDir)

print("Uploading test resources")
UploadTestResources("aws-cpp-sdk-lambda-integration-tests/resources")
Expand Down
2 changes: 1 addition & 1 deletion tools/android-build/configure_openssl_cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# openssl doesn't have any cmake files; this script copies in cmake files to appropriate directories
# The CMakeFiles.txt and *.cmake files are variants of what can be found at https://github.com/janbar/openssl-cmake
def CopyCMakeFiles(baseDir, destDir):
sourceDir = os.path.join(baseDir, "android-build", "cmakefiles", "openssl-cmake")
sourceDir = os.path.join(baseDir, "tools", "android-build", "cmakefiles", "openssl-cmake")
dirLength = len(sourceDir)

for rootDir, dirNames, fileNames in os.walk(sourceDir):
Expand Down

0 comments on commit 16f2ed6

Please sign in to comment.