Warning, /frameworks/ktexttemplate/examples/contacts/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.5)
0002 
0003 project(contacts_ktexttemplate)
0004 
0005 find_package(KF6TextTemplate REQUIRED)
0006 
0007 set(CMAKE_INCLUDE_CURRENT_DIR ON)
0008 set(CMAKE_AUTOMOC ON)
0009 
0010 configure_file(ktexttemplate_paths.h.cmake ${PROJECT_BINARY_DIR}/ktexttemplate_paths.h)
0011 
0012 add_executable(contacts_linguist
0013   main_linguist.cpp
0014   mainwindow.cpp
0015   contact.cpp
0016 )
0017 target_link_libraries(
0018   contacts_linguist
0019   KF6::TextTemplate
0020 )
0021 
0022 find_package(Qt6WebEngineWidgets REQUIRED)
0023 find_package(Qt6LinguistTools REQUIRED)
0024 target_link_libraries(
0025   contacts_linguist
0026   Qt6::WebEngineWidgets
0027 )
0028 set(lupdate_exe Qt6::lupdate)
0029 set(lrelease_exe Qt6::lrelease)
0030 
0031 execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${PROJECT_SOURCE_DIR}/../../scripts" "${PROJECT_SOURCE_DIR}/scripts")
0032 
0033 set( LINGUIST_TS_ARGS COMMAND "${CMAKE_SOURCE_DIR}/scripts/extract_strings_linguist.py"
0034   "${CMAKE_SOURCE_DIR}/themes/linguist/bashful/*.html"
0035   "${CMAKE_SOURCE_DIR}/themes/linguist/sneezy/*.html"
0036   "${CMAKE_SOURCE_DIR}/themes/linguist/sleepy/*.html"
0037   ">" "${CMAKE_BINARY_DIR}/output.cpp"
0038   COMMAND ${lupdate_exe} "${CMAKE_BINARY_DIR}/output.cpp" "-ts" )
0039 
0040 set (CONTACTS_LOCALES "fr_FR" "de_DE" )
0041 
0042 foreach(CONTACT_LOCALE ${CONTACTS_LOCALES})
0043     list(APPEND LINGUIST_TS_ARGS "${CMAKE_SOURCE_DIR}/${CONTACT_LOCALE}.ts" )
0044 endforeach()
0045 
0046 add_custom_target(linguist_ts
0047   ${LINGUIST_TS_ARGS}
0048     VERBATIM
0049 )
0050 
0051 foreach(CONTACT_LOCALE ${CONTACTS_LOCALES})
0052     list(APPEND _LINGUIST_QM_ARGS COMMAND ${lrelease_exe} "${CMAKE_SOURCE_DIR}/${CONTACT_LOCALE}.ts" "-qm" "${CMAKE_BINARY_DIR}/contacts_${CONTACT_LOCALE}.qm" )
0053 endforeach()
0054 
0055 add_custom_target(linguist_qm
0056   ${_LINGUIST_QM_ARGS}
0057 )