forked from blue/squawk
initial code translation preparation, russian localization
This commit is contained in:
parent
746fdef013
commit
8afdb81314
14 changed files with 781 additions and 75 deletions
|
@ -1,16 +1,15 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
project(squawk)
|
||||
|
||||
# Find includes in corresponding build directories
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
# Instruct CMake to run moc automatically when needed.
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
# Instruct CMake to create code from Qt designer ui files
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
find_package(Qt5Widgets CONFIG REQUIRED)
|
||||
find_package(Qt5LinguistTools)
|
||||
|
||||
set(squawk_SRC
|
||||
main.cpp
|
||||
global.cpp
|
||||
|
@ -18,7 +17,15 @@ set(squawk_SRC
|
|||
signalcatcher.cpp
|
||||
)
|
||||
|
||||
add_executable(squawk ${squawk_SRC} resources/resources.qrc)
|
||||
set(TS_FILES
|
||||
translations/squawk.ru.ts
|
||||
)
|
||||
qt5_add_translation(QM_FILES ${TS_FILES})
|
||||
add_custom_target(translations ALL DEPENDS ${QM_FILES})
|
||||
|
||||
qt5_add_resources(RCC resources/resources.qrc)
|
||||
|
||||
add_executable(squawk ${squawk_SRC} ${RCC})
|
||||
target_link_libraries(squawk Qt5::Widgets)
|
||||
|
||||
add_subdirectory(ui)
|
||||
|
@ -29,5 +36,8 @@ target_link_libraries(squawk squawkUI)
|
|||
target_link_libraries(squawk squawkCORE)
|
||||
target_link_libraries(squawk uuid)
|
||||
|
||||
add_dependencies(${CMAKE_PROJECT_NAME} translations)
|
||||
|
||||
# Install the executable
|
||||
install(TARGETS squawk DESTINATION bin)
|
||||
install(FILES ${QM_FILES} DESTINATION share/l10n)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue