Sha256: 3f1f545d3a3f20f5b26a8c74702cad0894528e5a9555feac0bdb9ef246796e6c

Contents?: true

Size: 1.25 KB

Versions: 13

Compression:

Stored size: 1.25 KB

Contents

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0.

option(IN_SOURCE_BUILD "If the CRT libs are being built from your source tree (add_subdirectory), set this to ON" OFF)

# This function handles dependency list building based on if traditional CMAKE modules via. find_package should be
# used, vs if this is an in source build via. something like git submodules and add_subdirectory.
# This is largely because CMake was not well planned out, and as a result, in-source and modules don't play well
# together. Only use this on CRT libraries (including S2N), libcrypto will stay as an assumed external dependency.
#
# package_name: is the name of the package to find
# DEP_AWS_LIBS: output variable will be appended after each call to this function. You don't have to use it,
#    but it can be passed directly target_link_libraries and it will be the properly qualified library
#    name and namespace based on configuration.
function(aws_use_package package_name)
    if (IN_SOURCE_BUILD)
        set(DEP_AWS_LIBS ${DEP_AWS_LIBS} ${package_name} PARENT_SCOPE)
    else()
        find_package(${package_name} REQUIRED)
        set(DEP_AWS_LIBS ${DEP_AWS_LIBS} AWS::${package_name} PARENT_SCOPE)
    endif()
endfunction()

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
aws-crt-0.4.0 aws-crt-ffi/crt/aws-c-common/cmake/AwsFindPackage.cmake
aws-crt-0.3.0 aws-crt-ffi/crt/aws-c-common/cmake/AwsFindPackage.cmake
aws-crt-0.2.1 aws-crt-ffi/crt/aws-c-common/cmake/AwsFindPackage.cmake
aws-crt-0.2.0 aws-crt-ffi/crt/aws-c-common/cmake/AwsFindPackage.cmake
aws-crt-0.1.9 aws-crt-ffi/crt/aws-c-common/cmake/AwsFindPackage.cmake
aws-crt-0.1.8 aws-crt-ffi/crt/aws-c-common/cmake/AwsFindPackage.cmake
aws-crt-0.1.7 aws-crt-ffi/crt/aws-c-common/cmake/AwsFindPackage.cmake
aws-crt-0.1.6 aws-crt-ffi/crt/aws-c-common/cmake/AwsFindPackage.cmake
aws-crt-0.1.5 aws-crt-ffi/crt/aws-c-common/cmake/AwsFindPackage.cmake
aws-crt-0.1.4 aws-crt-ffi/crt/aws-c-common/cmake/AwsFindPackage.cmake
aws-crt-0.1.2 aws-crt-ffi/crt/aws-c-common/cmake/AwsFindPackage.cmake
aws-crt-0.1.1.pre native/crt/aws-c-common/cmake/AwsFindPackage.cmake
aws-crt-0.1.0.pre native/crt/aws-c-common/cmake/AwsFindPackage.cmake