Warning, /education/labplot/cmake/FindReadStat.cmake is written in an unsupported language. File is not indexed.
0001 #============================================================================= 0002 # Copyright (c) 2020 Stefan Gerlach <stefan.gerlach@uni.kn> 0003 # 0004 # Redistribution and use in source and binary forms, with or without 0005 # modification, are permitted provided that the following conditions 0006 # are met: 0007 # 0008 # 1. Redistributions of source code must retain the copyright 0009 # notice, this list of conditions and the following disclaimer. 0010 # 2. Redistributions in binary form must reproduce the copyright 0011 # notice, this list of conditions and the following disclaimer in the 0012 # documentation and/or other materials provided with the distribution. 0013 # 3. The name of the author may not be used to endorse or promote products 0014 # derived from this software without specific prior written permission. 0015 # 0016 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 0017 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 0018 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 0019 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 0020 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 0021 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 0022 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 0023 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 0024 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 0025 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0026 #============================================================================= 0027 0028 find_library(READSTAT_LIBRARY readstat) 0029 0030 find_path(READSTAT_INCLUDE_DIR readstat.h) 0031 0032 include(FindPackageHandleStandardArgs) 0033 find_package_handle_standard_args(READSTAT 0034 FOUND_VAR 0035 READSTAT_FOUND 0036 REQUIRED_VARS 0037 READSTAT_LIBRARY 0038 READSTAT_INCLUDE_DIR 0039 ) 0040 0041 if(READSTAT_FOUND AND NOT TARGET readstat) 0042 add_library(readstat UNKNOWN IMPORTED) 0043 set_target_properties(readstat PROPERTIES 0044 IMPORTED_LOCATION "${READSTAT_LIBRARY}" 0045 INTERFACE_INCLUDE_DIRECTORIES "${READSTAT_INCLUDE_DIR}" 0046 ) 0047 endif() 0048 0049 mark_as_advanced(READSTAT_LIBRARIES READSTAT_INCLUDE_DIR) 0050 0051 include(FeatureSummary) 0052 set_package_properties(ReadStat PROPERTIES 0053 DESCRIPTION "A command-line tool and library for reading files from popular stats packages" 0054 URL "https://github.com/WizardMac/ReadStat" 0055 )