Permalink
Browse files

Added support for language codes

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed May 31, 2015
1 parent 5f67c67 commit eae07d978b524c787daeab911ca087b47a964577
Showing with 19 additions and 18 deletions.
  1. +0 −1 .gitignore
  2. +14 −0 CMakeLists.txt
  3. +1 −0 VERSION
  4. +1 −1 cmake/lang_cfg.cmake
  5. +0 −6 cmake/version.cmake
  6. +3 −2 src/CMakeLists.txt
  7. +0 −8 src/lang_cfg.py
View
@@ -9,7 +9,6 @@
*.pro
/.makeconfig
/.tmakeconfig
/VERSION
/src/libdoxycfg.t
/src/libdoxygen.t
/packages/rpm/doxygen.spec
View
@@ -22,6 +22,7 @@ option(build_doc "Build user manual" OFF)
option(use_sqlite3 "Add support for sqlite3 output [experimental]." OFF)
option(use_libclang "Add support for libclang parsing." OFF)
option(win_static "Link with /MT in stead of /MD on windows" OFF)
option(english_only "Only compile in support for the English language" OFF)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(version)
@@ -72,6 +73,19 @@ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(CUSTOM_INCLUDE_DIR "" CACHE FILEPATH "Extra include path")
set(CUSTOM_LINK_DIR "" CACHE FILEPATH "Extra library path")
# gather lang codes for translation
if (english_only) # user only wants English
set(LANG_CODES "ENONLY")
else() # find languages based on available translator files
set(LANG_CODES "")
file(GLOB lang_files RELATIVE "${CMAKE_SOURCE_DIR}/src" "${CMAKE_SOURCE_DIR}/src/translator_??.h")
foreach (_lang ${lang_files})
string(REGEX REPLACE "translator_(.*).h" "\\1" _lang_code ${_lang})
string(TOUPPER ${_lang_code} lang_code)
list(APPEND LANG_CODES "${lang_code}")
endforeach()
endif()
if (${CUSTOM_INCLUDE_DIR})
include_directories(${CUSTOM_INCLUDE_DIR})
endif()
View
@@ -0,0 +1 @@
1.8.9.1
View
@@ -4,7 +4,7 @@ if(${CMAKE_ARGC} GREATER 1)
else()
math(EXPR UPTO ${CMAKE_ARGC}-1)
foreach(i RANGE 3 ${UPTO})
message("#define ENGLISH_${CMAKE_ARGV${i}}")
message("#define LANG_${CMAKE_ARGV${i}}")
endforeach()
endif()
endif()
View
@@ -1,8 +1,2 @@
file (STRINGS "VERSION" VERSION)
#string(REGEX MATCH "([0-9]+).([0-9]+).([0-9]+)" ${doxygen_version_major} ${doxygen_version_minor} ${doxygen_version_revision} )
#set(doxygen_version_major "1" CACHE STRING "Major")
#set(doxygen_version_minor "8" CACHE STRING "Minor")
#set(doxygen_version_revision "9.1" CACHE STRING "Revision")
#set(doxygen_version_mmn "-5" CACHE STRING "Mmn")
#set(VERSION "${doxygen_version_major}.${doxygen_version_minor}.${doxygen_version_revision}${doxygen_version_mmn}")
set(ENV{VERSION} "${VERSION}")
View
@@ -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)
View

This file was deleted.

Oops, something went wrong.

0 comments on commit eae07d9

Please sign in to comment.