myx-cmake/MyxCMake/modules/MyxCMakeRequiredVariables.cmake

28 lines
1.0 KiB
CMake
Raw Permalink Normal View History

2021-12-08 11:32:04 +00:00
#
# Обязательные переменные, значения которым необходимо присвоить в файле
# CMakeLists.txt до подключения MyxCMake, либо передать из командной строки
# через ключ -D
#
2021-12-21 10:45:09 +00:00
# cmake-format: off
2021-12-08 11:32:04 +00:00
if(NOT MYX_CMAKE_ORGANIZATION_NAME)
2021-12-21 10:45:09 +00:00
myx_cmake_message_error("MyxCMake: Required variable MYX_CMAKE_ORGANIZATION_NAME is not defined")
2021-12-08 11:32:04 +00:00
endif()
if(NOT MYX_CMAKE_AUTHOR_NAME)
2021-12-21 10:45:09 +00:00
myx_cmake_message_error("MyxCMake: Required variable MYX_CMAKE_AUTHOR_NAME is not defined")
2021-12-08 11:32:04 +00:00
endif()
if(NOT MYX_CMAKE_AUTHOR_EMAIL)
2021-12-21 10:45:09 +00:00
myx_cmake_message_error("MyxCMake: Required variable MYX_CMAKE_AUTHOR_EMAIL is not defined")
2021-12-08 11:32:04 +00:00
endif()
if(NOT MYX_CMAKE_DESCRIPTION)
2021-12-21 10:45:09 +00:00
myx_cmake_message_error("MyxCMake: Required variable MYX_CMAKE_DESCRIPTION is not defined")
2021-12-08 11:32:04 +00:00
endif()
2021-12-21 10:45:09 +00:00
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