Skip to content

Commit 81ace63

Browse files
committed
build: add OcrePlatformBase
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
1 parent 5d4f4e1 commit 81ace63

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

src/platform/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# @copyright Copyright (c) contributors to Project Ocre,
2+
# which has been established as Project Ocre a Series of LF Projects, LLC
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
add_library(OcrePlatformBase INTERFACE)
7+
8+
target_include_directories(OcrePlatform
9+
PUBLIC
10+
include
11+
)

src/platform/posix/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@ target_sources(OcrePlatform
1414
lstat.c
1515
)
1616

17+
add_subdirectory(.. OcrePlatformBase)
18+
1719
target_include_directories(OcrePlatform
1820
PUBLIC
1921
include
20-
../include
22+
)
23+
24+
target_link_libraries(OcrePlatform
25+
PRIVATE
26+
OcrePlatformBase
2127
)

src/platform/zephyr/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ target_sources(OcrePlatform
1212
lstat.c
1313
)
1414

15+
add_subdirectory(.. OcrePlatformBase)
16+
1517
target_include_directories(OcrePlatform
1618
PUBLIC
1719
include
18-
../include
1920
)
2021

2122
target_link_libraries(OcrePlatform
22-
PUBLIC
23+
PRIVATE
2324
zephyr_interface
25+
OcrePlatformBase
2426
)

0 commit comments

Comments
 (0)