File tree Expand file tree Collapse file tree 1 file changed +29
-7
lines changed Expand file tree Collapse file tree 1 file changed +29
-7
lines changed Original file line number Diff line number Diff line change 19
19
# ##############################################################################
20
20
21
21
if (CONFIG_LIBYUV )
22
- get_property (TARGET_SUPPORTS_SHARED_ORIG GLOBAL
23
- PROPERTY TARGET_SUPPORTS_SHARED_LIBS )
24
- set_property (GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE )
25
- add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /libyuv )
26
- nuttx_add_external_library (yuv )
27
- set_property (GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS
28
- ${TARGET_SUPPORTS_SHARED_ORIG} )
22
+
23
+ set (LIBYUV_DIR ${CMAKE_CURRENT_LIST_DIR} /libyuv )
24
+
25
+ if (NOT EXISTS ${LIBYUV_DIR} )
26
+ FetchContent_Declare (
27
+ libyuv_fetch
28
+ URL https://chromium.googlesource.com/libyuv/libyuv/+archive/refs/heads/${CONFIG_LIBYUV_BRANCH}.tar.gz
29
+ SOURCE_DIR
30
+ ${CMAKE_CURRENT_LIST_DIR} /libyuv
31
+ BINARY_DIR
32
+ ${CMAKE_BINARY_DIR} /apps/graphics/libyuv/libyuv
33
+ PATCH_COMMAND
34
+ patch -p0 -d ${CMAKE_CURRENT_LIST_DIR} <
35
+ ${CMAKE_CURRENT_LIST_DIR} /0001-include-libyuv-fix-strict-prototype-warning.patch
36
+ DOWNLOAD_NO_PROGRESS true
37
+ TIMEOUT 30 )
38
+
39
+ FetchContent_GetProperties (libyuv_fetch )
40
+
41
+ if (NOT libyuv_fetch_POPULATED )
42
+ FetchContent_Populate (llibyuv_fetch )
43
+ endif ()
44
+ endif ()
45
+
46
+ nuttx_add_library (libyuv STATIC )
47
+ file (GLOB SRCS ${LIBYUV_DIR} /source/*.cc )
48
+ target_sources (libyuv PRIVATE ${SRCS} )
49
+ target_compile_options (libyuv PRIVATE -Wno-shadow -Wno-undef )
50
+
29
51
set_property (
30
52
TARGET nuttx
31
53
APPEND
You can’t perform that action at this time.
0 commit comments