Skip to content

Commit

Permalink
cmake: Use piper_phonemize_SOURCE_DIR
Browse files Browse the repository at this point in the history
If you import the project (Add_ExternalProject) CMAKE_SOURCE_DIR is
pointing to a different directory.
  • Loading branch information
cryptomilk committed Mar 13, 2024
1 parent a1a83cf commit 5199b4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ enable_testing()
add_executable(test_piper_phonemize src/test.cpp src/phoneme_ids.cpp)
add_test(
NAME test_piper_phonemize
COMMAND test_piper_phonemize "${ESPEAK_NG_DIR}/share/espeak-ng-data" "${CMAKE_SOURCE_DIR}/etc/libtashkeel_model.ort"
COMMAND test_piper_phonemize "${ESPEAK_NG_DIR}/share/espeak-ng-data" "${piper_phonemize_SOURCE_DIR}/etc/libtashkeel_model.ort"
)

target_compile_features(test_piper_phonemize PUBLIC cxx_std_17)
Expand Down Expand Up @@ -266,7 +266,7 @@ install(
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

install(
DIRECTORY ${CMAKE_SOURCE_DIR}/src/
DIRECTORY ${piper_phonemize_SOURCE_DIR}/src/
DESTINATION include/piper-phonemize
FILES_MATCHING
PATTERN "*.h"
Expand All @@ -277,7 +277,7 @@ install(
ARCHIVE DESTINATION ${CMAKE_INSTALL_BINDIR})

install(
FILES ${CMAKE_SOURCE_DIR}/etc/libtashkeel_model.ort
FILES ${piper_phonemize_SOURCE_DIR}/etc/libtashkeel_model.ort
DESTINATION ${CMAKE_INSTALL_DATADIR}/piper-phonemize)

# Dependencies
Expand Down

0 comments on commit 5199b4e

Please sign in to comment.