Skip to content

Commit

Permalink
Avoid re-downloading files when used as a subproject. (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Feb 6, 2024
1 parent 8085869 commit 7632978
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif()

set(KALDI_DECODER_VERSION "0.2.3")
set(KALDI_DECODER_VERSION "0.2.4")

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
Expand Down
4 changes: 2 additions & 2 deletions cmake/eigen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ function(download_eigen)
# please pre-download eigen
set(possible_file_locations
$ENV{HOME}/Downloads/eigen-3.4.0.tar.gz
${PROJECT_SOURCE_DIR}/eigen-3.4.0.tar.gz
${PROJECT_BINARY_DIR}/eigen-3.4.0.tar.gz
${CMAKE_SOURCE_DIR}/eigen-3.4.0.tar.gz
${CMAKE_BINARY_DIR}/eigen-3.4.0.tar.gz
/tmp/eigen-3.4.0.tar.gz
/star-fj/fangjun/download/github/eigen-3.4.0.tar.gz
)
Expand Down
4 changes: 2 additions & 2 deletions cmake/googletest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ function(download_googltest)
# please pre-download googletest
set(possible_file_locations
$ENV{HOME}/Downloads/googletest-1.13.0.tar.gz
${PROJECT_SOURCE_DIR}/googletest-1.13.0.tar.gz
${PROJECT_BINARY_DIR}/googletest-1.13.0.tar.gz
${CMAKE_SOURCE_DIR}/googletest-1.13.0.tar.gz
${CMAKE_BINARY_DIR}/googletest-1.13.0.tar.gz
/tmp/googletest-1.13.0.tar.gz
/star-fj/fangjun/download/github/googletest-1.13.0.tar.gz
)
Expand Down
16 changes: 8 additions & 8 deletions cmake/kaldifst.cmake
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
function(download_kaldifst)
include(FetchContent)

set(kaldifst_URL "https://github.com/k2-fsa/kaldifst/archive/refs/tags/v1.7.6.tar.gz")
set(kaldifst_URL2 "https://huggingface.co/csukuangfj/kaldi-hmm-gmm-cmake-deps/resolve/main/kaldifst-1.7.6.tar.gz")
set(kaldifst_HASH "SHA256=79280c0bb08b5ed1a2ab7c21320a2b071f1f0eb10d2f047e8d6f027f0d32b4d2")
set(kaldifst_URL "https://github.com/k2-fsa/kaldifst/archive/refs/tags/v1.7.10.tar.gz")
set(kaldifst_URL2 "https://hub.nuaa.cf/k2-fsa/kaldifst/archive/refs/tags/v1.7.10.tar.gz")
set(kaldifst_HASH "SHA256=7f7b3173a6584a6b1987f65ae7af2ac453d66b845f875a9d31074b8d2cd0de54")

# If you don't have access to the Internet,
# please pre-download kaldifst
set(possible_file_locations
$ENV{HOME}/Downloads/kaldifst-1.7.6.tar.gz
${PROJECT_SOURCE_DIR}/kaldifst-1.7.6.tar.gz
${PROJECT_BINARY_DIR}/kaldifst-1.7.6.tar.gz
/tmp/kaldifst-1.7.6.tar.gz
/star-fj/fangjun/download/github/kaldifst-1.7.6.tar.gz
$ENV{HOME}/Downloads/kaldifst-1.7.10.tar.gz
${CMAKE_SOURCE_DIR}/kaldifst-1.7.10.tar.gz
${CMAKE_BINARY_DIR}/kaldifst-1.7.10.tar.gz
/tmp/kaldifst-1.7.10.tar.gz
/star-fj/fangjun/download/github/kaldifst-1.7.10.tar.gz
)

foreach(f IN LISTS possible_file_locations)
Expand Down
6 changes: 3 additions & 3 deletions cmake/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ function(download_pybind11)
include(FetchContent)

set(pybind11_URL "https://github.com/pybind/pybind11/archive/refs/tags/v2.10.2.tar.gz")
set(pybind11_URL2 "https://huggingface.co/csukuangfj/sherpa-cmake-deps/resolve/main/pybind11-2.10.2.tar.gz")
set(pybind11_URL2 "https://hub.nuaa.cf/pybind/pybind11/archive/refs/tags/v2.10.2.tar.gz")
set(pybind11_HASH "SHA256=93bd1e625e43e03028a3ea7389bba5d3f9f2596abc074b068e70f4ef9b1314ae")

# If you don't have access to the Internet,
# please pre-download pybind11
set(possible_file_locations
$ENV{HOME}/Downloads/pybind11-2.10.2.tar.gz
${PROJECT_SOURCE_DIR}/pybind11-2.10.2.tar.gz
${PROJECT_BINARY_DIR}/pybind11-2.10.2.tar.gz
${CMAKE_SOURCE_DIR}/pybind11-2.10.2.tar.gz
${CMAKE_BINARY_DIR}/pybind11-2.10.2.tar.gz
/tmp/pybind11-2.10.2.tar.gz
/star-fj/fangjun/download/github/pybind11-2.10.2.tar.gz
)
Expand Down

0 comments on commit 7632978

Please sign in to comment.