fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Daniel Rainerasan: remove redundant handlingb62fa0675

master
1.3 KiB36 linesraw
1include(FeatureSummary)
2include(FindRust)
3find_package(Rust REQUIRED)
4
5set(FISH_RUST_BUILD_DIR "${CMAKE_BINARY_DIR}/cargo")
6
7if(DEFINED ASAN)
8    list(APPEND CARGO_FLAGS "-Z" "build-std")
9endif()
10if(DEFINED TSAN)
11    list(APPEND CARGO_FLAGS "-Z" "build-std")
12    list(APPEND FISH_CARGO_FEATURES_LIST "tsan")
13endif()
14
15if (Rust_CARGO_TARGET)
16    set(rust_target_dir "${FISH_RUST_BUILD_DIR}/${Rust_CARGO_TARGET}")
17else()
18    set(rust_target_dir "${FISH_RUST_BUILD_DIR}/${Rust_CARGO_HOST_TARGET}")
19endif()
20
21set(rust_profile $<IF:$<CONFIG:Debug>,debug,$<IF:$<CONFIG:RelWithDebInfo>,release-with-debug,release>>)
22
23if (NOT DEFINED WITH_MESSAGE_LOCALIZATION) # Don't check for legacy options if the new one is defined, to help bisecting.
24    if(DEFINED WITH_GETTEXT)
25        message(FATAL_ERROR "the WITH_GETTEXT option is no longer supported, use -DWITH_MESSAGE_LOCALIZATION=ON|OFF")
26    endif()
27endif()
28option(WITH_MESSAGE_LOCALIZATION "Build with localization support. Requires `msgfmt` to work." ON)
29# Enable gettext feature unless explicitly disabled.
30if(NOT DEFINED WITH_MESSAGE_LOCALIZATION OR "${WITH_MESSAGE_LOCALIZATION}")
31    list(APPEND FISH_CARGO_FEATURES_LIST "localize-messages")
32endif()
33
34add_feature_info(Translation WITH_MESSAGE_LOCALIZATION "message localization (requires gettext)")
35
36list(JOIN FISH_CARGO_FEATURES_LIST , FISH_CARGO_FEATURES)