File: RimeConfig.cmake

package info (click to toggle)
librime 1.13.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 7,896 kB
  • sloc: cpp: 34,796; ansic: 2,519; javascript: 443; sh: 225; makefile: 125
file content (35 lines) | stat: -rw-r--r-- 1,039 bytes parent folder | download | duplicates (4)
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
# - Locate the rime library
# This module defines
#  Rime_FOUND found librime
#  Rime_LIBRARIES rime library path
#  Rime_INCLUDE_DIR, where to find headers

#==============================================================================
# Copyright 2012 Xuetian Weng
#
# Distributed under the BSD License
#==============================================================================

# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls

if(Rime_INCLUDE_DIR AND Rime_LIBRARIES)
    # Already in cache, be silent
    set(Rime_FIND_QUIETLY TRUE)
endif(Rime_INCLUDE_DIR AND Rime_LIBRARIES)

include(FindPkgConfig)
PKG_CHECK_MODULES(PC_Rime rime)

find_path(Rime_INCLUDE_DIR
          NAMES rime_api.h
          HINTS ${PC_Rime_INCLUDEDIR}
          )

find_library(Rime_LIBRARIES
             NAMES rime
             HINTS ${PC_Rime_LIBDIR}
             )

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Rime DEFAULT_MSG Rime_LIBRARIES Rime_INCLUDE_DIR)