Build resource file.

Generate expected_locale_keys from cmakefile
This commit is contained in:
Twan van Laarhoven
2020-04-10 14:23:54 +02:00
parent 6e7a4485a8
commit 4ebf0c51ee
4 changed files with 228 additions and 664 deletions
+10
View File
@@ -29,6 +29,16 @@ file(GLOB_RECURSE sources src/*.cpp)
target_sources(magicseteditor PRIVATE ${sources})
target_precompile_headers(magicseteditor PRIVATE src/util/prec.hpp)
set(locale_keys_file "${PROJECT_SOURCE_DIR}/resource/expected_locale_keys")
add_custom_command(
COMMAND perl "${PROJECT_SOURCE_DIR}/tools/locale/locale.pl" "${PROJECT_SOURCE_DIR}/src" ${locale_keys_file}
OUTPUT ${locale_keys_file}
DEPENDS ${sources}
)
add_custom_target(generate_expected_locale_keys DEPENDS ${locale_keys_file})
add_dependencies(magicseteditor generate_expected_locale_keys)
target_sources(magicseteditor PRIVATE resource/win32_res.rc)
# warnings
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
# Update if necessary