diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..078b631c2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,24 @@ +[submodule "aws-common-runtime/aws-c-common"] + path = aws-common-runtime/aws-c-common + url = https://github.com/awslabs/aws-c-common.git +[submodule "aws-common-runtime/aws-c-io"] + path = aws-common-runtime/aws-c-io + url = https://github.com/awslabs/aws-c-io.git +[submodule "aws-common-runtime/aws-c-compression"] + path = aws-common-runtime/aws-c-compression + url = https://github.com/awslabs/aws-c-compression.git +[submodule "aws-common-runtime/aws-c-cal"] + path = aws-common-runtime/aws-c-cal + url = https://github.com/awslabs/aws-c-cal.git +[submodule "aws-common-runtime/aws-c-auth"] + path = aws-common-runtime/aws-c-auth + url = https://github.com/awslabs/aws-c-auth.git +[submodule "aws-common-runtime/aws-c-http"] + path = aws-common-runtime/aws-c-http + url = https://github.com/awslabs/aws-c-http.git +[submodule "aws-common-runtime/aws-c-mqtt"] + path = aws-common-runtime/aws-c-mqtt + url = https://github.com/awslabs/aws-c-mqtt.git +[submodule "aws-common-runtime/s2n"] + path = aws-common-runtime/s2n + url = https://github.com/awslabs/s2n.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 23dd501a5..c1ff08c3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.1) - +project(aws-crt-cpp CXX C) option(BUILD_DEPS "Builds aws common runtime dependencies as part of build, only do this if you don't want to control your dependency chain." OFF) +include(CTest) + if (DEFINED CMAKE_PREFIX_PATH) file(TO_CMAKE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH) endif() @@ -28,93 +30,44 @@ if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "RelWithDebInfo") endif() -set(AWS_CRT_CPP_VERSION "v0.6.8") +set(AWS_CRT_CPP_VERSION "v0.7.1") configure_file(include/aws/crt/Config.h.in ${CMAKE_CURRENT_LIST_DIR}/include/aws/crt/Config.h @ONLY) -if (BUILD_DEPS) - set(AWS_DEPS_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/deps CACHE STRING "If BUILD_DEPS is on, aws common runtime dependencies build in this directory.") - if (DEFINED CMAKE_INSTALL_PREFIX) - set(AWS_DEPS_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}) - else() - set(AWS_DEPS_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/deps/install) - endif() +# This is required in order to append /lib/cmake to each element in CMAKE_PREFIX_PATH +set(AWS_MODULE_DIR "/${CMAKE_INSTALL_LIBDIR}/cmake") +string(REPLACE ";" "${AWS_MODULE_DIR};" AWS_MODULE_PATH "${CMAKE_PREFIX_PATH}${AWS_MODULE_DIR}") +# Append that generated list to the module search path +list(APPEND CMAKE_MODULE_PATH ${AWS_MODULE_PATH}) - if (NOT DEFINED CMAKE_PREFIX_PATH) - set(CMAKE_PREFIX_PATH ${AWS_DEPS_INSTALL_DIR}) - endif() +if (BUILD_DEPS) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/aws-common-runtime/aws-c-common/cmake") - file(MAKE_DIRECTORY ${AWS_DEPS_BUILD_DIR}) - if(TARGET_ARCH STREQUAL "ANDROID") - execute_process( - COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR} - -DTARGET_ARCH=${TARGET_ARCH} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} - -DANDROID_ABI=${ANDROID_ABI} - -DANDROID_TOOLCHAIN_NAME=${ANDROID_TOOLCHAIN_NAME} - -DANDROID_STANDALONE_TOOLCHAIN=${ANDROID_STANDALONE_TOOLCHAIN} - -DANDROID_STL=${ANDROID_STL} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR} - -DGIT_EXECUTABLE=${GIT_EXECUTABLE} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ${CMAKE_CURRENT_SOURCE_DIR}/aws-common-runtime - WORKING_DIRECTORY ${AWS_DEPS_BUILD_DIR} - ) - - else() - execute_process( - COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR} - -DTARGET_ARCH=${TARGET_ARCH} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}/bin - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ${CMAKE_CURRENT_SOURCE_DIR}/aws-common-runtime - WORKING_DIRECTORY ${AWS_DEPS_BUILD_DIR} - RESULT_VARIABLE BUILD_AWSCRT_EXIT_CODE - ) - endif() + include(AwsFindPackage) - if (NOT ${BUILD_AWSCRT_EXIT_CODE} EQUAL 0) - message(FATAL_ERROR "Failed to configure aws crt libraries.") - endif() - execute_process(COMMAND ${CMAKE_COMMAND} --build ${AWS_DEPS_BUILD_DIR} --config ${CMAKE_BUILD_TYPE} - RESULT_VARIABLE BUILD_AWSCRT_EXIT_CODE) + set(IN_SOURCE_BUILD ON) + set(BUILD_TESTING_PREV BUILD_TESTING) + set(BUILD_TESTING OFF) + add_subdirectory(aws-common-runtime/aws-c-common) - if (NOT ${BUILD_AWSCRT_EXIT_CODE} EQUAL 0) - message(FATAL_ERROR "Failed to build aws crt libraries.") + if (UNIX AND NOT APPLE) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/aws-common-runtime/s2n/cmake/modules") + find_package(LibCrypto REQUIRED) + add_subdirectory(aws-common-runtime/s2n) endif() - message(STATUS "AWS Common Runtime is installed at: ${AWS_DEPS_INSTALL_DIR}") - - #the following two lines are done in this branch intentionally, don't move it. project() does some magic that - #we don't want happening until we're done with the above code. - list(APPEND CMAKE_PREFIX_PATH "${AWS_DEPS_INSTALL_DIR}") - - project(aws-crt-cpp) + add_subdirectory(aws-common-runtime/aws-c-io) + add_subdirectory(aws-common-runtime/aws-c-cal) + add_subdirectory(aws-common-runtime/aws-c-compression) + add_subdirectory(aws-common-runtime/aws-c-http) + add_subdirectory(aws-common-runtime/aws-c-auth) + add_subdirectory(aws-common-runtime/aws-c-mqtt) + set(BUILD_TESTING BUILD_TESTING_PREV) else() - #the following two lines are done in this branch intentionally, don't move it. project() does some magic that - #we want happening exactly right now. - project(aws-crt-cpp) - + include(AwsFindPackage) + set(IN_SOURCE_BUILD OFF) endif() -# This is required in order to append /lib/cmake to each element in CMAKE_PREFIX_PATH -set(AWS_MODULE_DIR "/${CMAKE_INSTALL_LIBDIR}/cmake") -string(REPLACE ";" "${AWS_MODULE_DIR};" AWS_MODULE_PATH "${CMAKE_PREFIX_PATH}${AWS_MODULE_DIR}") -# Append that generated list to the module search path -list(APPEND CMAKE_MODULE_PATH ${AWS_MODULE_PATH}) - include(AwsCFlags) include(AwsSharedLibSetup) @@ -226,38 +179,38 @@ if (WIN32) endif () endif() -add_library(${CMAKE_PROJECT_NAME} ${AWS_CRT_CPP_SRC}) +add_library(${PROJECT_NAME} ${AWS_CRT_CPP_SRC}) if (BUILD_SHARED_LIBS) - target_compile_definitions(${CMAKE_PROJECT_NAME} PUBLIC -DAWS_CRT_CPP_USE_IMPORT_EXPORT) - target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE -DAWS_CRT_CPP_EXPORTS) + target_compile_definitions(${PROJECT_NAME} PUBLIC -DAWS_CRT_CPP_USE_IMPORT_EXPORT) + target_compile_definitions(${PROJECT_NAME} PRIVATE -DAWS_CRT_CPP_EXPORTS) endif() -set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) -set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES CXX_STANDARD ${CMAKE_CXX_STANDARD}) +set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) +set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD ${CMAKE_CXX_STANDARD}) -aws_prepare_symbol_visibility_args(${CMAKE_PROJECT_NAME} "AWS_CRT_CPP") +aws_prepare_symbol_visibility_args(${PROJECT_NAME} "AWS_CRT_CPP") #set warnings if (MSVC) - target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE /W4 /WX /wd4068) + target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX /wd4068) else () - target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE -Wall -Wno-long-long -pedantic -Werror) + target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wno-long-long -pedantic -Werror) endif () if (CMAKE_BUILD_TYPE STREQUAL "" OR CMAKE_BUILD_TYPE MATCHES Debug) - target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE "-DDEBUG_BUILD") + target_compile_definitions(${PROJECT_NAME} PRIVATE "-DDEBUG_BUILD") endif () -target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC +target_include_directories(${PROJECT_NAME} PUBLIC $ $) -find_package(aws-c-http REQUIRED) -find_package(aws-c-mqtt REQUIRED) -find_package(aws-c-cal REQUIRED) -find_package(aws-c-auth REQUIRED) -target_link_libraries(${CMAKE_PROJECT_NAME} AWS::aws-c-auth AWS::aws-c-cal AWS::aws-c-http AWS::aws-c-mqtt) +aws_use_package(aws-c-http) +aws_use_package(aws-c-mqtt) +aws_use_package(aws-c-cal) +aws_use_package(aws-c-auth) +target_link_libraries(${PROJECT_NAME} ${DEP_AWS_LIBS}) install(FILES ${AWS_CRT_HEADERS} DESTINATION "include/aws/crt" COMPONENT Development) install(FILES ${AWS_CRT_AUTH_HEADERS} DESTINATION "include/aws/crt/auth" COMPONENT Development) @@ -269,8 +222,8 @@ install(FILES ${AWS_CRT_HTTP_HEADERS} DESTINATION "include/aws/crt/http" COMPONE install(FILES ${AWS_CRT_EXTERNAL_HEADERS} DESTINATION "include/aws/crt/external" COMPONENT Development) install( - TARGETS ${CMAKE_PROJECT_NAME} - EXPORT ${CMAKE_PROJECT_NAME}-targets + TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development RUNTIME DESTINATION bin COMPONENT Runtime @@ -282,18 +235,22 @@ else() set (TARGET_DIR "static") endif() -install(EXPORT "${CMAKE_PROJECT_NAME}-targets" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/${CMAKE_PROJECT_NAME}/cmake/${TARGET_DIR}" +install(EXPORT "${PROJECT_NAME}-targets" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/${TARGET_DIR}" NAMESPACE AWS:: COMPONENT Development) -configure_file("cmake/${CMAKE_PROJECT_NAME}-config.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" +configure_file("cmake/${PROJECT_NAME}-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" @ONLY) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-config.cmake" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/${CMAKE_PROJECT_NAME}/cmake/" +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake/" COMPONENT Development) -enable_testing() -add_subdirectory(tests) +if (NOT CMAKE_CROSSCOMPILING) + if (BUILD_TESTING) + add_subdirectory(tests) + endif() +endif() + diff --git a/README.md b/README.md index 92abf8f9b..d90fcfda8 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,12 @@ More protocols and utilities are coming soon, so stay tuned. ## Building -The C99 libraries are already included for your convenience when you specify the `-DBUILD_DEPS=ON` CMake argument. +The C99 libraries are already included for your convenience as submodules. If you would like to have us build them +by default, be sure to either perform a recursive clone `git clone --recursive` or initialize the submodules via. +`git submodule update --init`. Then, to build, specify the `-DBUILD_DEPS=ON` CMake argument. If you want to manage these dependencies manually (e.g. you're using them in other projects), simply specify -`-DCMAKE_INSTALL_PREFIX` to point to the directory where you have them installed. +`-DCMAKE_PREFIX_PATH` to point to the absolute path where you have them installed. ## Dependencies? diff --git a/aws-common-runtime/CMakeLists.txt b/aws-common-runtime/CMakeLists.txt deleted file mode 100644 index f6abc175d..000000000 --- a/aws-common-runtime/CMakeLists.txt +++ /dev/null @@ -1,64 +0,0 @@ -cmake_minimum_required(VERSION 3.1) - -project(aws-crt) -list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") - -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE RelWithDebInfo) -endif() - -include(ExternalProject) - -set(AWS_DEPS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Dependencies install directory.") -set(AWS_DEPS_BIN_DIR "${AWS_DEPS_INSTALL_DIR}/bin" CACHE PATH "Dependencies binary install directory.") -set(AWS_DEPS_LIB_DIR "${AWS_DEPS_INSTALL_DIR}/lib" CACHE PATH "Dependencies library install directory.") -set(AWS_DEPS_BUILD_DIR "${CMAKE_BINARY_DIR}/build" CACHE PATH "Dependencies build directory.") -set(AWS_DEPS_DOWNLOAD_DIR "${AWS_DEPS_BUILD_DIR}/downloads" CACHE PATH "Dependencies download directory.") - -message("install dir ${AWS_DEPS_INSTALL_DIR}") -set(AWS_C_COMMON_URL "https://github.com/awslabs/aws-c-common.git") -set(AWS_C_COMMON_SHA "v0.4.24") -include(BuildAwsCCommon) - -if (UNIX AND NOT APPLE) - set(S2N_URL "https://github.com/awslabs/s2n.git") - set(S2N_SHA "b2f784b883a34eb746a13d79e15c593430ede81b") - include(BuildS2N) -endif() - -set(AWS_C_IO_URL "https://github.com/awslabs/aws-c-io.git") -set(AWS_C_IO_SHA "v0.4.20") -include(BuildAwsCIO) - -set(AWS_C_COMPRESSION_URL "https://github.com/awslabs/aws-c-compression.git") -set(AWS_C_COMPRESSION_SHA "v0.2.4") -include(BuildAwsCCompression) - -set(AWS_C_HTTP_URL "https://github.com/awslabs/aws-c-http.git") -set(AWS_C_HTTP_SHA "v0.4.18") -include(BuildAwsCHttp) - -set(AWS_C_MQTT_URL "https://github.com/awslabs/aws-c-mqtt.git") -set(AWS_C_MQTT_SHA "v0.4.22") -include(BuildAwsCMqtt) - -set(AWS_C_CAL_URL "https://github.com/awslabs/aws-c-cal.git") -set(AWS_C_CAL_SHA "v0.2.0") -include(BuildAwsCCal) - -set(AWS_C_AUTH_URL "https://github.com/awslabs/aws-c-auth.git") -set(AWS_C_AUTH_SHA "v0.3.5") -include(BuildAwsCAuth) - -add_dependencies(AwsCCompression AwsCCommon) -add_dependencies(AwsCMqtt AwsCHttp) -add_dependencies(AwsCHttp AwsCIO AwsCCompression) -add_dependencies(AwsCCal AwsCCommon) -add_dependencies(AwsCAuth AwsCHttp AwsCCal) - -if (UNIX AND NOT APPLE) - add_dependencies(AwsCIO S2N AwsCCommon) -else() - add_dependencies(AwsCIO AwsCCommon ) -endif() - diff --git a/aws-common-runtime/aws-c-auth b/aws-common-runtime/aws-c-auth new file mode 160000 index 000000000..8281ad698 --- /dev/null +++ b/aws-common-runtime/aws-c-auth @@ -0,0 +1 @@ +Subproject commit 8281ad6989d815bb59fa5612a43193ec3795ff7b diff --git a/aws-common-runtime/aws-c-cal b/aws-common-runtime/aws-c-cal new file mode 160000 index 000000000..5f562759e --- /dev/null +++ b/aws-common-runtime/aws-c-cal @@ -0,0 +1 @@ +Subproject commit 5f562759e759b8f86df128f3f52c5dba8d300529 diff --git a/aws-common-runtime/aws-c-common b/aws-common-runtime/aws-c-common new file mode 160000 index 000000000..045024d73 --- /dev/null +++ b/aws-common-runtime/aws-c-common @@ -0,0 +1 @@ +Subproject commit 045024d735c64a1e488827e4b70b20b3295be4ef diff --git a/aws-common-runtime/aws-c-compression b/aws-common-runtime/aws-c-compression new file mode 160000 index 000000000..45d6ba1f1 --- /dev/null +++ b/aws-common-runtime/aws-c-compression @@ -0,0 +1 @@ +Subproject commit 45d6ba1f1edf323728dbcfaa60afc91e004d4d3f diff --git a/aws-common-runtime/aws-c-http b/aws-common-runtime/aws-c-http new file mode 160000 index 000000000..232f3358a --- /dev/null +++ b/aws-common-runtime/aws-c-http @@ -0,0 +1 @@ +Subproject commit 232f3358a7eab67f18c18332a6510838f749eca3 diff --git a/aws-common-runtime/aws-c-io b/aws-common-runtime/aws-c-io new file mode 160000 index 000000000..250484cc0 --- /dev/null +++ b/aws-common-runtime/aws-c-io @@ -0,0 +1 @@ +Subproject commit 250484cc0e985cc9bc8ffb0591c5d74c6541f113 diff --git a/aws-common-runtime/aws-c-mqtt b/aws-common-runtime/aws-c-mqtt new file mode 160000 index 000000000..9895e4d16 --- /dev/null +++ b/aws-common-runtime/aws-c-mqtt @@ -0,0 +1 @@ +Subproject commit 9895e4d16c8e68dcf3ab40fed9f2ca0c2a52e24e diff --git a/aws-common-runtime/cmake/BuildAwsCAuth.cmake b/aws-common-runtime/cmake/BuildAwsCAuth.cmake deleted file mode 100644 index 16cce49ce..000000000 --- a/aws-common-runtime/cmake/BuildAwsCAuth.cmake +++ /dev/null @@ -1,57 +0,0 @@ -if("${TARGET_ARCH}" STREQUAL ANDROID) - ExternalProject_Add(AwsCAuth - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_AUTH_URL} - GIT_TAG ${AWS_C_AUTH_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} - -DANDROID_ABI=${ANDROID_ABI} - -DANDROID_TOOLCHAIN_NAME=${ANDROID_TOOLCHAIN_NAME} - -DANDROID_STANDALONE_TOOLCHAIN=${ANDROID_STANDALONE_TOOLCHAIN} - -DANDROID_STL=${ANDROID_STL} - -DENABLE_HW_OPTIMIZATION=OFF - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -elseif(MSVC) - ExternalProject_Add(AwsCAuth - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_AUTH_URL} - GIT_TAG ${AWS_C_AUTH_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -else() - ExternalProject_Add(AwsCAuth - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_AUTH_URL} - GIT_TAG ${AWS_C_AUTH_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -endif() - diff --git a/aws-common-runtime/cmake/BuildAwsCCal.cmake b/aws-common-runtime/cmake/BuildAwsCCal.cmake deleted file mode 100644 index eb0104fc2..000000000 --- a/aws-common-runtime/cmake/BuildAwsCCal.cmake +++ /dev/null @@ -1,56 +0,0 @@ -if("${TARGET_ARCH}" STREQUAL ANDROID) - ExternalProject_Add(AwsCCal - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_CAL_URL} - GIT_TAG ${AWS_C_CAL_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} - -DANDROID_ABI=${ANDROID_ABI} - -DANDROID_TOOLCHAIN_NAME=${ANDROID_TOOLCHAIN_NAME} - -DANDROID_STANDALONE_TOOLCHAIN=${ANDROID_STANDALONE_TOOLCHAIN} - -DANDROID_STL=${ANDROID_STL} - -DENABLE_HW_OPTIMIZATION=OFF - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -elseif(MSVC) - ExternalProject_Add(AwsCCal - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_CAL_URL} - GIT_TAG ${AWS_C_CAL_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -else() - ExternalProject_Add(AwsCCal - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_CAL_URL} - GIT_TAG ${AWS_C_CAL_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -endif() diff --git a/aws-common-runtime/cmake/BuildAwsCCommon.cmake b/aws-common-runtime/cmake/BuildAwsCCommon.cmake deleted file mode 100644 index 292d4a24d..000000000 --- a/aws-common-runtime/cmake/BuildAwsCCommon.cmake +++ /dev/null @@ -1,59 +0,0 @@ -if("${TARGET_ARCH}" STREQUAL ANDROID) - ExternalProject_Add(AwsCCommon - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_COMMON_URL} - GIT_TAG ${AWS_C_COMMON_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} - -DANDROID_ABI=${ANDROID_ABI} - -DANDROID_TOOLCHAIN_NAME=${ANDROID_TOOLCHAIN_NAME} - -DANDROID_STANDALONE_TOOLCHAIN=${ANDROID_STANDALONE_TOOLCHAIN} - -DANDROID_STL=${ANDROID_STL} - -DENABLE_HW_OPTIMIZATION=OFF - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -elseif(MSVC) - ExternalProject_Add(AwsCCommon - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_COMMON_URL} - GIT_TAG ${AWS_C_COMMON_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -else() - ExternalProject_Add(AwsCCommon - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_COMMON_URL} - GIT_TAG ${AWS_C_COMMON_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -endif() diff --git a/aws-common-runtime/cmake/BuildAwsCCompression.cmake b/aws-common-runtime/cmake/BuildAwsCCompression.cmake deleted file mode 100644 index a96994b7f..000000000 --- a/aws-common-runtime/cmake/BuildAwsCCompression.cmake +++ /dev/null @@ -1,56 +0,0 @@ -if("${TARGET_ARCH}" STREQUAL ANDROID) - ExternalProject_Add(AwsCCompression - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_COMPRESSION_URL} - GIT_TAG ${AWS_C_COMPRESSION_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} - -DANDROID_ABI=${ANDROID_ABI} - -DANDROID_TOOLCHAIN_NAME=${ANDROID_TOOLCHAIN_NAME} - -DANDROID_STANDALONE_TOOLCHAIN=${ANDROID_STANDALONE_TOOLCHAIN} - -DANDROID_STL=${ANDROID_STL} - -DENABLE_HW_OPTIMIZATION=OFF - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -elseif(MSVC) - ExternalProject_Add(AwsCCompression - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_COMPRESSION_URL} - GIT_TAG ${AWS_C_COMPRESSION_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -else() - ExternalProject_Add(AwsCCompression - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_COMPRESSION_URL} - GIT_TAG ${AWS_C_COMPRESSION_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -endif() diff --git a/aws-common-runtime/cmake/BuildAwsCHttp.cmake b/aws-common-runtime/cmake/BuildAwsCHttp.cmake deleted file mode 100644 index d01b74946..000000000 --- a/aws-common-runtime/cmake/BuildAwsCHttp.cmake +++ /dev/null @@ -1,56 +0,0 @@ -if("${TARGET_ARCH}" STREQUAL ANDROID) - ExternalProject_Add(AwsCHttp - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_HTTP_URL} - GIT_TAG ${AWS_C_HTTP_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} - -DANDROID_ABI=${ANDROID_ABI} - -DANDROID_TOOLCHAIN_NAME=${ANDROID_TOOLCHAIN_NAME} - -DANDROID_STANDALONE_TOOLCHAIN=${ANDROID_STANDALONE_TOOLCHAIN} - -DANDROID_STL=${ANDROID_STL} - -DENABLE_HW_OPTIMIZATION=OFF - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -elseif(MSVC) - ExternalProject_Add(AwsCHttp - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_HTTP_URL} - GIT_TAG ${AWS_C_HTTP_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -else() - ExternalProject_Add(AwsCHttp - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_HTTP_URL} - GIT_TAG ${AWS_C_HTTP_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -endif() diff --git a/aws-common-runtime/cmake/BuildAwsCIO.cmake b/aws-common-runtime/cmake/BuildAwsCIO.cmake deleted file mode 100644 index b9edd21f0..000000000 --- a/aws-common-runtime/cmake/BuildAwsCIO.cmake +++ /dev/null @@ -1,59 +0,0 @@ -if("${TARGET_ARCH}" STREQUAL ANDROID) - ExternalProject_Add(AwsCIO - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_IO_URL} - GIT_TAG ${AWS_C_IO_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} - -DANDROID_ABI=${ANDROID_ABI} - -DANDROID_TOOLCHAIN_NAME=${ANDROID_TOOLCHAIN_NAME} - -DANDROID_STANDALONE_TOOLCHAIN=${ANDROID_STANDALONE_TOOLCHAIN} - -DANDROID_STL=${ANDROID_STL} - -DENABLE_HW_OPTIMIZATION=OFF - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -elseif(MSVC) - ExternalProject_Add(AwsCIO - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_IO_URL} - GIT_TAG ${AWS_C_IO_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -else() - ExternalProject_Add(AwsCIO - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_IO_URL} - GIT_TAG ${AWS_C_IO_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -endif() diff --git a/aws-common-runtime/cmake/BuildAwsCMqtt.cmake b/aws-common-runtime/cmake/BuildAwsCMqtt.cmake deleted file mode 100644 index 3a2c0a88f..000000000 --- a/aws-common-runtime/cmake/BuildAwsCMqtt.cmake +++ /dev/null @@ -1,56 +0,0 @@ -if("${TARGET_ARCH}" STREQUAL ANDROID) - ExternalProject_Add(AwsCMqtt - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_MQTT_URL} - GIT_TAG ${AWS_C_MQTT_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} - -DANDROID_ABI=${ANDROID_ABI} - -DANDROID_TOOLCHAIN_NAME=${ANDROID_TOOLCHAIN_NAME} - -DANDROID_STANDALONE_TOOLCHAIN=${ANDROID_STANDALONE_TOOLCHAIN} - -DANDROID_STL=${ANDROID_STL} - -DENABLE_HW_OPTIMIZATION=OFF - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -elseif(MSVC) - ExternalProject_Add(AwsCMqtt - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_MQTT_URL} - GIT_TAG ${AWS_C_MQTT_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -else() - ExternalProject_Add(AwsCMqtt - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${AWS_C_MQTT_URL} - GIT_TAG ${AWS_C_MQTT_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -endif() diff --git a/aws-common-runtime/cmake/BuildS2N.cmake b/aws-common-runtime/cmake/BuildS2N.cmake deleted file mode 100644 index b00b42cd7..000000000 --- a/aws-common-runtime/cmake/BuildS2N.cmake +++ /dev/null @@ -1,44 +0,0 @@ -message("Using c-flags ${CMAKE_C_FLAGS}") - -if("${TARGET_ARCH}" STREQUAL ANDROID) - ExternalProject_Add(S2N - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${S2N_URL} - GIT_TAG ${S2N_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} - -DANDROID_ABI=${ANDROID_ABI} - -DANDROID_TOOLCHAIN_NAME=${ANDROID_TOOLCHAIN_NAME} - -DANDROID_STANDALONE_TOOLCHAIN=${ANDROID_STANDALONE_TOOLCHAIN} - -DANDROID_STL=${ANDROID_STL} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DBUILD_TESTING=OFF - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -else() - ExternalProject_Add(S2N - PREFIX ${AWS_DEPS_BUILD_DIR} - GIT_REPOSITORY ${S2N_URL} - GIT_TAG ${S2N_SHA} - BUILD_IN_SOURCE 0 - UPDATE_COMMAND "" - CMAKE_ARGS - -DCMAKE_PREFIX_PATH=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_INSTALL_PREFIX=${AWS_DEPS_INSTALL_DIR} - -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} - -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - -DBUILD_TESTING=OFF - -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} - ) -endif() diff --git a/aws-common-runtime/s2n b/aws-common-runtime/s2n new file mode 160000 index 000000000..b4e5153cb --- /dev/null +++ b/aws-common-runtime/s2n @@ -0,0 +1 @@ +Subproject commit b4e5153cbe4cf154eb3e9543c26b785d330e0b5c diff --git a/cmake/aws-crt-cpp-config.cmake b/cmake/aws-crt-cpp-config.cmake index a6735d969..7940dcad0 100644 --- a/cmake/aws-crt-cpp-config.cmake +++ b/cmake/aws-crt-cpp-config.cmake @@ -6,7 +6,7 @@ find_dependency(aws-c-cal) find_dependency(aws-c-auth) if (BUILD_SHARED_LIBS) - include(${CMAKE_CURRENT_LIST_DIR}/shared/@CMAKE_PROJECT_NAME@-targets.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) else () - include(${CMAKE_CURRENT_LIST_DIR}/static/@CMAKE_PROJECT_NAME@-targets.cmake) + include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) endif() \ No newline at end of file diff --git a/codebuild/common-posix.sh b/codebuild/common-posix.sh index 9dd25786f..71405e605 100755 --- a/codebuild/common-posix.sh +++ b/codebuild/common-posix.sh @@ -2,6 +2,7 @@ set -e +git submodule update --init mkdir build cd build diff --git a/codebuild/common-windows.bat b/codebuild/common-windows.bat index 4bb41cec2..2ce0e592b 100644 --- a/codebuild/common-windows.bat +++ b/codebuild/common-windows.bat @@ -1,4 +1,5 @@ +git submodule update --init mkdir build cd build