Code

cmake: add finding script for garbage collector!
authorjohanengelen <johanengelen@users.sourceforge.net>
Sun, 30 Mar 2008 20:58:58 +0000 (20:58 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Sun, 30 Mar 2008 20:58:58 +0000 (20:58 +0000)
CMakeScripts/ConfigInkscapeDepends.cmake
CMakeScripts/FindGC.cmake [new file with mode: 0644]

index c3ec1bddf71922f6b612614fd29bfeb3e8e805bb..de7494b73e3e490e13e7c2a9928d9883dffec465 100644 (file)
@@ -25,7 +25,9 @@ FOREACH(dep ${INKSCAPE_DEPENDS})
         message(STATUS "${dep}: NOT FOUND")
     ENDIF("${dep}_FOUND")
 ENDFOREACH(dep)
-    INCLUDE(FindBoost)
+# Include non pkg-config dependencies:
+INCLUDE(FindBoost)
+INCLUDE(FindGC)
 # end Dependencies
 
 # Optional Dependencies Packages
diff --git a/CMakeScripts/FindGC.cmake b/CMakeScripts/FindGC.cmake
new file mode 100644 (file)
index 0000000..64d9894
--- /dev/null
@@ -0,0 +1,26 @@
+# - Find garbage collector library
+# Go hunting for garbage collector compoments
+# Defines:
+#  LIBGC_INCLUDE_DIR
+
+
+# To find gc on Windows, use DEVLIBS_PATH variable set by mingwenv.bat
+
+FIND_PATH(LIBGC_INCLUDE_DIR gc.h 
+                            /usr/include/gc 
+                            /usr/local/include/gc
+                            $ENV{DEVLIBS_PATH}//include//gc )
+
+
+IF (LIBGC_INCLUDE_DIR)
+  SET(LIBGC_FOUND TRUE)
+ENDIF (LIBGC_INCLUDE_DIR)
+
+IF (LIBGC_FOUND)
+     MESSAGE(STATUS "gc: FOUND  ( ${LIBGC_INCLUDE_DIR} )")
+ELSE(LIBGC_FOUND)
+     MESSAGE(FATAL_ERROR "gc: NOT FOUND")
+ENDIF (LIBGC_FOUND)
+
+INCLUDE_DIRECTORIES( ${LIBGC_INCLUDE_DIR} )
+