File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
tools/build_script_generator/cmake/resources Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ add_library({{ repo }} OBJECT
2727 {{ file | relocate | modm.posixify }}
2828%% endfor
2929)
30-
30+ %% else
31+ add_library({{ repo }} INTERFACE )
3132%% endif
3233
3334%% if per_file_attr | length
@@ -44,18 +45,31 @@ add_library({{ repo }}_arch_options INTERFACE)
4445modm_target_config_create({{ repo }} {{ repo }}_arch_options {{ repo }}_options {{ repo }}_warnings)
4546
4647%% if include_paths | length
47- target_include_directories({{ repo }} SYSTEM PUBLIC
48+ target_include_directories({{ repo }} SYSTEM
49+ %% if sources | length
50+ PUBLIC
51+ %% else
52+ INTERFACE
53+ %% endif
4854%% for path in include_paths | sort
4955 {{ path | relocate | modm.posixify }}
5056%% endfor
5157)
5258
5359%% endif
5460
61+
5562target_link_libraries({{ repo }}
63+ %% if sources | length
5664 PUBLIC
65+ %% else
66+ INTERFACE
67+ %%endif
5768 {{ repo }}_arch_options
69+ %% if sources | length
5870 PRIVATE
5971 project_options
6072 {{ repo }}_options
61- {{ repo }}_warnings)
73+ {{ repo }}_warnings
74+ %% endif
75+ )
You can’t perform that action at this time.
0 commit comments