diff --git a/CMLibGlobalVariables.cmake b/CMLibGlobalVariables.cmake index c618758..546dc62 100644 --- a/CMLibGlobalVariables.cmake +++ b/CMLibGlobalVariables.cmake @@ -14,12 +14,11 @@ string(TOUPPER ${CMLIB_ORGANIZATION_NAME_CANONICAL} CMLIB_ORGANIZATION_NAME_UPPE string(TOUPPER ${CMLIB_PROJECT_NAME_CANONICAL} CMLIB_PROJECT_NAME_UPPER) string(TOUPPER ${CMLIB_THEME_NAME_CANONICAL} CMLIB_THEME_NAME_UPPER) -option(CMLIB_USE_DEVELOPMENT_INSTALL_PREFIX "Auto-generated output prefix for development installation" OFF) -if(CMLIB_USE_DEVELOPMENT_INSTALL_PREFIX) - if(CMLIB_THEME_NAME_LOWER STREQUAL "default") - set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/_output" CACHE PATH "" FORCE) - else() - set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/_output/${CMLIB_THEME_NAME_LOWER}" CACHE PATH "" FORCE) +option(CMLIB_ADD_THEME_PREFIX "Append theme name to install prefix" OFF) +if(CMLIB_ADD_THEME_PREFIX AND NOT CMLIB_THEME_PREFIX_APPENDED) + if(NOT CMLIB_THEME_NAME_LOWER STREQUAL "default") + set(CMLIB_THEME_PREFIX_APPENDED ON CACHE BOOL "" FORCE) + set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${CMLIB_THEME_NAME}" CACHE PATH "" FORCE) endif() endif()