cmake: added target traintastic-lang for generating language files
Dieser Commit ist enthalten in:
Ursprung
022a9f97a5
Commit
207c9ffd88
@ -23,7 +23,9 @@ add_executable(traintastic-client
|
||||
gfx/common.qrc
|
||||
gfx/dark/dark.qrc
|
||||
gfx/light/light.qrc
|
||||
${TRANSLATION_FILES})
|
||||
)
|
||||
|
||||
add_dependencies(traintastic-client traintastic-lang)
|
||||
|
||||
add_definitions(-DQT_DEPRECATED_WARNINGS)
|
||||
|
||||
|
||||
@ -20,8 +20,11 @@ if(ENABLE_CLANG_TIDY)
|
||||
set(CMAKE_CXX_CLANG_TIDY clang-tidy -checks=-*,readability-*,-readability-braces-around-statements,-readability-implicit-bool-conversion,-readability-magic-numbers)
|
||||
endif()
|
||||
|
||||
add_executable(traintastic-server src/main.cpp src/options.hpp ${TRANSLATION_FILES})
|
||||
add_executable(traintastic-server-test test/main.cpp ${TRANSLATION_FILES})
|
||||
add_executable(traintastic-server src/main.cpp src/options.hpp)
|
||||
add_executable(traintastic-server-test test/main.cpp)
|
||||
|
||||
add_dependencies(traintastic-server traintastic-lang)
|
||||
add_dependencies(traintastic-server-test traintastic-lang)
|
||||
|
||||
target_compile_definitions(traintastic-server-test PRIVATE -DTRAINTASTIC_TEST)
|
||||
|
||||
|
||||
@ -3,9 +3,9 @@ find_package(Python3)
|
||||
file(GLOB TRANSLATION_FILES "${CMAKE_CURRENT_LIST_DIR}/*.json")
|
||||
list(TRANSFORM TRANSLATION_FILES REPLACE "[.]json$" ".lang")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${TRANSLATION_FILES}
|
||||
COMMAND Python3::Interpreter json2lang.py
|
||||
add_custom_target(
|
||||
traintastic-lang ALL
|
||||
Python3::Interpreter json2lang.py
|
||||
COMMENT "Updating language files"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||
DEPENDS ${TRANSLATION_SRC_FILES}
|
||||
)
|
||||
|
||||
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren