cmake: update macOS deploy for newer boost

This commit is contained in:
selsta
2025-08-25 18:54:40 +02:00
parent c89f8eca91
commit cabbbaf172

View File

@@ -26,16 +26,19 @@ if(APPLE OR (WIN32 AND NOT STATIC))
) )
endif() endif()
# libbost_filesyste-mt.dylib has a dependency on libboost_atomic-mt.dylib, maydeployqt does not copy it by itself # Copy Boost dylibs that macdeployqt doesn't pick up
find_package(Boost COMPONENTS atomic) find_package(Boost QUIET COMPONENTS atomic container date_time)
get_target_property(BOOST_ATOMIC_LIB_PATH Boost::atomic LOCATION) set(_boost_extras Boost::atomic Boost::container Boost::date_time)
if(EXISTS ${BOOST_ATOMIC_LIB_PATH}) foreach(_tgt IN LISTS _boost_extras)
add_custom_command(TARGET deploy if(TARGET ${_tgt})
POST_BUILD add_custom_command(TARGET deploy POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${BOOST_ATOMIC_LIB_PATH}" "$<TARGET_FILE_DIR:monero-wallet-gui>/../Frameworks/" COMMAND ${CMAKE_COMMAND} -E copy
COMMENT "Copying libboost_atomic-mt.dylib" "$<TARGET_FILE:${_tgt}>"
) "$<TARGET_FILE_DIR:monero-wallet-gui>/../Frameworks/"
endif() COMMENT "Copying $<TARGET_FILE_NAME:${_tgt}>"
)
endif()
endforeach()
# Apple Silicon requires all binaries to be codesigned # Apple Silicon requires all binaries to be codesigned
find_program(CODESIGN_EXECUTABLE NAMES codesign) find_program(CODESIGN_EXECUTABLE NAMES codesign)