File: FindGDBM.cmake

package info (click to toggle)
macaulay2 1.21%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 133,096 kB
  • sloc: cpp: 110,377; ansic: 16,306; javascript: 4,193; makefile: 3,821; sh: 3,580; lisp: 764; yacc: 590; xml: 177; python: 140; perl: 114; lex: 65; awk: 3
file content (26 lines) | stat: -rw-r--r-- 890 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
# Try to find the GDBM library
# https://www.gnu.org.ua/software/gdbm/
#
# This file sets up GDBM for CMake. Once done this will define
#  GDBM_FOUND             - system has the GDBM library
#  GDBM_INCLUDE_DIR       - the GDBM include directory
#  GDBM_LIBRARY           - the GDBM library
#
# Copyright (c) 2020, Mahrud Sayrafi, <mahrud@umn.edu>
#
# Redistribution and use is allowed according to the terms of the BSD license.

find_path(GDBM_INCLUDE_DIR NAMES gdbm.h
  HINTS ${HOMEBREW_PREFIX}/opt/gdbm/include
  PATHS ${INCLUDE_INSTALL_DIR} ${CMAKE_INSTALL_PREFIX}/include
  )

find_library(GDBM_LIBRARY NAMES gdbm
  HINTS ${HOMEBREW_PREFIX}/opt/gdbm/lib
  PATHS ${LIB_INSTALL_DIR} ${CMAKE_INSTALL_PREFIX}/lib
  )

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDBM DEFAULT_MSG GDBM_INCLUDE_DIR GDBM_LIBRARY)

mark_as_advanced(GDBM_INCLUDE_DIR GDBM_LIBRARY)