mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 03:43:28 +01:00
Use GNUInstallDirs
module
* `GNUInstallDirs` is a standardised way to change paths, which makes systems integration easier and allows for a more consistent user experience.
This commit is contained in:
parent
f0f40a0dbf
commit
8d4074aad9
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user