From 931ae4f82f5e1f5e6405f2a44018c36a1489f930 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Sun, 7 Nov 2021 14:43:43 +0100 Subject: CMakeLists.txt: slightly modernize If someone really wants this to work on ancient systems, the fix should be easy. --- CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bf55c5..d1b0105 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,14 @@ -cmake_minimum_required (VERSION 3.0) -project (desktop-tools VERSION 0.1.0 LANGUAGES C) +cmake_minimum_required (VERSION 3.10) +project (desktop-tools VERSION 0.1.0 DESCRIPTION "Desktop tools" LANGUAGES C) # Moar warnings +set (CMAKE_C_STANDARD 99) +set (CMAKE_C_STANDARD_REQUIRED ON) +set (CMAKE_C_EXTENSIONS OFF) + if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC) # -Wunused-function is pretty annoying here, as everything is static - set (wdisabled "-Wno-unused-function") - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra ${wdisabled}") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-function") endif () # Dependencies @@ -73,7 +76,6 @@ install (PROGRAMS shellify DESTINATION ${CMAKE_INSTALL_BINDIR}) install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) # CPack -set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Desktop tools") set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch") set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch ") set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") -- cgit v1.2.3-70-g09d2