Fix CMake configuration regarding application settings

This commit is contained in:
Alexander Bock
2017-10-23 12:58:27 -07:00
parent c204a1e9f0
commit 2200692e39

View File

@@ -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()