From ed8b1bcdad7c430af1eef5fbe78b6ec4eb3eb60e Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Thu, 7 Oct 2021 03:37:12 +0200 Subject: Add sample dictionary downloaders/builders --- CMakeLists.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index bd42553..9f07bfb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,6 +172,21 @@ endforeach () add_custom_target (tools DEPENDS ${tools}) +# Example dictionaries +file (GLOB dicts_scripts "${PROJECT_SOURCE_DIR}/dicts/*.sh") +set (dicts_targets) +foreach (dict_script ${dicts_scripts}) + get_filename_component (dict_name "${dict_script}" NAME_WE) + list (APPEND dicts_targets "dicts-${dict_name}") + add_custom_target (dicts-${dict_name} + COMMAND sh -c "PATH=.:$PATH \"$0\"" "${dict_script}" + DEPENDS tabfile + COMMENT "Generating sample dictionary ${dict_name}" + VERBATIM) +endforeach () + +add_custom_target (dicts DEPENDS ${dicts_targets}) + # The files to be installed include (GNUInstallDirs) install (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) @@ -212,4 +227,3 @@ set (CPACK_SOURCE_IGNORE_FILES "/\\\\.git;/build;/CMakeLists.txt.user") set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}") include (CPack) - -- cgit v1.2.3-70-g09d2