File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ # v3.21 implemented semantic changes regarding $<TARGET_OBJECTS:...>
2+ # See https://cmake.org/cmake/help/v3.21/command/target_link_libraries.html#linking-object-libraries-via-target-objects
3+ cmake_minimum_required (VERSION 3.21 )
4+
5+ add_library (STM32RTC INTERFACE )
6+ add_library (STM32RTC_usage INTERFACE )
7+
8+ target_include_directories (STM32RTC_usage INTERFACE
9+ src
10+ )
11+
12+
13+ target_link_libraries (STM32RTC_usage INTERFACE
14+ base_config
15+ )
16+
17+ target_link_libraries (STM32RTC INTERFACE STM32RTC_usage )
18+
19+
20+
21+ add_library (STM32RTC_bin OBJECT EXCLUDE_FROM_ALL
22+ src/rtc.c
23+ src/STM32RTC.cpp
24+ )
25+ target_link_libraries (STM32RTC_bin PUBLIC STM32RTC_usage )
26+
27+ target_link_libraries (STM32RTC INTERFACE
28+ STM32RTC_bin
29+ $<TARGET_OBJECTS :STM32RTC_bin >
30+ )
31+
You can’t perform that action at this time.
0 commit comments