Исправлено добавление название темы к CMAKE_INSTALL_PREFIX

This commit is contained in:
Andrei Astafev 2021-06-11 09:50:46 +03:00
parent 5e600ab490
commit 8b2fa4fd64

View File

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