Skip to content

Commit eadd72a

Browse files
authored
Starling third party fix (#65)
1 parent f29c5fa commit eadd72a

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

FindNanopb.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ include("GenericFindDependency")
22
option(nanopb_BUILD_GENERATOR "" OFF)
33
GenericFindDependency(
44
TARGET protobuf-nanopb
5-
SOURCE_DIR "third_party/nanopb"
5+
SOURCE_DIR "nanopb"
66
SYSTEM_INCLUDES
7-
)
7+
)
88

FindStarling.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ option(starling_ENABLE_EXAMPLES "" OFF)
77
GenericFindDependency(
88
TARGET pvt-runner-lib
99
ADDITIONAL_TARGETS
10+
math_routines
1011
sensorfusion
1112
pvt_driver
12-
pvt-engine
1313
pvt-common
14+
pvt-engine
15+
pvt-runner
16+
pvt-sbp-logging
17+
pvt-sizes
18+
pvt-version
19+
starling-build-config
1420
starling-util
1521
SOURCE_DIR starling
1622
SYSTEM_HEADER_FILE "pvt_driver/runner/pvt_runner.h"

GenericFindDependency.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,7 @@ macro(create_source_search_paths)
254254
list(APPEND x_SOURCE_SEARCH_PATHS "${PROJECT_SOURCE_DIR}/third_party/${x_TARGET}")
255255
list(APPEND x_SOURCE_SEARCH_PATHS "${PROJECT_SOURCE_DIR}/third_party/lib${x_TARGET}")
256256
else()
257-
list(APPEND x_SOURCE_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/${x_SOURCE_DIR}")
258257
list(APPEND x_SOURCE_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/third_party/${x_SOURCE_DIR}")
259-
list(APPEND x_SOURCE_SEARCH_PATHS "${PROJECT_SOURCE_DIR}/${x_SOURCE_DIR}")
260258
list(APPEND x_SOURCE_SEARCH_PATHS "${PROJECT_SOURCE_DIR}/third_party/${x_SOURCE_DIR}")
261259
list(APPEND x_SOURCE_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/third_party/${CMAKE_FIND_PACKAGE_NAME}/${x_SOURCE_DIR}")
262260
list(APPEND x_SOURCE_SEARCH_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/third_party/${x_TARGET}/${x_SOURCE_DIR}")
@@ -392,7 +390,9 @@ function(GenericFindDependency)
392390
# If the primary target exposes additional targets, mark them as system
393391
# targets in accordance to how the primary target was marked
394392
foreach(additional_target IN LISTS x_ADDITIONAL_TARGETS)
395-
mark_target_as_system_includes(${additional_target})
393+
if(TARGET ${additional_target})
394+
mark_target_as_system_includes(${additional_target})
395+
endif()
396396
endforeach()
397397
endfunction()
398398

0 commit comments

Comments
 (0)