mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 09:58:54 +00:00
Merge pull request #1591 from theopolis/fix_ubuntu12_dpkg
Fix Ubuntu12 libdpkg version discovery
This commit is contained in:
commit
7ca9ae89be
@ -9,12 +9,10 @@
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_LIBDPKG QUIET libdpkg)
|
||||
|
||||
MESSAGE("LOG" ${PC_LIBDPKG_LIBRARY_DIRS})
|
||||
|
||||
set(LIBDPKG_VERSION ${PC_LIBDPKG_VERSION})
|
||||
string(REGEX REPLACE "([0-9]+).[0-9]+.[0-9]+" "\\1" LIBDPKG_VERSION_MAJOR ${LIBDPKG_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+.([0-9]+).[0-9]+" "\\1" LIBDPKG_VERSION_MINOR ${LIBDPKG_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+.[0-9]+.([0-9]+)" "\\1" LIBDPKG_VERSION_PATCH ${LIBDPKG_VERSION})
|
||||
string(REGEX REPLACE "([0-9]+).[0-9]+.[0-9]+.*" "\\1" LIBDPKG_VERSION_MAJOR ${LIBDPKG_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+.([0-9]+).[0-9]+.*" "\\1" LIBDPKG_VERSION_MINOR ${LIBDPKG_VERSION})
|
||||
string(REGEX REPLACE "[0-9]+.[0-9]+.([0-9]+).*" "\\1" LIBDPKG_VERSION_PATCH ${LIBDPKG_VERSION})
|
||||
math(EXPR LIBDPKG_VERSION_NUMBER "${LIBDPKG_VERSION_MAJOR} * 1000000 + ${LIBDPKG_VERSION_MINOR} * 1000 + ${LIBDPKG_VERSION_PATCH}")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
Loading…
Reference in New Issue
Block a user