Опция CMLIB_USE_DEVELOPMENT_INSTALL_PREFIX
При включении CMLIB_USE_DEVELOPMENT_INSTALL_PREFIX установка будет производиться в каталог _output внутри проекта.
This commit is contained in:
parent
ab6d9dab66
commit
dbc0b76a76
@ -14,6 +14,15 @@ 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)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# CMLIB_MODULE_DIR
|
||||
foreach(_m ${CMAKE_MODULE_PATH})
|
||||
if(EXISTS ${_m}/CMLibCommon.cmake)
|
||||
|
Loading…
Reference in New Issue
Block a user