0
|
1 # - Try to find DynLoad library
|
|
2 #
|
|
3 # The following variables will be defined:
|
|
4 #
|
|
5 # DYNCALLBACK_FOUND
|
|
6 # DYNCALLBACK_INCLUDE_DIRS
|
|
7 # DYNCALLBACK_LIBRARIES
|
|
8 #
|
|
9 # ----------------------------------------------------------------------------
|
|
10 #
|
|
11 # Package: dyncall
|
|
12 # File: buildsys/cmake/Modules/FindDynLoad.cmake
|
|
13 # Description: CMake Module to find dynload library
|
|
14 # License:
|
|
15 #
|
|
16 # Copyright (c) 2010,2011 Daniel Adler <dadler@uni-goettingen.de>
|
|
17 #
|
|
18 # Permission to use, copy, modify, and distribute this software for any
|
|
19 # purpose with or without fee is hereby granted, provided that the above
|
|
20 # copyright notice and this permission notice appear in all copies.
|
|
21 #
|
|
22 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
23 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
24 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
25 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
26 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
27 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
28 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
29 #
|
|
30
|
|
31 find_path(DYNCALLBACK_INCLUDE_DIR NAMES dyncall_callback.h)
|
|
32 find_library(DYNCALLBACK_LIBRARY dyncallback_s)
|
|
33
|
|
34 include(FindPackageHandleStandardArgs)
|
|
35 find_package_handle_standard_args(DynCallback DEFAULT_MSG DYNCALLBACK_LIBRARY DYNCALLBACK_INCLUDE_DIR)
|
|
36
|
|
37 if(DYNCALLBACK_FOUND)
|
|
38 set(DYNCALLBACK_INCLUDE_DIRS ${DYNCALLBACK_INCLUDE_DIR})
|
|
39 set(DYNCALLBACK_LIBRARIES ${DYNCALLBACK_LIBRARY})
|
|
40 endif(DYNCALLBACK_FOUND)
|
|
41
|
|
42 mark_as_advanced(DYNCALLBACK_INCLUDE_DIR DYNCALLBACK_LIBRARY)
|
|
43
|