mirror of
https://github.com/hyprwm/hyprcursor.git
synced 2024-11-16 18:25:58 +01:00
cmake: add version define
This commit is contained in:
parent
09b2a50fe7
commit
f1547443a0
3 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
cmake_minimum_required(VERSION 3.19)
|
cmake_minimum_required(VERSION 3.19)
|
||||||
|
|
||||||
set(HYPRCURSOR_VERSION "0.1.2")
|
set(HYPRCURSOR_VERSION "0.1.2")
|
||||||
|
add_compile_definitions(HYPRCURSOR_VERSION="${HYPRCURSOR_VERSION}")
|
||||||
|
|
||||||
project(hyprcursor
|
project(hyprcursor
|
||||||
VERSION ${HYPRCURSOR_VERSION}
|
VERSION ${HYPRCURSOR_VERSION}
|
||||||
|
|
|
@ -7,6 +7,7 @@ project(
|
||||||
|
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_check_modules(deps REQUIRED IMPORTED_TARGET hyprlang>=0.4.0 libzip)
|
pkg_check_modules(deps REQUIRED IMPORTED_TARGET hyprlang>=0.4.0 libzip)
|
||||||
|
add_compile_definitions(HYPRCURSOR_VERSION="${HYPRCURSOR_VERSION}")
|
||||||
|
|
||||||
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
|
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
|
||||||
|
|
||||||
|
|
|
@ -448,6 +448,11 @@ int main(int argc, char** argv, char** envp) {
|
||||||
for (size_t i = 1; i < argc; ++i) {
|
for (size_t i = 1; i < argc; ++i) {
|
||||||
std::string arg = argv[i];
|
std::string arg = argv[i];
|
||||||
|
|
||||||
|
if (arg == "-v" || arg == "--version") {
|
||||||
|
std::cout << "hyprcursor-util, built from v" << HYPRCURSOR_VERSION << "\n";
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
// mode
|
// mode
|
||||||
if (arg == "--create" || arg == "-c") {
|
if (arg == "--create" || arg == "-c") {
|
||||||
|
|
Loading…
Reference in a new issue