File: FindMatio.cmake

package info (click to toggle)
labplot 2.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 78,500 kB
  • sloc: cpp: 241,048; ansic: 6,324; python: 915; xml: 400; yacc: 237; sh: 221; awk: 35; makefile: 11
file content (36 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#=============================================================================
# SPDX-FileCopyrightText: 2021 Stefan Gerlach <stefan.gerlach@uni.kn>
#
# SPDX-License-Identifier: BSD-3-Clause
#=============================================================================

find_library(MATIO_LIBRARIES NAMES matio libmatio)

find_path(MATIO_INCLUDE_DIR matio.h)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Matio
    FOUND_VAR
    	MATIO_FOUND
    REQUIRED_VARS
        MATIO_LIBRARIES
	MATIO_INCLUDE_DIR
)

if(MATIO_FOUND)
    add_library(matio UNKNOWN IMPORTED)
    set_target_properties(matio PROPERTIES
        IMPORTED_LOCATION "${MATIO_LIBRARIES}"
	INTERFACE_INCLUDE_DIRECTORIES "${MATIO_INCLUDE_DIR}"
    )
else()
	set(MATIO_LIBRARIES "")
endif()

mark_as_advanced(MATIO_LIBRARIES MATIO_INCLUDE_DIR)

include(FeatureSummary)
set_package_properties(Matio PROPERTIES
    DESCRIPTION "Reading and writing binary MATLAB MAT files"
    URL "https://github.com/tbeu/matio"
)