Skip to content

Commit

Permalink
whereami: Use SOURCE_DIR variable
Browse files Browse the repository at this point in the history
Replace the hard-coded source dir location with an public source dir output variable provided by `FetchContent`. This decouples the SDK from the current implementation details of `FetchContent`, and it allows packagers or disconnected builds to inject a pre-fetched location via input variable `FETCHCONTENT_SOURCE_DIR_WHEREAMI-EXTERNAL`.
  • Loading branch information
dg0yt authored Jul 27, 2024
1 parent 78e494f commit 15f2fb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/Dependencies/whereami/whereami.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ FetchContent_Declare(
FetchContent_MakeAvailable(whereami-external)
add_library(whereami IMPORTED INTERFACE)
target_include_directories(whereami
INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/_deps/whereami-external-src/src"
INTERFACE "${whereami-external_SOURCE_DIR}/src"
)
target_sources(whereami
INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/_deps/whereami-external-src/src/whereami.c"
INTERFACE "${whereami-external_SOURCE_DIR}/src/whereami.c"
)

0 comments on commit 15f2fb3

Please sign in to comment.