]> git.lyx.org Git - features.git/commitdiff
Cmake build: Initialize some variables before use.
authorKornel Benko <kornel@lyx.org>
Wed, 9 Dec 2015 14:37:58 +0000 (15:37 +0100)
committerKornel Benko <kornel@lyx.org>
Wed, 9 Dec 2015 14:37:58 +0000 (15:37 +0100)
development/autotests/ExportTests.cmake
development/cmake/modules/LyXMacros.cmake

index 4d3b316bf894bf5e04b62a7eb2f3cf9d679d6d55..6c5e4946417beafbad34dee605bd764bf4e02d54 100644 (file)
@@ -36,6 +36,14 @@ else()
   set(PDF_FORMATS "pdf" "pdf2" "pdf3")
 endif()
 
+set(potential_languages "ca" "cs" "da" "de" "el" "es" "eu" "fa" "fr" "gl" "he" "hu" "id" "it" "ja" "ko" "nb" "nl" "pl" "pt" "ro" "ru" "sk" "sl" "sr" "sv" "uk" "zh_CN")
+
+macro(initLangVars varname)
+  foreach(_l ${potential_languages})
+    set(${varname}_${_l})
+  endforeach()
+endmacro()
+
 macro(getoutputformats filepath varname)
   file(STRINGS "${filepath}" lines)
   # What should we test, if default_output_format is not defined?
@@ -164,6 +172,8 @@ endmacro()
 macro(loadTestList filename resList depth)
   # Create list of strings from a file without comments
   # ENCODING parameter is a new feature in cmake 3.1
+  initLangVars(${resList})
+  initLangVars("sublabel")
   if (CMAKE_VERSION VERSION_GREATER "3.1")
     file(STRINGS ${filename} tempList ENCODING "UTF-8")
   else()
index c0dd65e2369c12a3b407043bbb85907d1f34b015..11a050cba34331811f83e0f3964f5703e84771b6 100644 (file)
@@ -104,7 +104,9 @@ macro(LYX_AUTOMOC)
 
                                        set(_moc  ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
                                        if (WIN32)
-                                                         set(_def -D_WIN32)
+                                               set(_def -D_WIN32)
+                                       else()
+                                               set(_def)
                                        endif()
                                        #set(_moc ${_abs_PATH}/${_current_MOC})
                                        add_custom_command(OUTPUT ${_moc}