Skip to content

Commit

Permalink
Merge pull request #339 from suda-morris/bugfix/build_thorvg_no_pic
Browse files Browse the repository at this point in the history
fix(thorvg): build static library without -fPIC
  • Loading branch information
suda-morris authored Jun 14, 2024
2 parents 46213e9 + a48e8d1 commit 64ba4fe
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions thorvg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ endif()

file(APPEND ${TVG_CROSS_CFG} "
[host_machine]
system = 'freertos'
system = 'android'
cpu_family = '${CMAKE_SYSTEM}'
cpu = 'esp'
endian = 'little'
Expand All @@ -94,14 +94,15 @@ ExternalProject_Add(${TVG_LIB}_target
--cross-file ${TVG_CROSS_CFG}
-Dbindings=capi
-Dextra=
-Ddefault_library=static
-Dthreads=false
-Ddefault_library=static # build static library
-Db_staticpic=false # no -fPIC
-Dthreads=true # allow multi-threading
BUILD_COMMAND ninja -C ${TVG_BUILD_DIR}
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${TVG_BUILD_DIR}/src/${TVG_LIB}.a
)

add_prebuilt_library(${TVG_LIB} ${TVG_BUILD_DIR}/src/${TVG_LIB}.a PRIV_REQUIRES esp_rom)
add_prebuilt_library(${TVG_LIB} ${TVG_BUILD_DIR}/src/${TVG_LIB}.a PRIV_REQUIRES pthread)
add_dependencies(${TVG_LIB} ${TVG_LIB}_target)

target_link_libraries(${COMPONENT_LIB} INTERFACE ${TVG_LIB})
2 changes: 1 addition & 1 deletion thorvg/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "0.13.6~1"
version: "0.13.8"
description: "ThorVG is an open-source graphics library designed for creating vector-based scenes and animations"
url: https://github.com/espressif/idf-extra-components/tree/master/thorvg
repository: "https://github.com/espressif/idf-extra-components.git"
Expand Down
4 changes: 2 additions & 2 deletions thorvg/sbom_thorvg.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: thorvg
version: 0.13.6
version: 0.13.8
cpe: cpe:2.3:a:thorvg:thorvg:{}:*:*:*:*:*:*:*
supplier: 'Organization: thorvg <https://github.com/thorvg/thorvg>'
description: ThorVG is an open-source graphics library designed for creating vector-based scenes and animations.
url: https://github.com/thorvg/thorvg
hash: 20f82982b096425800e1f7d40f1c17a5c17baac2
hash: 30aa742b26e35e170f927c8e5ebdaa68dea6f48f

0 comments on commit 64ba4fe

Please sign in to comment.