mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 19:09:00 +08:00
e2ff466f65
* [boost-locale] Use CMAKE_SYSTEM_NAME as a fallback where VCPKG_TARGET_IS_WINDOWS is not available * fix this issue in a different way * Remove comments in b2-options.cmake.in Co-authored-by: nicole mazzuca <mazzucan@outlook.com> * fix generate-ports.ps1 Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
32 lines
963 B
CMake
32 lines
963 B
CMake
set(_B2_OPTIONS_FEATURES "@FEATURES@")
|
|
if("icu" IN_LIST _B2_OPTIONS_FEATURES)
|
|
set(BOOST_LOCALE_ICU_FEATURE on)
|
|
else()
|
|
set(BOOST_LOCALE_ICU_FEATURE off)
|
|
endif()
|
|
|
|
if(@VCPKG_TARGET_IS_WINDOWS@)
|
|
list(APPEND B2_OPTIONS
|
|
boost.locale.iconv=off
|
|
boost.locale.posix=off
|
|
/boost/locale//boost_locale
|
|
boost.locale.icu=${BOOST_LOCALE_ICU_FEATURE}
|
|
)
|
|
else()
|
|
find_library(LIBICONV_LIBRARY iconv)
|
|
get_filename_component(LIBICONV_DIR "${LIBICONV_LIBRARY}" DIRECTORY)
|
|
|
|
list(APPEND B2_OPTIONS
|
|
boost.locale.iconv=on
|
|
boost.locale.posix=on
|
|
/boost/locale//boost_locale
|
|
boost.locale.icu=${BOOST_LOCALE_ICU_FEATURE}
|
|
-sICONV_PATH=${LIBICONV_DIR}
|
|
)
|
|
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "wasm32")
|
|
list(APPEND B2_OPTIONS
|
|
boost.locale.force-found-iconv=on
|
|
)
|
|
endif()
|
|
endif()
|