From 5fb03eeb4a06134c20157bb9006359e47544cc8d Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 1 Aug 2016 14:13:42 +0200 Subject: [PATCH] CMake generator fix for when no modules are selected --- support/cmake/support_macros.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/support/cmake/support_macros.cmake b/support/cmake/support_macros.cmake index 5ecebf7b91..b2781d778b 100644 --- a/support/cmake/support_macros.cmake +++ b/support/cmake/support_macros.cmake @@ -434,8 +434,13 @@ function (handle_internal_modules) endif () endforeach () - string(REPLACE ";" "" MODULE_HEADERS ${MODULE_HEADERS}) - string(REPLACE ";" "" MODULE_CLASSES ${MODULE_CLASSES}) + if (NOT "${MODULE_HEADERS}" STREQUAL "") + string(REPLACE ";" "" MODULE_HEADERS ${MODULE_HEADERS}) + endif () + + if (NOT "${MODULE_CLASSES}" STREQUAL "") + string(REPLACE ";" "" MODULE_CLASSES ${MODULE_CLASSES}) + endif () configure_file( ${OPENSPACE_CMAKE_EXT_DIR}/module_registration.template