Skip to content

Commit 8fb7cbd

Browse files
committed
fix(cmake,ios): fold QR encoder into libtcvm
The Xcode static-library target does not propagate QR encoder symbols to the final app link. Add the selected QR archive to the libtool dependency list so its symbols are merged into libtcvm.a.
1 parent e3bfe11 commit 8fb7cbd

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

TotalCrossVM/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,10 @@ endif()
703703
# XCode Properties
704704
if(CMAKE_GENERATOR STREQUAL Xcode)
705705
# Fold prebuilt native dependencies into libtcvm.a at archive creation time.
706+
get_target_property(TC_QRCODE_LIBRARY_PATH ${TC_QRCODE_LIBRARY} IMPORTED_LOCATION)
707+
if(NOT TC_QRCODE_LIBRARY_PATH)
708+
message(FATAL_ERROR "Unable to resolve the selected QR Code static library")
709+
endif()
706710
set(TCVM_XCODE_ARCHIVE_DEPENDENCIES
707711
"${PNG_LIBRARY}"
708712
"${ZLIB_LIBRARY}"
@@ -711,6 +715,7 @@ if(CMAKE_GENERATOR STREQUAL Xcode)
711715
"${SQLITE3_LIBRARIES}"
712716
"${MBEDTLS_LIBRARIES}"
713717
"${AXTLS_LIBRARY}"
718+
"${TC_QRCODE_LIBRARY_PATH}"
714719
)
715720
if(TCVM_ENABLE_SKIA)
716721
set(TCVM_XCODE_ARCHIVE_DEPENDENCIES

0 commit comments

Comments
 (0)