aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-11-07 14:43:43 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-11-07 14:44:16 +0100
commit931ae4f82f5e1f5e6405f2a44018c36a1489f930 (patch)
tree7ee619291fd3f0d0fefe3f814b18dac4debd4bc9
parentd057e903b75c8569ca386da67f9f6bec64704f45 (diff)
downloaddesktop-tools-931ae4f82f5e1f5e6405f2a44018c36a1489f930.tar.gz
desktop-tools-931ae4f82f5e1f5e6405f2a44018c36a1489f930.tar.xz
desktop-tools-931ae4f82f5e1f5e6405f2a44018c36a1489f930.zip
CMakeLists.txt: slightly modernize
If someone really wants this to work on ancient systems, the fix should be easy.
-rw-r--r--CMakeLists.txt12
1 files 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 <p@janouch.name>")
set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")