File: FindGflags.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 (26 lines) | stat: -rw-r--r-- 887 bytes parent folder | download | duplicates (7)
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
set(_gflags_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})

find_path(Gflags_INCLUDE_PATH gflags/gflags.h)

if (Gflags_STATIC)
  if (WIN32)
    set(CMAKE_FIND_LIBRARY_SUFFIXES .lib ${CMAKE_FIND_LIBRARY_SUFFIXES})
  else (WIN32)
    set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
  endif (WIN32)
endif (Gflags_STATIC)
find_library(Gflags_LIBRARY NAMES gflags libgflags)
if(Gflags_INCLUDE_PATH AND Gflags_LIBRARY)
  set(Gflags_FOUND TRUE)
endif(Gflags_INCLUDE_PATH AND Gflags_LIBRARY)
if(Gflags_FOUND)
  if(NOT Gflags_FIND_QUIETLY)
    message(STATUS "Found gflags: ${Gflags_LIBRARY}")
  endif(NOT Gflags_FIND_QUIETLY)
else(Gflags_FOUND)
  if(Gflags_FIND_REQUIRED)
    message(FATAL_ERROR "Could not find gflags library.")
  endif(Gflags_FIND_REQUIRED)
endif(Gflags_FOUND)

set(CMAKE_FIND_LIBRARY_SUFFIXES ${_gflags_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})