-
Notifications
You must be signed in to change notification settings - Fork 215
/
CMakeLists.txt
88 lines (80 loc) · 2.37 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
######################################################################
#
# CMAKE build recipe for VxWorks OSAL implementation
#
######################################################################
# This CMake script generates targets specific to the VxWorks implementation
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc)
# The basic set of files which are always built
set(VXWORKS_BASE_SRCLIST
src/os-impl-binsem.c
src/os-impl-common.c
src/os-impl-console.c
src/os-impl-countsem.c
src/os-impl-errors.c
src/os-impl-dirs-globals.c
src/os-impl-files.c
src/os-impl-filesys.c
src/os-impl-heap.c
src/os-impl-idmap.c
src/os-impl-mutex.c
src/os-impl-queues.c
src/os-impl-tasks.c
src/os-impl-timebase.c
)
# Use portable blocks for basic I/O
set(VXWORKS_IMPL_SRCLIST
../portable/os-impl-posix-gettime.c
../portable/os-impl-console-bsp.c
../portable/os-impl-bsd-select.c
../portable/os-impl-posix-io.c
../portable/os-impl-posix-files.c
)
if (OSAL_CONFIG_INCLUDE_SHELL)
list(APPEND VXWORKS_IMPL_SRCLIST
src/os-impl-shell.c
)
else ()
list(APPEND VXWORKS_IMPL_SRCLIST
../portable/os-impl-no-shell.c
)
endif ()
if (CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL 7.0)
list(APPEND VXWORKS_IMPL_SRCLIST
../portable/os-impl-posix-dirs.c
)
else ()
list(APPEND VXWORKS_IMPL_SRCLIST
src/os-impl-dirs.c
)
endif ()
# If some form of module loading is configured,
# then build the module loader
if (OSAL_CONFIG_INCLUDE_DYNAMIC_LOADER)
list(APPEND VXWORKS_IMPL_SRCLIST
src/os-impl-loader.c
src/os-impl-symtab.c
)
else ()
list(APPEND VXWORKS_IMPL_SRCLIST
src/os-impl-no-module.c
../portable/os-impl-no-loader.c
../portable/os-impl-no-symtab.c
)
endif ()
if (OSAL_CONFIG_INCLUDE_NETWORK)
list(APPEND VXWORKS_IMPL_SRCLIST
src/os-impl-network.c
../portable/os-impl-bsd-sockets.c # Use BSD socket layer implementation
)
else()
list(APPEND VXWORKS_IMPL_SRCLIST
../portable/os-impl-no-network.c # non-implemented versions of all network APIs
../portable/os-impl-no-sockets.c # non-implemented versions of all socket APIs
)
endif ()
# Defines an OBJECT target named "osal_vxworks_impl" with selected source files
add_library(osal_vxworks_impl OBJECT
${VXWORKS_BASE_SRCLIST}
${VXWORKS_IMPL_SRCLIST}
)