Warning, /packaging/yocto-meta-kde/recipes-support/libpinyin/0001-Optionally-install-utilities.patch is written in an unsupported language. File is not indexed.

0001 From f8e9f005451628552d0a93f7131aa80152ad80b8 Mon Sep 17 00:00:00 2001
0002 From: Andreas Cord-Landwehr <cordlandwehr@kde.org>
0003 Date: Sun, 3 Jan 2021 17:42:04 +0100
0004 Subject: [PATCH 1/3] Optionally install utilities
0005 
0006 This option is needed for cross-compiling the library, where the
0007 utilities have to be built for the host architecture and the library
0008 for the target architecture, while utilizing the utilities.
0009 ---
0010  CMakeLists.txt                |  4 ++++
0011  utils/storage/CMakeLists.txt  | 24 ++++++++++++++++++++++++
0012  utils/training/CMakeLists.txt |  8 ++++++++
0013  3 files changed, 36 insertions(+)
0014 
0015 diff --git a/CMakeLists.txt b/CMakeLists.txt
0016 index 4f62a9f..e291186 100644
0017 --- a/CMakeLists.txt
0018 +++ b/CMakeLists.txt
0019 @@ -65,6 +65,10 @@ check_type_size(size_t SIZE_OF_SIZE_T)
0020  set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
0021  find_package(GLIB2 REQUIRED)
0022  
0023 +# Options
0024 +
0025 +option(INSTALL_UTILS "Build QtMultimedia sound backend" OFF)
0026 +
0027  # DBM: BerkeleyDB
0028  find_package(BerkeleyDB)
0029  if (DB_FOUND)
0030 diff --git a/utils/storage/CMakeLists.txt b/utils/storage/CMakeLists.txt
0031 index 648f430..3a17a9c 100644
0032 --- a/utils/storage/CMakeLists.txt
0033 +++ b/utils/storage/CMakeLists.txt
0034 @@ -7,6 +7,14 @@ target_link_libraries(
0035      gen_binary_files
0036      pinyin
0037  )
0038 +if(INSTALL_UTILS)
0039 +    install(
0040 +        TARGETS
0041 +            gen_binary_files
0042 +        RUNTIME DESTINATION
0043 +            ${DIR_BIN}
0044 +    )
0045 +endif()
0046  
0047  add_executable(
0048      import_interpolation
0049 @@ -17,6 +25,14 @@ target_link_libraries(
0050      import_interpolation
0051      pinyin
0052  )
0053 +if(INSTALL_UTILS)
0054 +    install(
0055 +        TARGETS
0056 +            import_interpolation
0057 +        RUNTIME DESTINATION
0058 +            ${DIR_BIN}
0059 +    )
0060 +endif()
0061  
0062  add_executable(
0063      export_interpolation
0064 @@ -27,3 +43,11 @@ target_link_libraries(
0065      export_interpolation
0066      pinyin
0067  )
0068 +if(INSTALL_UTILS)
0069 +    install(
0070 +        TARGETS
0071 +            export_interpolation
0072 +        RUNTIME DESTINATION
0073 +            ${DIR_BIN}
0074 +    )
0075 +endif()
0076 diff --git a/utils/training/CMakeLists.txt b/utils/training/CMakeLists.txt
0077 index 27620fb..7372dcc 100644
0078 --- a/utils/training/CMakeLists.txt
0079 +++ b/utils/training/CMakeLists.txt
0080 @@ -22,6 +22,14 @@ add_executable(
0081      gen_unigram
0082      gen_unigram.cpp
0083  )
0084 +if(INSTALL_UTILS)
0085 +    install(
0086 +        TARGETS
0087 +            gen_unigram
0088 +        RUNTIME DESTINATION
0089 +            ${DIR_BIN}
0090 +    )
0091 +endif()
0092  
0093  target_link_libraries(
0094      gen_unigram
0095 -- 
0096 2.34.1
0097