From f2ff2914227b56b83f2082f32fe8cb9fd5094de6 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Fri, 8 Sep 2023 19:42:08 +0800 Subject: [PATCH] Install fstscript only for python build (#52) * Install fstscript only for python build * Release v1.7.6 --- CMakeLists.txt | 2 +- cmake/openfst.cmake | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 85b089c..fea3731 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR) project(kaldifst CXX) -set(KALDIFST_VERSION "1.7.5") +set(KALDIFST_VERSION "1.7.6") if(NOT CMAKE_BUILD_TYPE) message(STATUS "No CMAKE_BUILD_TYPE given, default to Release") diff --git a/cmake/openfst.cmake b/cmake/openfst.cmake index f99cfc9..0e89d74 100644 --- a/cmake/openfst.cmake +++ b/cmake/openfst.cmake @@ -73,12 +73,17 @@ function(download_openfst) # Rename libfst.so.6 to libkaldifst_fst.so.6 to avoid potential conflicts # when kaldifst is installed. set_target_properties(fst PROPERTIES OUTPUT_NAME "kaldifst_fst") - set_target_properties(fstscript PROPERTIES OUTPUT_NAME "kaldifst_fstscript") - install(TARGETS fst fstscript + install(TARGETS fst DESTINATION lib ) + if(KALDIFST_BUILD_PYTHON) + set_target_properties(fstscript PROPERTIES OUTPUT_NAME "kaldifst_fstscript") + install(TARGETS fstscript + DESTINATION lib + ) + endif() endfunction() download_openfst()