> > > Also, the searching libraries using pkg-config doesn't work on my > environment. I think it is caused by the prefix passed to > pkg_check_modules is wrong. > > [[[ > diff --git a/CMakeLists.txt b/CMakeLists.txt > index e60809b1e..d94c30b14 100644 > --- a/CMakeLists.txt > +++ b/CMakeLists.txt > @@ -269,8 +269,8 @@ if(SVN_USE_PKG_CONFIG) > # apr-1 > add_library(external-apr ALIAS PkgConfig::apr1) > > - pkg_check_modules(aprutil-1 REQUIRED IMPORTED_TARGET apr-util-1) > - add_library(external-aprutil ALIAS PkgConfig::aprutil-1) > + pkg_check_modules(aprutil1 REQUIRED IMPORTED_TARGET apr-util-1) > + add_library(external-aprutil ALIAS PkgConfig::aprutil1) > else() > # apr-2 > pkg_check_modules(apr2 REQUIRED IMPORTED_TARGET apr-2) > ]]]
The FindPkgConfig module provides a function called pkg_search_module() that simplifies the code by searching through all names one by one. I initially chose not to use it due to its less detailed logging. However, I now believe it's reasonable to use it to support these names as well. -- Timofei Zhakov