myx-cmake/MyxCMake/modules/MyxCMakeGlobalVariables.cmake

26 lines
1.2 KiB
CMake
Raw Normal View History

2021-12-08 11:32:04 +00:00
if(NOT MYX_CMAKE_THEME_NAME)
set(MYX_CMAKE_THEME_NAME "default")
endif()
# cmake-format: off
myx_cmake_canonical_string(${MYX_CMAKE_ORGANIZATION_NAME} MYX_CMAKE_ORGANIZATION_NAME_CANONICAL)
myx_cmake_canonical_string(${PROJECT_NAME} MYX_CMAKE_PROJECT_NAME_CANONICAL)
myx_cmake_canonical_string(${MYX_CMAKE_THEME_NAME} MYX_CMAKE_THEME_NAME_CANONICAL)
string(TOLOWER ${MYX_CMAKE_ORGANIZATION_NAME_CANONICAL} MYX_CMAKE_ORGANIZATION_NAME_LOWER)
string(TOLOWER ${MYX_CMAKE_PROJECT_NAME_CANONICAL} MYX_CMAKE_PROJECT_NAME_LOWER)
string(TOLOWER ${MYX_CMAKE_THEME_NAME_CANONICAL} MYX_CMAKE_THEME_NAME_LOWER)
string(TOUPPER ${MYX_CMAKE_ORGANIZATION_NAME_CANONICAL} MYX_CMAKE_ORGANIZATION_NAME_UPPER)
string(TOUPPER ${MYX_CMAKE_PROJECT_NAME_CANONICAL} MYX_CMAKE_PROJECT_NAME_UPPER)
string(TOUPPER ${MYX_CMAKE_THEME_NAME_CANONICAL} MYX_CMAKE_THEME_NAME_UPPER)
option(MYX_CMAKE_ADD_THEME_PREFIX "Append theme name to install prefix" OFF)
if(MYX_CMAKE_ADD_THEME_PREFIX AND NOT MYX_CMAKE_THEME_PREFIX_APPENDED)
if(NOT MYX_CMAKE_THEME_NAME_LOWER STREQUAL "default")
2022-01-25 10:21:05 +00:00
set(MYX_CMAKE_THEME_PREFIX_APPENDED ON CACHE BOOL "" FORCE)
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${MYX_CMAKE_THEME_NAME}" CACHE PATH "" FORCE)
2021-12-08 11:32:04 +00:00
endif()
endif()
2022-01-25 10:21:05 +00:00
# cmake-format: on