From 2200692e396bb68ad017a90072cdb273ec7b73f6 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 23 Oct 2017 12:58:27 -0700 Subject: [PATCH] Fix CMake configuration regarding application settings --- support/cmake/handle_applications.cmake | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/support/cmake/handle_applications.cmake b/support/cmake/handle_applications.cmake index db8393551f..d21ca57f6a 100644 --- a/support/cmake/handle_applications.cmake +++ b/support/cmake/handle_applications.cmake @@ -30,22 +30,26 @@ function (handle_applications) list(REMOVE_ITEM appDirs ".DS_Store") message(STATUS "Configuration application") + # First create all of the options for the applications. In case that one of the + # applications fail to include later, we still want all of them listed foreach (app ${appDirs}) set(app_dir "${OPENSPACE_APPS_DIR}/${app}") string(TOUPPER ${app} upper_app) - option(OPENSPACE_APPLICATION_${upper_app} "${app} Application" OFF) - get_application_attribute_default(${app_dir} is_default_application) - if (${is_default_application}) - option(OPENSPACE_APPLICATION_${upper_app} "Build ${app} application" ${is_default_application}) - endif () + option(OPENSPACE_APPLICATION_${upper_app} "Build ${app} application" ${is_default_application}) + endforeach () + foreach (app ${appDirs}) + set(app_dir "${OPENSPACE_APPS_DIR}/${app}") + string(TOUPPER ${app} upper_app) + message ("${app} ${OPENSPACE_APPLICATION_${upper_app}}") if (OPENSPACE_APPLICATION_${upper_app}) - message(STATUS "Adding application ${app}") add_subdirectory(${app_dir}) endif () endforeach () + + message("Done") endfunction()