From a2435791e67418a65b0b5fde111074c512a038c7 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Mon, 23 Oct 2023 14:35:41 -0600 Subject: [PATCH] Use CMake project version with pkgconfig --- CMakeLists.txt | 5 ++++- heat/heatcxx.pc.cmake | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 016828f..4771450 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,10 @@ # bmi-example-cxx cmake_minimum_required(VERSION 3.12) -project (bmi-example-cxx LANGUAGES CXX) +project(bmi-example-cxx + VERSION 2.1 + LANGUAGES CXX +) include(GNUInstallDirs) diff --git a/heat/heatcxx.pc.cmake b/heat/heatcxx.pc.cmake index 08fa7ab..f10c55f 100644 --- a/heat/heatcxx.pc.cmake +++ b/heat/heatcxx.pc.cmake @@ -1,5 +1,5 @@ Name: HeatCXX Description: 2D Heat Equation -Version: ${HEAT_VERSION} +Version: ${CMAKE_PROJECT_VERSION} Libs: -L${CMAKE_INSTALL_LIBDIR} -l${bmi_name} Cflags: -I${CMAKE_INSTALL_INCLUDEDIR}