Warning, /education/labplot/cmake/FindReadStat.cmake is written in an unsupported language. File is not indexed.
0001 #=============================================================================
0002 # SPDX-FileCopyrightText: 2020 Stefan Gerlach <stefan.gerlach@uni.kn>
0003 #
0004 # SPDX-License-Identifier: BSD-3-Clause
0005 #=============================================================================
0006
0007 # readstat build on Windows creates readstat.dll.lib when shared libs are enabled
0008 find_library(READSTAT_LIBRARIES NAMES readstat readstat.dll)
0009
0010 find_path(READSTAT_INCLUDE_DIR readstat.h)
0011
0012 include(FindPackageHandleStandardArgs)
0013 find_package_handle_standard_args(ReadStat
0014 FOUND_VAR
0015 READSTAT_FOUND
0016 REQUIRED_VARS
0017 READSTAT_LIBRARIES
0018 READSTAT_INCLUDE_DIR
0019 )
0020
0021 if(READSTAT_FOUND AND NOT TARGET readstat)
0022 add_library(readstat UNKNOWN IMPORTED)
0023 set_target_properties(readstat PROPERTIES
0024 IMPORTED_LOCATION "${READSTAT_LIBRARIES}"
0025 INTERFACE_INCLUDE_DIRECTORIES "${READSTAT_INCLUDE_DIR}"
0026 )
0027 endif()
0028
0029 mark_as_advanced(READSTAT_LIBRARIES READSTAT_INCLUDE_DIR)
0030
0031 include(FeatureSummary)
0032 set_package_properties(ReadStat PROPERTIES
0033 DESCRIPTION "A command-line tool and library for reading files from popular stats packages"
0034 URL "https://github.com/WizardMac/ReadStat"
0035 )