2016-03-17 12:42:52 +03:00
|
|
|
# - Try to find ARGP
|
2010-09-03 17:38:12 +04:00
|
|
|
# Once done this will define
|
|
|
|
#
|
2016-03-17 12:42:52 +03:00
|
|
|
# ARGP_ROOT_DIR - Set this variable to the root installation of ARGP
|
2010-09-03 17:38:12 +04:00
|
|
|
#
|
2016-03-17 12:42:52 +03:00
|
|
|
# Read-Only variables:
|
|
|
|
# ARGP_FOUND - system has ARGP
|
|
|
|
# ARGP_INCLUDE_DIR - the ARGP include directory
|
|
|
|
# ARGP_LIBRARIES - Link these to use ARGP
|
|
|
|
# ARGP_DEFINITIONS - Compiler switches required for using ARGP
|
2010-09-03 17:38:12 +04:00
|
|
|
#
|
2016-03-17 12:42:52 +03:00
|
|
|
#=============================================================================
|
|
|
|
# Copyright (c) 2011-2016 Andreas Schneider <asn@cryptomilk.org>
|
|
|
|
#
|
|
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
# see accompanying file Copyright.txt for details.
|
|
|
|
#
|
|
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the License for more information.
|
|
|
|
#=============================================================================
|
2010-09-03 17:38:12 +04:00
|
|
|
#
|
|
|
|
|
2016-03-17 12:42:52 +03:00
|
|
|
set(_ARGP_ROOT_HINTS
|
|
|
|
)
|
2010-09-03 17:38:12 +04:00
|
|
|
|
2016-03-17 12:42:52 +03:00
|
|
|
set(_ARGP_ROOT_PATHS
|
|
|
|
"$ENV{PROGRAMFILES}/argp"
|
|
|
|
)
|
2010-09-03 17:38:12 +04:00
|
|
|
|
2016-03-17 12:42:52 +03:00
|
|
|
find_path(ARGP_ROOT_DIR
|
2010-09-03 17:38:12 +04:00
|
|
|
NAMES
|
2016-03-17 12:42:52 +03:00
|
|
|
include/argp.h
|
|
|
|
HINTS
|
|
|
|
${_ARGP_ROOT_HINTS}
|
2010-09-03 17:38:12 +04:00
|
|
|
PATHS
|
2016-03-17 12:42:52 +03:00
|
|
|
${_ARGP_ROOT_PATHS}
|
|
|
|
)
|
|
|
|
mark_as_advanced(ARGP_ROOT_DIR)
|
2010-09-03 17:38:12 +04:00
|
|
|
|
2016-03-17 12:42:52 +03:00
|
|
|
find_path(ARGP_INCLUDE_DIR
|
2010-09-03 17:38:12 +04:00
|
|
|
NAMES
|
2016-03-17 12:42:52 +03:00
|
|
|
argp.h
|
2010-09-03 17:38:12 +04:00
|
|
|
PATHS
|
2016-03-17 12:42:52 +03:00
|
|
|
${ARGP_ROOT_DIR}/include
|
|
|
|
)
|
2010-09-03 17:38:12 +04:00
|
|
|
|
2016-03-17 12:42:52 +03:00
|
|
|
find_library(ARGP_LIBRARY
|
|
|
|
NAMES
|
|
|
|
argp
|
|
|
|
PATHS
|
|
|
|
${ARGP_ROOT_DIR}/lib
|
|
|
|
)
|
2010-09-03 17:38:12 +04:00
|
|
|
|
2016-03-17 12:42:52 +03:00
|
|
|
if (ARGP_LIBRARY)
|
|
|
|
set(ARGP_LIBRARIES
|
|
|
|
${ARGP_LIBRARIES}
|
|
|
|
${ARGP_LIBRARY}
|
|
|
|
)
|
|
|
|
endif (ARGP_LIBRARY)
|
2010-09-03 17:38:12 +04:00
|
|
|
|
2016-03-17 12:42:52 +03:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(ARGP DEFAULT_MSG ARGP_LIBRARIES ARGP_INCLUDE_DIR)
|
2010-09-03 17:38:12 +04:00
|
|
|
|
2016-03-17 12:42:52 +03:00
|
|
|
# show the ARGP_INCLUDE_DIR and ARGP_LIBRARIES variables only in the advanced view
|
|
|
|
mark_as_advanced(ARGP_INCLUDE_DIR ARGP_LIBRARIES)
|