]> git.pld-linux.org Git - packages/kde4-l10n.git/blame - kde4-l10n.cmake
- Up to 4.11.4.
[packages/kde4-l10n.git] / kde4-l10n.cmake
CommitLineData
07a9e949
BZ
1project(kde-i18n)
2
3# for empty dirs
4CMAKE_POLICY(SET CMP0014 OLD)
5
6# Search KDE installation
7find_package(KDE4 REQUIRED)
8find_package(Gettext REQUIRED)
9include (KDE4Defaults)
10include(MacroOptionalAddSubdirectory)
11
12if (NOT GETTEXT_MSGMERGE_EXECUTABLE)
13 MESSAGE(FATAL_ERROR "Please install the msgmerge binary")
14endif (NOT GETTEXT_MSGMERGE_EXECUTABLE)
15
16IF(NOT GETTEXT_MSGFMT_EXECUTABLE)
17 MESSAGE(FATAL_ERROR "Please install the msgfmt binary")
18endif (NOT GETTEXT_MSGFMT_EXECUTABLE)
19
20# Usage list_subdirectories(the_list_is_returned_here dir 1)
21macro(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})
34endmacro()
35
36list_subdirectories(DIRS ${CMAKE_CURRENT_SOURCE_DIR} 1)
37
38foreach(DIR ${DIRS})
39 macro_optional_add_subdirectory(${DIR})
40endforeach()
This page took 0.096637 seconds and 4 git commands to generate.