Blame cmake/FindPOPT.cmake
|
Packit Service |
64969d |
# - Try to find the popt options processing library
|
|
Packit Service |
64969d |
# The module will set the following variables
|
|
Packit Service |
64969d |
#
|
|
Packit Service |
64969d |
# POPT_FOUND - System has popt
|
|
Packit Service |
64969d |
# POPT_INCLUDE_DIR - The popt include directory
|
|
Packit Service |
64969d |
# POPT_LIBRARY - The libraries needed to use popt
|
|
Packit Service |
64969d |
|
|
Packit Service |
64969d |
# use pkg-config to get the directories and then use these values
|
|
Packit Service |
64969d |
# in the FIND_PATH() and FIND_LIBRARY() calls
|
|
Packit Service |
64969d |
|
|
Packit Service |
64969d |
find_package(PkgConfig QUIET)
|
|
Packit Service |
64969d |
if (PKG_CONFIG_FOUND)
|
|
Packit Service |
64969d |
pkg_search_module(PC_POPT QUIET popt)
|
|
Packit Service |
64969d |
endif ()
|
|
Packit Service |
64969d |
|
|
Packit Service |
64969d |
# Find the include directories
|
|
Packit Service |
64969d |
FIND_PATH(POPT_INCLUDE_DIR
|
|
Packit Service |
64969d |
NAMES popt.h
|
|
Packit Service |
64969d |
HINTS
|
|
Packit Service |
64969d |
${PC_POPT_INCLUDEDIR}
|
|
Packit Service |
64969d |
${PC_POPT_INCLUDE_DIRS}
|
|
Packit Service |
64969d |
DOC "Path containing the popt.h include file"
|
|
Packit Service |
64969d |
)
|
|
Packit Service |
64969d |
|
|
Packit Service |
64969d |
FIND_LIBRARY(POPT_LIBRARY
|
|
Packit Service |
64969d |
NAMES popt
|
|
Packit Service |
64969d |
HINTS
|
|
Packit Service |
64969d |
${PC_POPT_LIBRARYDIR}
|
|
Packit Service |
64969d |
${PC_POPT_LIBRARY_DIRS}
|
|
Packit Service |
64969d |
DOC "popt library path"
|
|
Packit Service |
64969d |
)
|
|
Packit Service |
64969d |
|
|
Packit Service |
64969d |
include(FindPackageHandleStandardArgs)
|
|
Packit Service |
64969d |
|
|
Packit Service |
64969d |
FIND_PACKAGE_HANDLE_STANDARD_ARGS(POPT
|
|
Packit Service |
64969d |
REQUIRED_VARS POPT_INCLUDE_DIR POPT_LIBRARY
|
|
Packit Service |
64969d |
VERSION_VAR PC_POPT_VERSION)
|
|
Packit Service |
64969d |
|
|
Packit Service |
64969d |
MARK_AS_ADVANCED(POPT_INCLUDE_DIR POPT_LIBRARY)
|