myx-cmake/MyxCMake/modules/MyxCMakeRequiredVariables.cmake

28 lines
1.0 KiB
CMake

#
# Обязательные переменные, значения которым необходимо присвоить в файле
# CMakeLists.txt до подключения MyxCMake, либо передать из командной строки
# через ключ -D
#
# cmake-format: off
if(NOT MYX_CMAKE_ORGANIZATION_NAME)
myx_cmake_message_error("MyxCMake: Required variable MYX_CMAKE_ORGANIZATION_NAME is not defined")
endif()
if(NOT MYX_CMAKE_AUTHOR_NAME)
myx_cmake_message_error("MyxCMake: Required variable MYX_CMAKE_AUTHOR_NAME is not defined")
endif()
if(NOT MYX_CMAKE_AUTHOR_EMAIL)
myx_cmake_message_error("MyxCMake: Required variable MYX_CMAKE_AUTHOR_EMAIL is not defined")
endif()
if(NOT MYX_CMAKE_DESCRIPTION)
myx_cmake_message_error("MyxCMake: Required variable MYX_CMAKE_DESCRIPTION is not defined")
endif()
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${MYX_CMAKE_DESCRIPTION} CACHE STRING "")
set(CPACK_PACKAGE_CONTACT "${MYX_CMAKE_AUTHOR_NAME} <${MYX_CMAKE_AUTHOR_EMAIL}>" CACHE STRING "")
# cmake-format: on