GIT_SILENT made messages (after extraction)
[trojita.git] / cmake / FindMimetic.cmake
blob533119d2aacb3e60a5c8ab0ebcb8b15acd96fab9
1 # Copyright (C) 2014-2015 Stephan Platz <trojita@paalsteek.de>
3 # This file is part of the Trojita Qt IMAP e-mail client,
4 # http://trojita.flaska.net/
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation; either version 2 of
9 # the License or (at your option) version 3 or any later version
10 # accepted by the membership of KDE e.V. (or its successor approved
11 # by the membership of KDE e.V.), which shall act as a proxy
12 # defined in Section 14 of version 3 of the license.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 # - Try to find the mimetic library
23 # Once done this will define
24 #  MIMETIC_FOUND - System has MIMETIC
25 #  MIMETIC_INCLUDE_DIRS - The MIMETIC include directories
26 #  MIMETIC_LIBRARIES - The libraries needed to use MIMETIC
27 #  MIMETIC_DEFINITIONS - Compiler switches required for using MIMETIC
29 find_package(PkgConfig)
30 pkg_check_modules(PC_MIMETIC QUIET mimetic)
31 set(MIMETIC_DEFINITIONS ${PC_MIMETIC_CFLAGS_OTHER})
33 find_path(MIMETIC_INCLUDE_DIR mimetic.h
34           HINTS ${PC_MIMETIC_INCLUDEDIR} ${PC_MIMETIC_INCLUDE_DIRS}
35           PATH_SUFFIXES mimetic)
37 find_library(MIMETIC_LIBRARY NAMES mimetic libmimetic
38              HINTS ${PC_MIMETIC_LIBDIR} ${PC_MIMETIC_LIBRARY_DIRS} )
40 set(MIMETIC_LIBRARIES ${MIMETIC_LIBRARY} )
41 set(MIMETIC_INCLUDE_DIRS ${MIMETIC_INCLUDE_DIR} )
43 include(FindPackageHandleStandardArgs)
44 # handle the QUIETLY and REQUIRED arguments and set MIMETIC_FOUND to TRUE
45 # if all listed variables are TRUE
46 find_package_handle_standard_args(Mimetic  DEFAULT_MSG
47                                   MIMETIC_LIBRARY MIMETIC_INCLUDE_DIR)
49 set(Mimetic_FOUND ${MIMETIC_FOUND})
51 mark_as_advanced(MIMETIC_INCLUDE_DIR MIMETIC_LIBRARY )