Warning, /plasma/powerdevil/cmake/FindDDCUtil.cmake is written in an unsupported language. File is not indexed.
0001 # - Try to find Libddcutil 0002 # Once done this will define 0003 # 0004 # DDCUTIL_FOUND - system has DDCUtil 0005 # DDCUTIL_INCLUDE_DIR - the libddcutil include directory 0006 # DDCUTIL_LIBS - The libddcutil libraries 0007 0008 # Copyright (c) 2017, Dorian Vogel, <dorianvogel@gmail.com> 0009 # 0010 # Redistribution and use in source and binary forms, with or without 0011 # modification, are permitted provided that the following conditions 0012 # are met: 0013 # 1. Redistributions of source code must retain the above copyright 0014 # notice, this list of conditions and the following disclaimer. 0015 # 2. Redistributions in binary form must reproduce the above copyright 0016 # notice, this list of conditions and the following disclaimer in the 0017 # documentation and/or other materials provided with the distribution. 0018 # 3. Neither the name of the University nor the names of its contributors 0019 # may be used to endorse or promote products derived from this software 0020 # without specific prior written permission. 0021 # 0022 # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 0023 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 0024 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 0025 # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 0026 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 0027 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 0028 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 0029 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 0030 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 0031 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 0032 # SUCH DAMAGE. 0033 0034 find_package(PkgConfig) 0035 pkg_check_modules(PC_LIBDDCUTIL QUIET ddcutil) 0036 set(LIBDDCUTIL_DEFINITIONS ${PC_LIBDDCUTIL_CFLAGS_OTHER}) 0037 0038 find_path(LIBDDCUTIL_INCLUDE_DIR ddcutil_c_api.h 0039 HINTS ${PC_LIBDDCUTIL_INCLUDEDIR} ${PC_LIBDDCUTIL_INCLUDE_DIRS}) 0040 0041 find_library(LIBDDCUTIL_LIBRARY NAMES libddcutil.so 0042 HINTS ${PC_LIBDDCUTIL_LIBDIR} ${PC_LIBDDCUTIL_LIBRARY_DIRS} ) 0043 0044 include(FindPackageHandleStandardArgs) 0045 # handle the QUIETLY and REQUIRED arguments and set LIBDDCUTIL_FOUND to TRUE 0046 # if all listed variables are TRUE 0047 find_package_handle_standard_args(DDCUtil DEFAULT_MSG 0048 LIBDDCUTIL_LIBRARY LIBDDCUTIL_INCLUDE_DIR) 0049 0050 mark_as_advanced(LIBDDCUTIL_INCLUDE_DIR LIBDDCUTIL_LIBRARY ) 0051 0052 set(LIBDDCUTIL_LIBRARIES ${LIBDDCUTIL_LIBRARY} ) 0053 set(LIBDDCUTIL_INCLUDE_DIRS ${LIBDDCUTIL_INCLUDE_DIR} )