Skip to content

Commit

Permalink
Add USE_EXTERNAL_DEPS_SOURCES cmake option
Browse files Browse the repository at this point in the history
  • Loading branch information
sfodagain committed Apr 15, 2024
1 parent 4c90cf0 commit ee0301e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ project(aws-iot-device-sdk-cpp-v2
include(CTest)

option(BUILD_DEPS "Builds aws common runtime dependencies as part of build. Turn off if you want to control your dependency chain." ON)
option(USE_EXTERNAL_DEPS_SOURCES "Use dependencies provided by add_subdirectory command" OFF)
option(BUILD_SAMPLES "(DEPRECATED) Build samples as part of the build" OFF)

if (DEFINED CMAKE_PREFIX_PATH)
Expand Down Expand Up @@ -71,7 +72,11 @@ if (BUILD_DEPS)
set(BUILD_TESTING ${BUILD_TESTING_PREV})
else()
include(AwsFindPackage)
set(IN_SOURCE_BUILD OFF)
if (USE_EXTERNAL_DEPS_SOURCES)
set(IN_SOURCE_BUILD ON)
else()
set(IN_SOURCE_BUILD OFF)
endif()
endif()

aws_use_package(aws-crt-cpp)
Expand Down

0 comments on commit ee0301e

Please sign in to comment.