CMake: Install simdutf runtime components as required

Using install(IMPORTED_RUNTIME_ARTIFACTS), we can re-export the
shared library and frameworks we imported from outside the build
tree into our install treer. This is required for simdutf as it
is a dependency of the AK library, and we need liblagom-ak.so to
be loadable when doing fuzzer and cross-compile builds for the
Lagom tools.
This commit is contained in:
Andrew Kaster 2024-11-05 13:59:35 -07:00 committed by Andrew Kaster
parent 35639ebc77
commit dfd928a8f8
Notes: github-actions[bot] 2024-11-06 17:40:26 +00:00

View file

@ -61,6 +61,14 @@ find_package(simdutf REQUIRED)
swizzle_target_properties_for_swift(simdutf::simdutf) swizzle_target_properties_for_swift(simdutf::simdutf)
target_link_libraries(AK PRIVATE simdutf::simdutf) target_link_libraries(AK PRIVATE simdutf::simdutf)
# FIXME: Make this generic for all imported shared library dependencies and apply globally
if (NOT CMAKE_SKIP_INSTALL_RULES AND NOT "${VCPKG_INSTALLED_DIR}" STREQUAL "")
install(IMPORTED_RUNTIME_ARTIFACTS simdutf::simdutf
LIBRARY COMPONENT Lagom_Runtime NAMELINK_COMPONENT Lagom_Development
FRAMEWORK COMPONENT Lagom_Runtime
)
endif()
if (ENABLE_SWIFT) if (ENABLE_SWIFT)
generate_clang_module_map(AK generate_clang_module_map(AK
GENERATED_FILES GENERATED_FILES