summaryrefslogtreecommitdiffstats
path: root/CMakeScripts/Modules/FindBoehmGC.cmake
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-07-06 01:59:32 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-07-06 01:59:32 +0000
commite65a02ed32b78534739aba24929ece7c44dd967f (patch)
tree13cf022f18f6b5bae46aad4bc339e512f069a514 /CMakeScripts/Modules/FindBoehmGC.cmake
parentPull 2Geom revision 2013 (extra constructors for Rect). (diff)
parentText edit dialog: Apply button should grab default only after adding to window (diff)
downloadinkscape-e65a02ed32b78534739aba24929ece7c44dd967f.tar.gz
inkscape-e65a02ed32b78534739aba24929ece7c44dd967f.zip
Merge from trunk
(bzr r10347.1.5)
Diffstat (limited to 'CMakeScripts/Modules/FindBoehmGC.cmake')
-rw-r--r--CMakeScripts/Modules/FindBoehmGC.cmake77
1 files changed, 77 insertions, 0 deletions
diff --git a/CMakeScripts/Modules/FindBoehmGC.cmake b/CMakeScripts/Modules/FindBoehmGC.cmake
new file mode 100644
index 000000000..7a5081c22
--- /dev/null
+++ b/CMakeScripts/Modules/FindBoehmGC.cmake
@@ -0,0 +1,77 @@
+# - Try to find BoehmGC
+# Once done this will define
+#
+# BOEHMGC_FOUND - system has BoehmGC
+# BOEHMGC_INCLUDE_DIRS - the BoehmGC include directory
+# BOEHMGC_LIBRARIES - Link these to use BoehmGC
+# BOEHMGC_DEFINITIONS - Compiler switches required for using BoehmGC
+#
+# Copyright (c) 2008 Joshua L. Blocher <verbalshadow@gmail.com>
+#
+# Redistribution and use is allowed according to the terms of the New
+# BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+
+if (BOEHMGC_LIBRARIES AND BOEHMGC_INCLUDE_DIRS)
+ # in cache already
+ set(BOEHMGC_FOUND TRUE)
+else (BOEHMGC_LIBRARIES AND BOEHMGC_INCLUDE_DIRS)
+ find_path(BOEHMGC_INCLUDE_DIR
+ NAMES
+ gc.h
+ PATHS
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+ $ENV{DEVLIBS_PATH}//include//
+ PATH_SUFFIXES
+ gc
+ )
+
+ find_library(GC_LIBRARY
+ NAMES
+ gc
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ )
+
+ if (GC_LIBRARY)
+ set(GC_FOUND TRUE)
+ endif (GC_LIBRARY)
+
+ set(BOEHMGC_INCLUDE_DIRS
+ ${BOEHMGC_INCLUDE_DIR}
+ )
+
+ if (GC_FOUND)
+ set(BOEHMGC_LIBRARIES
+ ${BOEHMGC_LIBRARIES}
+ ${GC_LIBRARY}
+ )
+ endif (GC_FOUND)
+
+ if (BOEHMGC_INCLUDE_DIRS AND BOEHMGC_LIBRARIES)
+ set(BOEHMGC_FOUND TRUE)
+ endif (BOEHMGC_INCLUDE_DIRS AND BOEHMGC_LIBRARIES)
+
+ if (BOEHMGC_FOUND)
+ if (NOT BoehmGC_FIND_QUIETLY)
+ message(STATUS "Found BoehmGC: ${BOEHMGC_LIBRARIES}")
+ endif (NOT BoehmGC_FIND_QUIETLY)
+ else (BOEHMGC_FOUND)
+ if (BoehmGC_FIND_REQUIRED)
+ message(FATAL_ERROR "Could not find BoehmGC")
+ endif (BoehmGC_FIND_REQUIRED)
+ endif (BOEHMGC_FOUND)
+
+ # show the BOEHMGC_INCLUDE_DIRS and BOEHMGC_LIBRARIES variables only in the advanced view
+ mark_as_advanced(BOEHMGC_INCLUDE_DIRS BOEHMGC_LIBRARIES)
+
+endif (BOEHMGC_LIBRARIES AND BOEHMGC_INCLUDE_DIRS)
+