summaryrefslogtreecommitdiffstats
path: root/doc/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/CMakeLists.txt')
-rw-r--r--doc/CMakeLists.txt22
1 files changed, 17 insertions, 5 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 463cb40..19e0c1e 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,6 +1,18 @@
-add_subdirectory( de )
-add_subdirectory( en )
-add_subdirectory( fr )
-add_subdirectory( sv )
-add_subdirectory( man )
+file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * )
+string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
+
+list( REMOVE_ITEM _dirs "tdeioslave" )
+
+foreach( _dir ${_dirs} )
+ if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} AND
+ EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_dir}/CMakeLists.txt )
+ if( "${_dir}" STREQUAL "en" OR
+ "${_dir}" STREQUAL "man" OR
+ "${_linguas}" MATCHES "^;*$" OR
+ ";${_linguas};" MATCHES ";${_dir};" )
+ add_subdirectory( ${_dir} )
+ endif( )
+ endif()
+endforeach()
+
add_subdirectory( tdeioslave )