Bump minimum CMake version, related clean up

This commit is contained in:
Přemysl Eric Janouch 2020-10-29 16:28:18 +01:00
parent be98666db2
commit 5ffdd26e59
Signed by: p
GPG Key ID: A0420B94F92B9493
3 changed files with 7 additions and 12 deletions

View File

@ -1,6 +1,5 @@
cmake_minimum_required (VERSION 2.8.5) cmake_minimum_required (VERSION 3.0)
project (sensei-raw-ctl C) project (sensei-raw-ctl VERSION 1.0 LANGUAGES C)
set (project_VERSION "1.0")
find_package (PkgConfig REQUIRED) find_package (PkgConfig REQUIRED)
pkg_check_modules (dependencies REQUIRED libusb-1.0) pkg_check_modules (dependencies REQUIRED libusb-1.0)
@ -51,7 +50,7 @@ if (BUILD_GUI)
target_link_libraries (${PROJECT_NAME}-gui ${gtk3_LIBRARIES}) target_link_libraries (${PROJECT_NAME}-gui ${gtk3_LIBRARIES})
install (TARGETS ${PROJECT_NAME}-gui install (TARGETS ${PROJECT_NAME}-gui
DESTINATION ${CMAKE_INSTALL_BINDIR}) DESTINATION ${CMAKE_INSTALL_BINDIR})
endif (BUILD_GUI) endif ()
find_program (HELP2MAN_EXECUTABLE help2man) find_program (HELP2MAN_EXECUTABLE help2man)
if (NOT HELP2MAN_EXECUTABLE) if (NOT HELP2MAN_EXECUTABLE)
@ -77,18 +76,17 @@ foreach (page ${project_MAN_PAGES})
endforeach () endforeach ()
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "SteelSeries Sensei Raw control utility") set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "SteelSeries Sensei Raw control utility")
set (CPACK_PACKAGE_VERSION ${project_VERSION})
set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch") set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch")
set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>") set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>")
set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set (CPACK_GENERATOR "TGZ;ZIP") set (CPACK_GENERATOR "TGZ;ZIP")
set (CPACK_PACKAGE_FILE_NAME set (CPACK_PACKAGE_FILE_NAME
"${PROJECT_NAME}-${project_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") "${PROJECT_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
set (CPACK_SOURCE_GENERATOR "TGZ;ZIP") set (CPACK_SOURCE_GENERATOR "TGZ;ZIP")
set (CPACK_SOURCE_IGNORE_FILES "/\\\\.git;/build;/CMakeLists.txt.user") set (CPACK_SOURCE_IGNORE_FILES "/\\\\.git;/build;/CMakeLists.txt.user")
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${project_VERSION}") set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
set (CPACK_SET_DESTDIR TRUE) set (CPACK_SET_DESTDIR TRUE)
include (CPack) include (CPack)

View File

@ -28,7 +28,7 @@ a package with the latest development version from Archlinux's AUR.
Installation Installation
------------ ------------
Build dependencies: cmake >= 2.8.5, help2man + Build dependencies: cmake >= 3.0, help2man +
Runtime dependencies: libusb >= 1.0, gtk+ >= 3.0 (optional) Runtime dependencies: libusb >= 1.0, gtk+ >= 3.0 (optional)
$ git clone https://git.janouch.name/p/sensei-raw-ctl.git $ git clone https://git.janouch.name/p/sensei-raw-ctl.git
@ -49,9 +49,6 @@ For Debian-based distros, you can do the following instead of the last step:
$ cpack -G DEB $ cpack -G DEB
# dpkg -i sensei-raw-ctl-*.deb # dpkg -i sensei-raw-ctl-*.deb
Note that for versions of CMake before 2.8.9, you need to prefix `cpack` with
`fakeroot` or file ownership will end up wrong.
Contributing and Support Contributing and Support
------------------------ ------------------------
Use https://git.janouch.name/p/sensei-raw-ctl to report bugs, request features, Use https://git.janouch.name/p/sensei-raw-ctl to report bugs, request features,

View File

@ -2,7 +2,7 @@
#define CONFIG_H #define CONFIG_H
#define PROJECT_NAME "${CMAKE_PROJECT_NAME}" #define PROJECT_NAME "${CMAKE_PROJECT_NAME}"
#define PROJECT_VERSION "${project_VERSION}" #define PROJECT_VERSION "${PROJECT_VERSION}"
#cmakedefine DEVELOPER_MODE #cmakedefine DEVELOPER_MODE
#ifdef DEVELOPER_MODE #ifdef DEVELOPER_MODE