Skip to content

Commit 323f708

Browse files
authored
Fix installing on windows about the python module (#164)
1 parent b4260f7 commit 323f708

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
22
project(sherpa-ncnn)
33

4-
set(SHERPA_NCNN_VERSION "1.7.0")
4+
set(SHERPA_NCNN_VERSION "1.8.0")
55

66
# Disable warning about
77
#

cmake/kaldi-native-fbank.cmake

+5-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ function(download_kaldi_native_fbank)
4646
message(STATUS "kaldi-native-fbank's binary dir is ${kaldi_native_fbank_BINARY_DIR}")
4747

4848
add_subdirectory(${kaldi_native_fbank_SOURCE_DIR} ${kaldi_native_fbank_BINARY_DIR})
49-
install(TARGETS kaldi-native-fbank-core DESTINATION lib)
49+
if(SHERPA_NCNN_ENABLE_PYTHON AND WIN32)
50+
install(TARGETS kaldi-native-fbank-core DESTINATION ..)
51+
else()
52+
install(TARGETS kaldi-native-fbank-core DESTINATION lib)
53+
endif()
5054

5155
target_include_directories(kaldi-native-fbank-core
5256
INTERFACE

cmake/ncnn.cmake

+5-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,11 @@ function(download_ncnn)
173173
message(STATUS "ncnn's binary dir is ${ncnn_BINARY_DIR}")
174174

175175
add_subdirectory(${ncnn_SOURCE_DIR} ${ncnn_BINARY_DIR})
176-
install(TARGETS ncnn DESTINATION lib)
176+
if(SHERPA_NCNN_ENABLE_PYTHON AND WIN32)
177+
install(TARGETS ncnn DESTINATION ..)
178+
else()
179+
install(TARGETS ncnn DESTINATION lib)
180+
endif()
177181
endfunction()
178182

179183
download_ncnn()

sherpa-ncnn/csrc/CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ set(sherpa_ncnn_core_srcs
2020
)
2121
add_library(sherpa-ncnn-core ${sherpa_ncnn_core_srcs})
2222
target_link_libraries(sherpa-ncnn-core PUBLIC kaldi-native-fbank-core ncnn)
23-
install(TARGETS sherpa-ncnn-core DESTINATION lib)
23+
24+
if(SHERPA_NCNN_ENABLE_PYTHON AND WIN32)
25+
install(TARGETS sherpa-ncnn-core DESTINATION ..)
26+
else()
27+
install(TARGETS sherpa-ncnn-core DESTINATION lib)
28+
endif()
2429

2530
if(NOT SHERPA_NCNN_ENABLE_PYTHON)
2631
if(SHERPA_NCNN_ENABLE_BINARY)

0 commit comments

Comments
 (0)