##
#   Copyright (C) 2004 - 2026 Université de Versailles Saint-Quentin-en-Yvelines (UVSQ)
#
#   This file is part of MAQAO.
#
#  MAQAO is free software; you can redistribute it and/or
#   modify it under the terms of the GNU Lesser General Public License
#   as published by the Free Software Foundation; either version 3
#   of the License, or (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU Lesser General Public License for more details.
#
#   You should have received a copy of the GNU Lesser General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
##

## Scan all directories to look for CMakeLists.txt files
FILE(GLOB
   all_files
   */
)
LIST(REMOVE_DUPLICATES all_files)

add_subdirectory(built_in)

FOREACH(file ${all_files})

   # Get the last part of "file"
   GET_FILENAME_COMPONENT(file_name ${file} NAME)
   
   IF (${file_name}_enabled)
      add_subdirectory(${file_name})
   ENDIF ()
   
ENDFOREACH(file)
