From 44e963d12e6b25ba6f430aae8cf1b8142bcbab33 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Tue, 15 Aug 2023 23:34:57 +0200 Subject: [PATCH] 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 --- CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a0dd443..aeaa1ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)