@ -9,6 +9,7 @@ find_program(MAKE make REQUIRED)
option ( WASI_SDK_DEBUG_PREFIX_MAP "Pass `-fdebug-prefix-map` for built artifacts" ON )
option ( WASI_SDK_INCLUDE_TESTS "Whether or not to build tests by default" OFF )
option ( WASI_SDK_INSTALL_TO_CLANG_RESOURCE_DIR "Whether or not to modify the compiler's resource directory" OFF )
set ( wasi_tmp_install ${ CMAKE_CURRENT_BINARY_DIR } /install )
set ( wasi_sysroot ${ wasi_tmp_install } /share/wasi-sysroot )
@ -246,13 +247,14 @@ endforeach()
install ( DIRECTORY ${ wasi_tmp_install } /share
U S E _ S O U R C E _ P E R M I S S I O N S
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } )
cmake_path ( IS_PREFIX CMAKE_INSTALL_PREFIX ${ clang_resource_dir } NORMALIZE install_resource_dir )
if ( install_resource_dir )
if ( WASI_SDK_INSTALL_TO_CLANG_RESOURCE_DIR )
install ( DIRECTORY ${ wasi_resource_dir } /lib
U S E _ S O U R C E _ P E R M I S S I O N S
D E S T I N A T I O N $ { c l a n g _ r e s o u r c e _ d i r } )
else ( )
message ( STATUS "The resource dir (${clang_resource_dir}) will not be updated by the install target because it's out of CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}" )
install ( DIRECTORY ${ wasi_resource_dir } /lib
U S E _ S O U R C E _ P E R M I S S I O N S
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } / c l a n g - r e s o u r c e - d i r )
endif ( )
# A d d a t o p - l e v e l ` b u i l d ` t a r g e t a s w e l l a s ` b u i l d - $ t a r g e t ` t a r g e t s .