summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt5
-rwxr-xr-xsrc/lang_cfg.py8
2 files changed, 3 insertions, 10 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1ca6d43..155bf77 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -11,6 +11,7 @@ include_directories(
file(MAKE_DIRECTORY ${GENERATED_SRC})
+file(GLOB LANGUAGE_FILES "${CMAKE_SOURCE_DIR}/src/translator_??.h")
# instead of increasebuffer.py
add_definitions(-DYY_BUF_SIZE=262144 -DYY_READ_BUF_SIZE=262144)
@@ -54,11 +55,11 @@ add_custom_command(
)
set_source_files_properties(${GENERATED_SRC}/ce_parse.h PROPERTIES GENERATED 1)
-
# lang_cfg.h
add_custom_command(
COMMENT "Generating ${GENERATED_SRC}/lang_cfg.h"
- COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/lang_cfg.cmake ENONLY 2> ${GENERATED_SRC}/lang_cfg.h
+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/lang_cfg.cmake ${LANG_CODES} 2> ${GENERATED_SRC}/lang_cfg.h
+ DEPENDS ${LANGUAGE_FILES}
OUTPUT ${GENERATED_SRC}/lang_cfg.h
)
set_source_files_properties(${GENERATED_SRC}/lang_cfg.h PROPERTIES GENERATED 1)
diff --git a/src/lang_cfg.py b/src/lang_cfg.py
deleted file mode 100755
index efed05f..0000000
--- a/src/lang_cfg.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import sys
-
-if (len(sys.argv) > 1):
- if (sys.argv[1] == "ENONLY"):
- print("#define ENGLISH_ONLY")
- else:
- for x in range(1, len(sys.argv)):
- print("#define LANG_%s"%(sys.argv[x]))