]>
Commit | Line | Data |
---|---|---|
07a9e949 BZ |
1 | project(kde-i18n) |
2 | ||
3 | # for empty dirs | |
4 | CMAKE_POLICY(SET CMP0014 OLD) | |
5 | ||
6 | # Search KDE installation | |
7 | find_package(KDE4 REQUIRED) | |
8 | find_package(Gettext REQUIRED) | |
9 | include (KDE4Defaults) | |
10 | include(MacroOptionalAddSubdirectory) | |
11 | ||
12 | if (NOT GETTEXT_MSGMERGE_EXECUTABLE) | |
13 | MESSAGE(FATAL_ERROR "Please install the msgmerge binary") | |
14 | endif (NOT GETTEXT_MSGMERGE_EXECUTABLE) | |
15 | ||
16 | IF(NOT GETTEXT_MSGFMT_EXECUTABLE) | |
17 | MESSAGE(FATAL_ERROR "Please install the msgfmt binary") | |
18 | endif (NOT GETTEXT_MSGFMT_EXECUTABLE) | |
19 | ||
20 | # Usage list_subdirectories(the_list_is_returned_here dir 1) | |
21 | macro(list_subdirectories retval curdir return_relative) | |
22 | file(GLOB sub-dir RELATIVE ${curdir} *) | |
23 | set(list_of_dirs "") | |
24 | foreach(dir ${sub-dir}) | |
25 | if(IS_DIRECTORY ${curdir}/${dir}) | |
26 | if (${return_relative}) | |
27 | set(list_of_dirs ${list_of_dirs} ${dir}) | |
28 | else() | |
29 | set(list_of_dirs ${list_of_dirs} ${curdir}/${dir}) | |
30 | endif() | |
31 | endif() | |
32 | endforeach() | |
33 | set(${retval} ${list_of_dirs}) | |
34 | endmacro() | |
35 | ||
36 | list_subdirectories(DIRS ${CMAKE_CURRENT_SOURCE_DIR} 1) | |
37 | ||
38 | foreach(DIR ${DIRS}) | |
39 | macro_optional_add_subdirectory(${DIR}) | |
40 | endforeach() |