mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
cmake: libdeflate now provides pkg-config file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
a740c59e2e
commit
46f8fe92c4
1 changed files with 19 additions and 13 deletions
|
@ -9,22 +9,28 @@
|
||||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
|
|
||||||
# libdeflate does not provide pkg-config files
|
|
||||||
|
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(PC_LIBDEFLATE QUIET libdeflate)
|
||||||
|
|
||||||
|
set(LIBDEFLATE_INCLUDES ${PC_LIBDEFLATE_INCLUDE_DIRS})
|
||||||
|
set(LIBDEFLATE_LIBRARIES ${PC_LIBDEFLATE_LIBRARIES})
|
||||||
|
set(LIBDEFLATE_VERSION ${PC_LIBDEFLATE_VERSION})
|
||||||
|
|
||||||
|
if(NOT LIBDEFLATE_INCLUDES OR NOT LIBDEFLATE_LIBRARIES)
|
||||||
|
find_path(LIBDEFLATE_INCLUDES
|
||||||
|
NAMES libdeflate.h
|
||||||
|
HINTS $ENV{LIBDEFLATEDIR}/include
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(LIBDEFLATE_LIBRARIES
|
||||||
|
NAMES deflate
|
||||||
|
HINTS $ENV{LIBDEFLATEDIR}/lib
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
find_path(LIBDEFLATE_INCLUDES
|
|
||||||
NAMES libdeflate.h
|
|
||||||
HINTS $ENV{LIBDEFLATEDIR}/include
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(LIBDEFLATE_LIBRARIES
|
|
||||||
NAMES deflate
|
|
||||||
HINTS $ENV{LIBDEFLATEDIR}/lib
|
|
||||||
)
|
|
||||||
|
|
||||||
find_package_handle_standard_args(LibDeflate
|
find_package_handle_standard_args(LibDeflate
|
||||||
|
VERSION_VAR LIBDEFLATE_VERSION
|
||||||
REQUIRED_VARS LIBDEFLATE_LIBRARIES LIBDEFLATE_INCLUDES
|
REQUIRED_VARS LIBDEFLATE_LIBRARIES LIBDEFLATE_INCLUDES
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue