ptr89/debian/rules
2025-01-08 05:03:05 +03:00

25 lines
505 B
Makefile
Executable file

#!/usr/bin/make -f
# Include distribution check logic
OS = $(shell lsb_release -is)
VERSION_ID = $(shell lsb_release -rs)
# Default compilers
CC = gcc
CXX = g++
# Conditionally set compilers for Ubuntu 22.04
ifneq (,$(findstring Ubuntu,$(OS)))
ifneq (,$(findstring 22.04,$(VERSION_ID)))
export CC = gcc-12
export CXX = g++-12
endif
endif
override_dh_auto_configure:
dh_auto_configure -- \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_STATIC:BOOL=ON
%:
dh $@ --buildsystem=cmake