mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-05 05:37:53 +08:00
30 lines
817 B
CMake
Executable File
30 lines
817 B
CMake
Executable File
find_package(PkgConfig)
|
|
pkg_check_modules(PC_JPEG libjpeg)
|
|
|
|
find_path(JPEG_INCLUDE_DIRS
|
|
NAMES jpeglib.h
|
|
HINTS ${PC_JPEG_INCLUDEDIR}
|
|
${PC_JPEG_INCLUDE_DIRS}
|
|
)
|
|
|
|
find_library(JPEG_LIBRARIES
|
|
NAMES jpeg
|
|
HINTS ${PC_JPEG_LIBDIR}
|
|
${PC_JPEG_LIBRARY_DIRS}
|
|
)
|
|
|
|
if(JPEG_INCLUDE_DIRS AND JPEG_LIBRARIES)
|
|
set(JPEG_FOUND TRUE)
|
|
set(JPEG_LIBRARY ${JPEG_LIBRARIES})
|
|
set(JPEG_INCLUDE_DIR ${JPEG_INCLUDE_DIRS})
|
|
set(JPEG_VERSION ${PC_JPEG_VERSION})
|
|
endif()
|
|
|
|
#message("JPEG_LIBRARIES=${JPEG_LIBRARIES} JPEG_FOUND=${JPEG_FOUND}")
|
|
include(FindPackageHandleStandardArgs)
|
|
#FIND_PACKAGE_HANDLE_STANDARD_ARGS(zlib REQUIRED_VARS JPEG_INCLUDE_DIRS JPEG_LIBRARIES
|
|
# FOUND_VAR JPEG_FOUND VERSION_VAR JPEG_VERSION)
|
|
|
|
mark_as_advanced(JPEG_LIBRARIES JPEG_LIBRARY JPEG_INCLUDE_DIRS JPEG_INCLUDE_DIR JPEG_FOUND)
|
|
|