micro-server/CMakeLists.txt
2025-10-26 22:26:14 +00:00

59 lines
2.1 KiB
CMake

# dmbcs-micro-server A C++ library providing CGI or built-in
# web server functions
#
# Copyright (C) 2025 DM Bespoke Computer Solutions
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required (VERSION 3.10)
project (dmbcs-micro-server VERSION 0.5 LANGUAGES CXX)
enable_testing ()
set (CMAKE_CXX_STANDARD 23)
find_package (PkgConfig REQUIRED)
pkg_check_modules (third-party REQUIRED IMPORTED_TARGET curlpp)
add_subdirectory (DMBCS/micro-server)
configure_file (dmbcs-micro-server.pc.in dmbcs-micro-server.pc @ONLY)
install (FILES ${PROJECT_BINARY_DIR}/dmbcs-micro-server.pc
DESTINATION lib/pkgconfig)
include (InstallRequiredSystemLibraries REQUIRED)
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt")
set (CPACK_PACKAGE_VERSION_MAJOR "${dmbcs-micro-server_VERSION_MAJOR}")
set (CPACK_PACKAGE_VERSION_MINOR "${dmbcs-micro-server_VERSION_MINOR}")
include (CPack)
find_program (MAKEINFO makeinfo)
set (info_in ${CMAKE_CURRENT_SOURCE_DIR}/dmbcs-micro-server.texi)
set (info_out ${CMAKE_CURRENT_BINARY_DIR}/dmbcs-micro-server.info)
configure_file (version.texi.in version.texi @ONLY)
add_custom_command (OUTPUT ${info_out}
COMMAND ${MAKEINFO} -o ${info_out} ${info_in}
DEPENDS ${info_in} ${CMAKE_CURRENT_BINARY_DIR}/version.texi
COMMENT "Creating info file ${info_out}"
VERBATIM)
add_custom_target (info ALL DEPENDS ${info_out})
install (FILES ${info_out} DESTINATION share/info)