mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 15:26:11 +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)
|
project(CatchSelfTest)
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
option(USE_VALGRIND "Perform SelfTests with Valgrind" OFF)
|
option(USE_VALGRIND "Perform SelfTests with Valgrind" OFF)
|
||||||
option(BUILD_EXAMPLES "Build documentation examples" OFF)
|
option(BUILD_EXAMPLES "Build documentation examples" OFF)
|
||||||
option(ENABLE_COVERAGE "Generate coverage for codecov.io" OFF)
|
option(ENABLE_COVERAGE "Generate coverage for codecov.io" OFF)
|
||||||
@ -366,14 +368,14 @@ if(BUILD_EXAMPLES)
|
|||||||
add_subdirectory(examples)
|
add_subdirectory(examples)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(DIRECTORY "single_include/" DESTINATION "include/catch")
|
install(DIRECTORY "single_include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/catch")
|
||||||
|
|
||||||
## Provide some pkg-config integration
|
## Provide some pkg-config integration
|
||||||
# Don't bother on Windows
|
# Don't bother on Windows
|
||||||
if(NOT WIN32 OR NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
|
if(NOT WIN32 OR NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
|
||||||
|
|
||||||
set(PKGCONFIG_INSTALL_DIR
|
set(PKGCONFIG_INSTALL_DIR
|
||||||
"${CMAKE_INSTALL_PREFIX}/share/pkgconfig"
|
"${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig"
|
||||||
CACHE PATH "Path where catch.pc is installed"
|
CACHE PATH "Path where catch.pc is installed"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
prefix=@CMAKE_INSTALL_PREFIX@
|
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||||
exec_prefix=${prefix}
|
|
||||||
|
|
||||||
Name: Catch
|
Name: Catch
|
||||||
Description: Testing library for C++
|
Description: Testing library for C++
|
||||||
Requires:
|
|
||||||
Version: @CATCH_VERSION_NUMBER@
|
Version: @CATCH_VERSION_NUMBER@
|
||||||
Libs:
|
Cflags: -I${includedir}
|
||||||
Cflags: -I${prefix}/@INCLUDE_INSTALL_DIR@/include
|
|
||||||
|
Loading…
Reference in New Issue
Block a user