Set LANGUAGES dynamically at build time, this allows easily add new languages just by placing .po into src/translations dir Author: Elan Ruusamäe --- clementine-0.5.3/src/CMakeLists.txt~ 2010-10-20 13:10:28.276756134 +0300 +++ clementine-0.5.3/src/CMakeLists.txt 2010-10-20 13:10:33.456551043 +0300 @@ -327,41 +327,12 @@ set(LINGUAS "All" CACHE STRING "A space-seperated list of translations to compile in to Clementine, or \"None\".") if (LINGUAS STREQUAL "All") - set (LANGUAGES - ar - bg - ca - cs - da - de - el - en_CA - en_GB - es - fi - fr - gl - hu - it - kk - lt - nb - nl - oc - pl - pt - pt_BR - ro - ru - sk - sl - sr - sv - tr - uk - zh_CN - zh_TW - ) + # build LANGUAGES from all existing .po files + file(GLOB pofiles translations/*.po) + foreach(pofile ${pofiles}) + get_filename_component(lang ${pofile} NAME_WE) + list(APPEND LANGUAGES ${lang}) + endforeach(pofile) else (LINGUAS STREQUAL "All") if (NOT LINGUAS OR LINGUAS STREQUAL "None") set (LANGUAGES "")