Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Use `GNUInstallDirs` module

* `GNUInstallDirs` is a standardised way to
  change paths, which makes systems integration
  easier and allows for a more consistent user
  experience.
Commit
8d4074aad943113f94171e894e97141a20ac25dc
Author
David Seifert ·
Committer
Martin Hořeňovský
Parents
f0f40a0dbfdd

Files · Download .tar.gz

Changes

 CMakeLists.txt | 6 ++++--
 catch.pc.in    | 7 ++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e0b2fc19..05360548 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.0)
 
 project(CatchSelfTest)
 
+include(GNUInstallDirs)
+
 option(USE_VALGRIND "Perform SelfTests with Valgrind" OFF)
 option(BUILD_EXAMPLES "Build documentation examples" OFF)
 option(ENABLE_COVERAGE "Generate coverage for codecov.io" OFF)
@@ -366,14 +368,14 @@ if(BUILD_EXAMPLES)
     add_subdirectory(examples)
 endif()
 
-install(DIRECTORY "single_include/" DESTINATION "include/catch")
+install(DIRECTORY "single_include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/catch")
 
 ## Provide some pkg-config integration
 # Don't bother on Windows
 if(NOT WIN32 OR NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
 
     set(PKGCONFIG_INSTALL_DIR
-        "${CMAKE_INSTALL_PREFIX}/share/pkgconfig"
+        "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig"
         CACHE PATH "Path where catch.pc is installed"
     )
 
diff --git a/catch.pc.in b/catch.pc.in
index 4a7b2545..6865b426 100644
--- a/catch.pc.in
+++ b/catch.pc.in
@@ -1,9 +1,6 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=${prefix}
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
 
 Name: Catch
 Description: Testing library for C++
-Requires:
 Version: @CATCH_VERSION_NUMBER@
-Libs:
-Cflags: -I${prefix}/@INCLUDE_INSTALL_DIR@/include
+Cflags: -I${includedir}