build: find_package() calls don't spell CONFIG explicitly anymore

This commit is contained in:
Mateusz Pusz
2024-01-12 12:32:12 +01:00
parent 7c4d2cd5e4
commit 9511995d04
5 changed files with 7 additions and 7 deletions

View File

@@ -354,7 +354,7 @@ The following steps may be performed to obtain an official library release:
with `find_package`:
```cmake
find_package(mp-units CONFIG REQUIRED)
find_package(mp-units REQUIRED)
```
3. Link your CMake targets with **mp-units**:

View File

@@ -24,7 +24,7 @@ cmake_minimum_required(VERSION 3.5)
# find dependencies
if(NOT TARGET gsl::gsl-lite)
find_package(gsl-lite CONFIG REQUIRED)
find_package(gsl-lite REQUIRED)
endif()
if(${projectPrefix}BUILD_CXX_MODULES)

View File

@@ -24,7 +24,7 @@ cmake_minimum_required(VERSION 3.19)
# find dependencies
if(NOT TARGET gsl::gsl-lite)
find_package(gsl-lite CONFIG REQUIRED)
find_package(gsl-lite REQUIRED)
endif()
# core library definition
@@ -83,7 +83,7 @@ target_compile_definitions(
if(${projectPrefix}USE_LIBFMT)
if(NOT TARGET fmt::fmt)
find_package(fmt CONFIG REQUIRED)
find_package(fmt REQUIRED)
endif()
target_link_libraries(mp-units-core ${${projectPrefix}TARGET_SCOPE} fmt::fmt)
endif()

View File

@@ -22,7 +22,7 @@
cmake_minimum_required(VERSION 3.5)
find_package(Catch2 3 CONFIG REQUIRED)
find_package(Catch2 3 REQUIRED)
add_executable(unit_tests_runtime distribution_test.cpp fmt_test.cpp math_test.cpp)
if(${projectPrefix}BUILD_CXX_MODULES)
@@ -31,7 +31,7 @@ endif()
target_link_libraries(unit_tests_runtime PRIVATE mp-units::mp-units Catch2::Catch2WithMain)
if(${projectPrefix}BUILD_LA)
find_package(wg21_linear_algebra CONFIG REQUIRED)
find_package(wg21_linear_algebra REQUIRED)
target_sources(unit_tests_runtime PRIVATE linear_algebra_test.cpp)
target_link_libraries(unit_tests_runtime PRIVATE wg21_linear_algebra::wg21_linear_algebra)
endif()

View File

@@ -23,7 +23,7 @@
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES CXX)
find_package(mp-units CONFIG REQUIRED)
find_package(mp-units REQUIRED)
add_executable(test_package test_package.cpp)
target_link_libraries(test_package PRIVATE mp-units::mp-units)