cmake: install compat binaries

This commit is contained in:
Yury Popov
2023-03-23 22:00:54 +03:00
committed by Alexander Epaneshnikov
parent 631a8f3fa1
commit 5161577a6d
2 changed files with 12 additions and 2 deletions
+2
View File
@@ -12,3 +12,5 @@ if (HAVE_PTHREAD)
else()
set(USE_ASYNC OFF)
endif()
option(ESPEAK_COMPAT "Install compat binary symlinks" OFF)
+10 -2
View File
@@ -19,10 +19,18 @@ endif()
if (NOT WIN32)
add_custom_target(
speak-ng ALL
${CMAKE_COMMAND} -E create_symlink espeak-ng ${CMAKE_CURRENT_BINARY_DIR}/speak-ng
COMMENT "Link espeak-ng to speak-ng"
COMMAND ${CMAKE_COMMAND} -E create_symlink espeak-ng ${CMAKE_CURRENT_BINARY_DIR}/speak-ng
COMMAND ${CMAKE_COMMAND} -E create_symlink espeak-ng ${CMAKE_CURRENT_BINARY_DIR}/espeak
COMMAND ${CMAKE_COMMAND} -E create_symlink espeak-ng ${CMAKE_CURRENT_BINARY_DIR}/speak
COMMENT "Link espeak-ng to compat names"
DEPENDS espeak-ng-bin
)
endif()
install(TARGETS espeak-ng-bin)
install(DIRECTORY include/espeak include/espeak-ng TYPE INCLUDE)
if (ESPEAK_COMPAT AND NOT WIN32)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/speak-ng DESTINATION bin)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/espeak DESTINATION bin)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/speak DESTINATION bin)
endif()