| 1 |
include(CMakeFindDependencyMacro) |
| 2 |
|
| 3 |
# USE_S2N is substituted at aws-c-io configure time (configure_file @ONLY) with the |
| 4 |
# actual build decision, so this matches whether aws-c-io was really linked against s2n. |
| 5 |
if (@USE_S2N@) |
| 6 |
find_dependency(s2n) |
| 7 |
endif() |
| 8 |
|
| 9 |
find_dependency(aws-c-common) |
| 10 |
find_dependency(aws-c-cal) |
| 11 |
|
| 12 |
macro(aws_load_targets type) |
| 13 |
include(${CMAKE_CURRENT_LIST_DIR}/${type}/@[email protected]) |
| 14 |
endmacro() |
| 15 |
|
| 16 |
# try to load the lib follow BUILD_SHARED_LIBS. Fall back if not exist. |
| 17 |
if (BUILD_SHARED_LIBS) |
| 18 |
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/shared") |
| 19 |
aws_load_targets(shared) |
| 20 |
else() |
| 21 |
aws_load_targets(static) |
| 22 |
endif() |
| 23 |
else() |
| 24 |
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/static") |
| 25 |
aws_load_targets(static) |
| 26 |
else() |
| 27 |
aws_load_targets(shared) |
| 28 |
endif() |
| 29 |
endif() |