We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5861150 commit b8bc9beCopy full SHA for b8bc9be
1 file changed
CMakeLists.txt
@@ -0,0 +1,31 @@
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
0 commit comments