Use correct cmake GNUInstallDirs variables with their built-in defaults

GNUInstallDirs.cmake expects that at least one language is enabled before
including GNUInstallDirs.

See also: https://cmake.org/cmake/help/latest/command/install.html
This commit is contained in:
Robert Scheck 2023-08-15 23:34:57 +02:00
parent e1796a8851
commit 44e963d12e

View file

@ -1,5 +1,4 @@
cmake_minimum_required(VERSION 3.13.4)
include(CheckSymbolExists)
project(
ssldump
@ -8,6 +7,9 @@ project(
LANGUAGES C
)
include(CheckSymbolExists)
include(GNUInstallDirs)
configure_file(base/pcap-snoop.c.in base/pcap-snoop.c)
set(SOURCES
@ -110,8 +112,5 @@ target_link_libraries(ssldump
${JSONC_LIBRARIES}
)
set(CMAKE_INSTALL_PREFIX "/usr/local")
install(TARGETS ssldump DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
set(CMAKE_INSTALL_MANDIR "/usr/local/share/man")
install(TARGETS ssldump DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ssldump.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)