Code

Cmake: Improve Gtkmm dependency checking, add new files to CMakeLists.txts, remove...
authorverbalshadow <verbalshadow@users.sourceforge.net>
Thu, 29 May 2008 02:39:00 +0000 (02:39 +0000)
committerverbalshadow <verbalshadow@users.sourceforge.net>
Thu, 29 May 2008 02:39:00 +0000 (02:39 +0000)
CMakeScripts/ConfigInkscapeDepends.cmake [deleted file]
CMakeScripts/DefineDependsandFlags.cmake
CMakeScripts/FindGC.cmake [deleted file]
CMakeScripts/FindGtkMM.cmake
src/2geom/CMakeLists.txt
src/CMakeLists.txt

diff --git a/CMakeScripts/ConfigInkscapeDepends.cmake b/CMakeScripts/ConfigInkscapeDepends.cmake
deleted file mode 100644 (file)
index 94d4326..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-SET(INKSCAPE_DEPENDS\r
-# the commented out below are required but pulled in with gtk+-2.0 & gtkmm-2.4
-# with some duplication that we can only remove if lookup each sub-lib individually\r
-#    cairo\r
-#    cairomm-1.0\r
-#    glib-2.0
-#    glibmm-2.4
-    gsl
-    gtk+-2.0
-    gtkmm-2.4
-    sigc++-2.0\r
-    lcms\r
-#    libgc1c2\r
-    libpng\r
-    libxml-2.0\r
-    libxslt\r
-    ImageMagick++\r
-    freetype2)\r
-SET(INKSCAPE_OPTIONAL\r
-    gnome-vfs-2.0\r
-    libwpg-0.1\r
-    libssl)\r
-\r
-include(UsePkgConfig)\r
-\r
-# Dependencies Packages\r
-message(STATUS "")\r
-message(STATUS "")\r
-message(STATUS "Checking For REQUIRED Libraries for Building Inkscape.")\r
-SET(INKSCAPE_LINK_FLAGS "")\r
-FOREACH(dep ${INKSCAPE_DEPENDS})\r
-    # This is a hack due to a bug in Cmake vars system, Uncomment if using a version older than 2.4 //verbalshadow\r
-#    IF("${dep}" MATCHES "gtk\\+-2.0")\r
-#        SET(dep_name "GTK2")\r
-#    ELSE("${dep}" MATCHES "gtk\\+-2.0")\r
-       SET(dep_name "${dep}")\r
-#    ENDIF("${dep}" MATCHES "gtk\\+-2.0")\r
-\r
-    PKGCONFIG_FOUND(${dep} "${dep}_FOUND")\r
-    PKGCONFIG(${dep} "${dep_name}_INCLUDE_DIR" "${dep_name}_LINK_DIR" "${dep_name}_LINK_FLAGS" "${dep_name}_CFLAGS")\r
-#    PKGCONFIG_VERSION(${dep} "${dep}_VERSION")\r
-    IF("${dep}_FOUND")\r
-        message(STATUS "${dep}: FOUND")\r
-        # Set Compiler Flags\r
-        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${dep_name}_CFLAGS}")\r
-#        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${dep_name}_CFLAGS}")\r
-        SET(INKSCAPE_LINK_FLAGS "${INKSCAPE_LINK_FLAGS} ${${dep_name}_LINK_FLAGS}")\r
-    ELSE("${dep}_FOUND")\r
-        message(STATUS "${dep}: NOT FOUND")\r
-    ENDIF("${dep}_FOUND")
-ENDFOREACH(dep)
-\r
-# Include non pkg-config dependencies:\r
-INCLUDE(FindBoost)
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${BOOST_INCLUDE_DIR} ")\r
-INCLUDE(FindGC)
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${LIBGC_INCLUDE_DIR} ")\r
-INCLUDE(IncludeJava)\r
-# end Dependencies\r
-\r
-# Optional Dependencies Packages\r
-message(STATUS "")\r
-message(STATUS "")\r
-message(STATUS "Checking For OPTIONAL Libraries for Building Inkscape.")\r
-message(STATUS "These add additional functionality to Inkscape.")\r
-FOREACH(opt ${INKSCAPE_OPTIONAL})\r
-    SET(opt_name "${opt}")\r
-    PKGCONFIG_FOUND(${opt} "${opt}_FOUND")\r
-    PKGCONFIG(${opt} "${opt_name}_INCLUDE_DIR" "${opt_name}_LINK_DIR" "${opt_name}_LINK_FLAGS" "${opt_name}_CFLAGS")\r
-#    PKGCONFIG_VERSION(${opt} "${opt}_VERSION")\r
-    IF("${opt}_FOUND")\r
-        message(STATUS "${opt}: FOUND")\r
-        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${opt_name}_CFLAGS}")
-#        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${opt_name}_CFLAGS}")\r
-        SET(INKSCAPE_LINK_FLAGS "${INKSCAPE_LINK_FLAGS} ${${opt_name}_LINK_FLAGS}")\r
-    ELSE("${opt}_FOUND")\r
-        message(STATUS "${opt}: NOT FOUND")\r
-    ENDIF("${opt}_FOUND")\r
-ENDFOREACH(opt)\r
-# end Optional Dependencies\r
-message(STATUS "")\r
-message(STATUS "")\r
-\r
-SET(CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM} -j2")
-
-INCLUDE(ConfigCompileFlags)\r
-INCLUDE(ConfigChecks)\r
-
index 8a82b6214eb0aa105df718fecedb0e42f38015f0..5dbc1bf5e0446c2e5d1a3a967d002b7e4e889072 100644 (file)
@@ -17,7 +17,7 @@ find_package(Popt REQUIRED)
 find_package(OpenSSL)\r
 INCLUDE(IncludeJava)\r
 # end Dependencies
-
+Message(STATUS "${GTKMM_LIBRARIES}-----${GTKMM_INCLUDE_DIRS}")
 #Linking \r
 SET(INKSCAPE_LIBS 
 "${GTK2_LIBRARIES}"
diff --git a/CMakeScripts/FindGC.cmake b/CMakeScripts/FindGC.cmake
deleted file mode 100644 (file)
index 64d9894..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# - 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} )
-
index 2b3f71d350709c281d26bbdbb1276150665a13b0..b98c19834b3c592d23a234c92753cce0d580d354 100644 (file)
@@ -1,4 +1,5 @@
-# - Try to find GtkMM
+# - Try to find GtkMM (glibmm-2.4 gdkmm-2.4 pangomm-1.4 atkmm-1.6)
+#  Where not going to find gtk+-2.0 as this is covered using FindGTK2
 # Once done this will define
 #
 #  GTKMM_FOUND - system has GtkMM
 #  BSD license.
 #  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 #
-
-
+SET(SubLibs
+gtkmm-2.4
+glibmm-2.4
+gdkmm-2.4
+pangomm-1.4
+atkmm-1.6
+)
+\r
 if (GTKMM_LIBRARIES AND GTKMM_INCLUDE_DIRS)
   # in cache already
   set(GTKMM_FOUND TRUE)
 else (GTKMM_LIBRARIES AND GTKMM_INCLUDE_DIRS)
+FOREACH(_SUBLIB ${SubLibs})
+  # Clean library name for header file
+  STRING(REGEX REPLACE "[-]([^ ]+)" "" _H_${_SUBLIB}  "${_SUBLIB}" )
   # use pkg-config to get the directories and then use these values
   # in the FIND_PATH() and FIND_LIBRARY() calls
   if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
     include(UsePkgConfig)
-    pkgconfig(gtkmm-2.4 _GTKMM_INCLUDEDIR _GTKMM_LIBDIR _GTKMM_LDFLAGS _GTKMM_CFLAGS)
+    pkgconfig(${_SUBLIB} _${_SUBLIB}_INCLUDEDIR _${_SUBLIB}_LIBDIR _${_SUBLIB}_LDFLAGS _${_SUBLIB}_CFLAGS)
   else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
     find_package(PkgConfig)
     if (PKG_CONFIG_FOUND)
-      pkg_check_modules(_GTKMM gtkmm-2.4)
+      pkg_check_modules(_${_SUBLIB} ${_SUBLIB})
     endif (PKG_CONFIG_FOUND)
   endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
-  find_path(GTKMM_INCLUDE_DIR
+  find_path(${_SUBLIB}_INCLUDE_DIR
     NAMES
-      gtkmm.h
+      ${_H_${_SUBLIB}}.h
     PATHS
-      ${_GTKMM_INCLUDEDIR}
+      ${_${_SUBLIB}_INCLUDEDIR}
       /usr/include
       /usr/local/include
       /opt/local/include
       /sw/include
     PATH_SUFFIXES
-      gtkmm-2.4
+      ${_SUBLIB}
   )
 
-  find_library(GTKMM-2.4_LIBRARY
+  find_library(${_SUBLIB}_LIBRARY
     NAMES
-      gtkmm-2.4
+      ${_SUBLIB}
     PATHS
-      ${_GTKMM_LIBDIR}
+      ${_${_SUBLIB}_LIBDIR}
       /usr/lib
       /usr/local/lib
       /opt/local/lib
       /sw/lib
   )
 
-  if (GTKMM-2.4_LIBRARY)
-    set(GTKMM-2.4_FOUND TRUE)
-  endif (GTKMM-2.4_LIBRARY)
+  if (${_SUBLIB}_LIBRARY)
+    set(${_SUBLIB}_FOUND TRUE)
+  endif (${_SUBLIB}_LIBRARY)
 
-  set(GTKMM_INCLUDE_DIRS
-    ${GTKMM_INCLUDE_DIR}
+  LIST(APPEND GTKMM_INCLUDE_DIRS
+    ${${_SUBLIB}_INCLUDE_DIR}
   )
 
-  if (GTKMM-2.4_FOUND)
-    set(GTKMM_LIBRARIES
-      ${GTKMM_LIBRARIES}
-      ${GTKMM-2.4_LIBRARY}
+  if (${_SUBLIB}_FOUND)
+    LIST(APPEND GTKMM_LIBRARIES
+      ${${_SUBLIB}_LIBRARIES}
+      ${${_SUBLIB}_LIBRARY}
     )
-  endif (GTKMM-2.4_FOUND)
+  endif (${_SUBLIB}_FOUND)
+ENDFOREACH(_SUBLIB)
 
   if (GTKMM_INCLUDE_DIRS AND GTKMM_LIBRARIES)
      set(GTKMM_FOUND TRUE)
index fc741fb4731398532a7f0f589f05bfefc913b9e2..7150eacad92a6f0ac8ff7c22816ef0bef45cd15a 100644 (file)
@@ -2,8 +2,8 @@ SET(2geom_SRC
 angle.h
 basic-intersection.cpp
 basic-intersection.h
-bezier.h
 bezier-curve.h
+bezier.h
 bezier-to-sbasis.h
 bezier-utils.cpp
 bezier-utils.h
@@ -19,8 +19,8 @@ coord.h
 crossing.cpp
 crossing.h
 curve.h
-curves.h
 curve-helpers.cpp
+curves.h
 d2.h
 d2-sbasis.cpp
 d2-sbasis.h
index a6da5168f828a83dfd1405a9b87f1191ea5bbefd..c2568db3047568ca9d4f7b1e412c6b84d5f140c3 100644 (file)
@@ -236,6 +236,8 @@ color-profile.h
 color-rgba.h
 composite-undo-stack-observer.cpp
 composite-undo-stack-observer.h
+common-context.h
+common-context.cpp
 conditions.cpp
 conditions.h
 conn-avoid-ref.cpp