Skip to content
Snippets Groups Projects
Commit 698890d7 authored by Ammar Nejati's avatar Ammar Nejati
Browse files

Remove PkgConfig dependence on Windows

`PkgConfig` works properly only on Linux. On Windows, there is no guarantee that
it works properly. It is also not necessary.

Related to issue #133
parent 60b2bbff
No related branches found
No related tags found
1 merge request!411Remove PkgConfig dependence on Windows
......@@ -16,12 +16,17 @@ set(Cerf_ULTIMATELY_REQUIRED ${Cerf_FIND_REQUIRED})
set(Cerf_FIND_REQUIRED FALSE)
# set(Cerf_FIND_VERSION 1.13) incompatible with Debian package
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
# Do not rely on PkgConfig on Windows
if(NOT WIN32)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_Cerf QUIET libcerf)
if(PC_Cerf_FOUND)
set(Cerf_VERSION ${PC_Cerf_VERSION})
set(Cerf_VERSION ${PC_Cerf_VERSION})
endif()
endif()
else()
set(Cerf_VERSION "")
endif()
find_path(Cerf_INCLUDE_DIR cerf.h)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment