Отказ от использования файла Variables.cmake
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
			
		||||
# Общие настройки для пакета: организация, автор, версия
 | 
			
		||||
set(CPACK_PACKAGE_VENDOR ${CMLIB_ORGANIZATION_NAME_LOWER})
 | 
			
		||||
set(CPACK_PACKAGE_NAME ${CMLIB_PROJECT_NAME_LOWER})
 | 
			
		||||
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
 | 
			
		||||
set(CPACK_PACKAGE_VENDOR ${CMLIB_ORGANIZATION_NAME_LOWER} CACHE STRING "")
 | 
			
		||||
set(CPACK_PACKAGE_NAME ${CMLIB_PROJECT_NAME_LOWER} CACHE STRING "")
 | 
			
		||||
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION} CACHE STRING "")
 | 
			
		||||
 | 
			
		||||
# Параметры для архива исходных текстов
 | 
			
		||||
if(NOT CPACK_SOURCE_GENERATOR)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
if (NOT THEME_NAME)
 | 
			
		||||
  set(THEME_NAME "default")
 | 
			
		||||
if (NOT CMLIB_THEME_NAME)
 | 
			
		||||
  set(CMLIB_THEME_NAME "default")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
canonical_string(${ORGANIZATION_NAME} CMLIB_ORGANIZATION_NAME_CANONICAL)
 | 
			
		||||
canonical_string(${CMLIB_ORGANIZATION_NAME} CMLIB_ORGANIZATION_NAME_CANONICAL)
 | 
			
		||||
canonical_string(${PROJECT_NAME} CMLIB_PROJECT_NAME_CANONICAL)
 | 
			
		||||
canonical_string(${THEME_NAME} CMLIB_THEME_NAME_CANONICAL)
 | 
			
		||||
canonical_string(${CMLIB_THEME_NAME} CMLIB_THEME_NAME_CANONICAL)
 | 
			
		||||
 | 
			
		||||
string(TOLOWER ${CMLIB_ORGANIZATION_NAME_CANONICAL} CMLIB_ORGANIZATION_NAME_LOWER)
 | 
			
		||||
string(TOLOWER ${CMLIB_PROJECT_NAME_CANONICAL} CMLIB_PROJECT_NAME_LOWER)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,19 +1,21 @@
 | 
			
		||||
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/cmake/etc/Variables.cmake")
 | 
			
		||||
  message(FATAL_ERROR "Required file cmake/etc/Variables.cmake does not exist")
 | 
			
		||||
#
 | 
			
		||||
# Обязательные переменные, значения которым необходимо присвоить в файле CMakeLists.txt
 | 
			
		||||
# до подключения CMLib, либо передать из командной строки через ключ -D
 | 
			
		||||
#
 | 
			
		||||
if(NOT CMLIB_ORGANIZATION_NAME)
 | 
			
		||||
  message(FATAL_ERROR "Required variable CMLIB_ORGANIZATION_NAME is not defined")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
include("${CMAKE_SOURCE_DIR}/cmake/etc/Variables.cmake")
 | 
			
		||||
 | 
			
		||||
if(NOT ORGANIZATION_NAME)
 | 
			
		||||
  message(FATAL_ERROR "Required variable ORGANIZATION_NAME is not defined")
 | 
			
		||||
if(NOT CMLIB_AUTHOR_NAME)
 | 
			
		||||
  message(FATAL_ERROR "Required variable CMLIB_AUTHOR_NAME is not defined")
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
set(CPACK_PACKAGE_VENDOR ${ORGANIZATION_NAME})
 | 
			
		||||
 | 
			
		||||
if(NOT CPACK_PACKAGE_CONTACT)
 | 
			
		||||
  message(FATAL_ERROR "Required variable CPACK_PACKAGE_CONTACT is not defined")
 | 
			
		||||
if(NOT CMLIB_AUTHOR_EMAIL)
 | 
			
		||||
  message(FATAL_ERROR "Required variable CMLIB_AUTHOR_EMAIL is not defined")
 | 
			
		||||
endif()
 | 
			
		||||
set(CPACK_PACKAGE_CONTACT "${CMLIB_AUTHOR_NAME} <${CMLIB_AUTHOR_EMAIL}>" CACHE STRING "")
 | 
			
		||||
 | 
			
		||||
if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
 | 
			
		||||
  message(FATAL_ERROR "Required variable CPACK_PACKAGE_DESCRIPTION_SUMMARY is not defined")
 | 
			
		||||
if(NOT CMLIB_DESCRIPTION)
 | 
			
		||||
  message(FATAL_ERROR "Required variable CMLIB_DESCRIPTION is not defined")
 | 
			
		||||
endif()
 | 
			
		||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CMLIB_DESCRIPTION} CACHE STRING "")
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
#if defined (CMLIB_ORGANIZATION_NAME)
 | 
			
		||||
#error "Duplicate definition of macros CMLIB_ORGANIZATION_NAME"
 | 
			
		||||
#else
 | 
			
		||||
#define CMLIB_ORGANIZATION_NAME "@ORGANIZATION_NAME@"
 | 
			
		||||
#define CMLIB_ORGANIZATION_NAME "@CMLIB_ORGANIZATION_NAME@"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined (CMLIB_ORGANIZATION_NAME_LOWER)
 | 
			
		||||
@@ -45,7 +45,7 @@
 | 
			
		||||
#if defined (CMLIB_THEME_NAME)
 | 
			
		||||
#error "Duplicate definition of macros CMLIB_THEME_NAME"
 | 
			
		||||
#else
 | 
			
		||||
#define CMLIB_THEME_NAME "@THEME_NAME@"
 | 
			
		||||
#define CMLIB_THEME_NAME "@CMLIB_THEME_NAME@"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined (CMLIB_THEME_NAME_LOWER)
 | 
			
		||||
@@ -60,6 +60,24 @@
 | 
			
		||||
#define CMLIB_THEME_NAME_UPPER "@CMLIB_THEME_NAME_UPPER@"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined (CMLIB_AUTHOR_NAME)
 | 
			
		||||
#error "Duplicate definition of macros CMLIB_AUTHOR_NAME"
 | 
			
		||||
#else
 | 
			
		||||
#define CMLIB_AUTHOR_NAME "@CMLIB_AUTHOR_NAME@"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined (CMLIB_AUTHOR_EMAIL)
 | 
			
		||||
#error "Duplicate definition of macros CMLIB_AUTHOR_EMAIL"
 | 
			
		||||
#else
 | 
			
		||||
#define CMLIB_AUTHOR_EMAIL "@CMLIB_AUTHOR_EMAIL@"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined (CMLIB_DESCRIPTION)
 | 
			
		||||
#error "Duplicate definition of macros CMLIB_DESCRIPTION"
 | 
			
		||||
#else
 | 
			
		||||
#define CMLIB_DESCRIPTION "@CMLIB_DESCRIPTION@"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined (CMLIB_BUILD_TYPE)
 | 
			
		||||
#error "Duplicate definition of macros CMLIB_BUILD_TYPE"
 | 
			
		||||
#else
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user