cmake: use the jpeg module of cmake to find the library

finding libjpeg can be a bit more complex, there are systems that are
not delivering a .pc for it. So we should just use the cmake module to
find it.
This commit is contained in:
Marcel Hollerbach 2017-02-01 12:18:33 +01:00
parent 07f3557fb8
commit 8dc1166eaa
2 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,7 @@ include(CheckSymbolExists)
include(CheckIncludeFile)
include(CheckTypeSize)
include(FindPkgConfig)
include(FindJPEG)
include(CTest)
find_package(Threads REQUIRED)
@ -10,7 +11,9 @@ pkg_check_modules(LIBSYSTEMD libsystemd)
pkg_check_modules(VALGRIND valgrind)
pkg_check_modules(OPENSSL openssl>=1.0)
pkg_check_modules(GNUTLS gnutls>=2.12.16)
pkg_check_modules(LIBJPEG libjpeg REQUIRED)
if (NOT JPEG_FOUND)
error("a jpeg library is needed.")
endif()
set(SUGGEST_VALGRIND OFF)
if("${BUILD_PROFILE}" STREQUAL "dev")

View File

@ -2,7 +2,8 @@ set(DESCRIPTION "Library for simplified serialization, compression and ciphering
set(PKG_CONFIG_REQUIRES_PRIVATE
zlib>=1.2.3
libjpeg
#libjpeg is hard to find. there is a cmake module that does find it. and thats checked in common.cmake
#libjpeg
)
set(LIBRARIES