File: FindDynLoad.cmake

package info (click to toggle)
nqp 2014.07-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 23,596 kB
  • ctags: 7,993
  • sloc: ansic: 22,689; java: 20,240; cpp: 4,956; asm: 3,976; perl: 950; python: 267; sh: 245; makefile: 14
file content (45 lines) | stat: -rw-r--r-- 1,619 bytes parent folder | download | duplicates (2)
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
37
38
39
40
41
42
43
44
45
# - Try to find dynload library
#
#   The following variables will be defined:
#
#     DYNLOAD_FOUND
#     DYNLOAD_INCLUDE_DIRS
#     DYNLOAD_LIBRARIES
#
# ----------------------------------------------------------------------------
#
# Package: dyncall
# File: buildsys/cmake/Modules/FindDynLoad.cmake
# Description: CMake Module to find dynload library
# License:
#
# Copyright (c) 2010-2011 Daniel Adler <dadler@uni-goettingen.de>
# 
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

find_path(DYNLOAD_INCLUDE_DIR NAMES dynload.h)
find_library(DYNLOAD_LIBRARY dynload_s)

mark_as_advanced(DYNLOAD_INCLUDE_DIR DYNLOAD_LIBRARY)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(DynLoad DEFAULT_MSG DYNLOAD_LIBRARY DYNLOAD_INCLUDE_DIR)

if(DYNLOAD_FOUND)
  set(DYNLOAD_INCLUDE_DIRS ${DYNLOAD_INCLUDE_DIR})
  set(DYNLOAD_LIBRARIES ${DYNLOAD_LIBRARY})
endif(DYNLOAD_FOUND)

mark_as_advanced(DYNLOAD_INCLUDE_DIR DYNLOAD_LIBRARY)