From 2f20314ffb391b2b4a2e3f4e42113d881374b936 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Wed, 6 Feb 2013 21:01:55 +0100 Subject: [PATCH] Pick up description from one place --- CMakeLists.txt | 1 + cmake/Modules/OpmProject.cmake | 2 ++ opm-core-config.cmake.in | 2 +- opm-core.pc.in | 4 ++-- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bae4842b..e914890b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ set (opm-core_VERSION_MAJOR 1) set (opm-core_VERSION_MINOR 0) enable_language (C) enable_language (CXX) +set (opm-core_DESCRIPTION "Open Porous Media Initiative Core Library") # build debug by default if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) diff --git a/cmake/Modules/OpmProject.cmake b/cmake/Modules/OpmProject.cmake index fcb5bb9d..503495fd 100644 --- a/cmake/Modules/OpmProject.cmake +++ b/cmake/Modules/OpmProject.cmake @@ -22,6 +22,8 @@ function (configure_pc_file name source dest prefix libdir includedir) unseparate_args (defs "" "${${name}_DEFINITIONS}") # necessary to make these variables visible to configure_file + set (name "${PROJECT_NAME}") + set (description "${${name}_DESCRIPTION}") set (target "${${name}_LIBRARY}") set (major "${${name}_VERSION_MAJOR}") set (minor "${${name}_VERSION_MINOR}") diff --git a/opm-core-config.cmake.in b/opm-core-config.cmake.in index 0afbebb6..9d5a57f5 100644 --- a/opm-core-config.cmake.in +++ b/opm-core-config.cmake.in @@ -1,4 +1,4 @@ -# - Open Porous Media Initiative Core Library config mode +# - @opm-core_DESCRIPTION@ config mode # # Defines the following variables: # opm-core_FOUND - true diff --git a/opm-core.pc.in b/opm-core.pc.in index 1acbeb68..1204d4bd 100644 --- a/opm-core.pc.in +++ b/opm-core.pc.in @@ -5,8 +5,8 @@ CXX=@CMAKE_CXX_COMPILER@ @CXX_STD0X_FLAGS@ @OpenMP_CXX_FLAGS@ CC=@CMAKE_C_COMPILER@ @C_STD99_FLAGS@ @OpenMP_C_FLAGS@ DEPENDENCIES= -Name: OPM Core -Description: Open Porous Media Initiative Core Library @major@.@minor@ +Name: @name@ +Description: @description@ @major@.@minor@ Version: @major@.@minor@ URL: http://opm-project.org Libs: -l@target@ @libs@