Code

Cmake: more fixes plus a patch for OSX paths by Henrik Gustafsson
authorverbalshadow <verbalshadow@users.sourceforge.net>
Wed, 7 Jan 2009 21:59:22 +0000 (21:59 +0000)
committerverbalshadow <verbalshadow@users.sourceforge.net>
Wed, 7 Jan 2009 21:59:22 +0000 (21:59 +0000)
CMakeScripts/DefineDependsandFlags.cmake
CMakeScripts/FindGDKMM.cmake
CMakeScripts/FindGIOMM.cmake
CMakeScripts/FindGLIBMM.cmake
CMakeScripts/FindGTK2.cmake
CMakeScripts/FindGtkMM.cmake
CMakeScripts/FindSigC++.cmake
src/2geom/CMakeLists.txt

index 19cb012ded54cbd9b6da3832bfac6db3b2ef8696..b2d3943dfabb4ba16a83d16e764be23eb7ae668f 100644 (file)
@@ -1,63 +1,63 @@
-\r
-# Include dependencies:\r
-find_package(GTK2 REQUIRED)\r
-find_package(GtkMM REQUIRED)\r
-find_package(SigC++ REQUIRED)\r
-find_package(XML2 REQUIRED)\r
-find_package(XSLT REQUIRED)\r
-find_package(GSL REQUIRED)\r
-find_package(ImageMagick++ REQUIRED)\r
-find_package(Freetype2 REQUIRED)\r
-find_package(GnomeVFS2)\r
-find_package(Boost REQUIRED)\r
-find_package(BoehmGC REQUIRED)\r
-find_package(LibWPG)\r
-find_package(PNG REQUIRED) \r
-find_package(Popt REQUIRED)\r
-find_package(OpenSSL)\r
-INCLUDE(IncludeJava)\r
-# end Dependencies\r
-\r
-#Linking \r
-LIST(APPEND INKSCAPE_LIBS \r
-${GTK2_LIBRARIES}\r
-${GTKMM_LIBRARIES}\r
-${SIGC++_LIBRARIES}\r
-${GSL_LIBRARIES}\r
-${XML2_LIBRARIES}\r
-${XSLT_LIBRARIES}\r
-${IMAGEMAGICK++_LIBRARIES}\r
-${FREETYPE2_LIBRARIES}\r
-${GNOMEVFS2_LIBRARIES}\r
-${BOOST_LIBRARIES}\r
-${BOEHMGC_LIBRARIES}\r
-${PNG_LIBRARIES}\r
-${POPT_LIBRARIES}\r
-${OPENSSL_LIBRARIES}\r
-)\r
-\r
-#Includes \r
-SET(INK_INCLUDES\r
-${CMAKE_BINARY_DIR}\r
-${PROJECT_SOURCE_DIR}\r
-${PROJECT_SOURCE_DIR}/src\r
-${GTK2_INCLUDE_DIRS}\r
-${GTKMM_INCLUDE_DIRS}\r
-${SIGC++_INCLUDE_DIRS}\r
-${GSL_INCLUDE_DIRS}\r
-${XML2_INCLUDE_DIRS}\r
-${XSLT_INCLUDE_DIRS}\r
-${IMAGEMAGICK++_INCLUDE_DIRS}\r
-${FREETYPE2_INCLUDE_DIRS}\r
-${GNOMEVFS2_INCLUDE_DIRS}\r
-${BOOST_INCLUDE_DIRS}\r
-${BOEHMGC_INCLUDE_DIRS}\r
-${PNG_INCLUDE_DIRS}\r
-${POPT_INCLUDE_DIRS}\r
-${OPENSSL_INCLUDE_DIRS}\r
-)\r
-#C/C++ Flags\r
-INCLUDE_DIRECTORIES(${INK_INCLUDES})\r
-\r
-#INCLUDE(ConfigCompileFlags)\r
-INCLUDE(ConfigChecks)\r
+
+# Include dependencies:
+find_package(GTK2 REQUIRED)
+find_package(GtkMM REQUIRED)
+find_package(SigC++ REQUIRED)
+find_package(XML2 REQUIRED)
+find_package(XSLT REQUIRED)
+find_package(GSL REQUIRED)
+find_package(ImageMagick++ REQUIRED)
+find_package(Freetype2 REQUIRED)
+find_package(GnomeVFS2)
+find_package(Boost REQUIRED)
+find_package(BoehmGC REQUIRED)
+find_package(LibWPG)
+find_package(PNG REQUIRED) 
+find_package(Popt REQUIRED)
+find_package(OpenSSL)
+INCLUDE(IncludeJava)
+# end Dependencies
+
+#Linking 
+LIST(APPEND INKSCAPE_LIBS 
+${GTK2_LIBRARIES}
+${GTKMM_LIBRARIES}
+${SIGC++_LIBRARIES}
+${GSL_LIBRARIES}
+${XML2_LIBRARIES}
+${XSLT_LIBRARIES}
+${IMAGEMAGICK++_LIBRARIES}
+${FREETYPE2_LIBRARIES}
+${GNOMEVFS2_LIBRARIES}
+${BOOST_LIBRARIES}
+${BOEHMGC_LIBRARIES}
+${PNG_LIBRARIES}
+${POPT_LIBRARIES}
+${OPENSSL_LIBRARIES}
+)
+
+#Includes 
+SET(INK_INCLUDES
+${CMAKE_BINARY_DIR}
+${PROJECT_SOURCE_DIR}
+${PROJECT_SOURCE_DIR}/src
+${GTK2_INCLUDE_DIRS}
+${GTKMM_INCLUDE_DIRS}
+${SIGC++_INCLUDE_DIRS}
+${GSL_INCLUDE_DIRS}
+${XML2_INCLUDE_DIRS}
+${XSLT_INCLUDE_DIRS}
+${IMAGEMAGICK++_INCLUDE_DIRS}
+${FREETYPE2_INCLUDE_DIRS}
+${GNOMEVFS2_INCLUDE_DIRS}
+${BOOST_INCLUDE_DIRS}
+${BOEHMGC_INCLUDE_DIRS}
+${PNG_INCLUDE_DIRS}
+${POPT_INCLUDE_DIRS}
+${OPENSSL_INCLUDE_DIRS}
+)
+#C/C++ Flags
+INCLUDE_DIRECTORIES(${INK_INCLUDES})
+
+#INCLUDE(ConfigCompileFlags)
+INCLUDE(ConfigChecks)
index 37723349ccb7a02275e51f28cfb04dcad40bdcca..60c98e096f32aa645e7445ce1f46740a3531c696 100644 (file)
@@ -37,6 +37,7 @@ else (GDKMM_LIBRARIES AND GDKMM_INCLUDE_DIRS)
       /usr/include
       /usr/local/include
       /opt/local/include
+      /opt/local/include/gdkmm-2.4
       /sw/include
     PATH_SUFFIXES
       gdkmm-2.4
@@ -50,6 +51,7 @@ else (GDKMM_LIBRARIES AND GDKMM_INCLUDE_DIRS)
       /usr/include
       /usr/local/include
       /opt/local/include
+      /opt/local/lib/gdkmm-2.4/include
       /sw/include
       /usr/lib/gdkmm-2.4/include
       /usr/lib64/gdkmm-2.4/include
index 4a1bc8133ef3350a5a8a25a6dba8d918d57f99bd..953f84b68bf99dce0db6f6c26d0035ad7d625349 100644 (file)
@@ -37,6 +37,7 @@ else (GIOMM_LIBRARIES AND GIOMM_INCLUDE_DIRS)
       /usr/include
       /usr/local/include
       /opt/local/include
+      /opt/local/include/giomm-2.4/
       /sw/include
     PATH_SUFFIXES
       giomm-2.4
index bfbb559178b923f4badd933dfbece36bac8b37b7..435faf868cf7bfe301f93d802446245039039bb7 100644 (file)
@@ -37,6 +37,7 @@ else (GLIBMM_LIBRARIES AND GLIBMM_INCLUDE_DIRS)
       /usr/include
       /usr/local/include
       /opt/local/include
+      /opt/local/lib/glibmm-2.4/include
       /sw/include
     PATH_SUFFIXES
       glibmm-2.4
@@ -50,6 +51,7 @@ else (GLIBMM_LIBRARIES AND GLIBMM_INCLUDE_DIRS)
       /usr/include
       /usr/local/include
       /opt/local/include
+      /opt/local/lib/glibmm-2.4/include
       /sw/include
       /usr/lib/glibmm-2.4/include
       /usr/lib64/glibmm-2.4/include
index 9c7346e1d4a8d165e46490debc0f3d556f42be81..06105bd0462dc1bfdfebe1baceace00deea45997 100644 (file)
@@ -96,6 +96,7 @@ ELSE (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
       /usr/include/gtk-2.0
       /usr/local/include/gtk-2.0
       /opt/gnome/include/gtk-2.0
+      /opt/local/include/gtk-2.0
       $ENV{DEVLIBS_PATH}//include//
     )
 
@@ -120,6 +121,7 @@ ELSE (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
       /opt/gnome/lib/glib-2.0/include
       /usr/lib64/glib-2.0/include
       /usr/lib/glib-2.0/include
+      /opt/local/lib/glib-2.0/include
       $ENV{DEVLIBS_PATH}//include//
     )
     #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}")
@@ -128,6 +130,7 @@ ELSE (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
       ${_GLIB2_INCLUDEDIR}
       /opt/gnome/include/glib-2.0
       /usr/include/glib-2.0
+      /opt/local/include/glib-2.0
       $ENV{DEVLIBS_PATH}//include//
     )
     #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}")
@@ -138,6 +141,7 @@ ELSE (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
       /usr/local/include
       /usr/openwin/share/include
       /opt/gnome/include
+      /opt/local/include
       $ENV{DEVLIBS_PATH}//include//
     )
 
@@ -153,6 +157,7 @@ ELSE (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
       ${_PANGO_INCLUDEDIR}
       /opt/gnome/include/pango-1.0
       /usr/include/pango-1.0
+      /opt/local/include/pango-1.0
       $ENV{DEVLIBS_PATH}//include//
     )
 
@@ -170,6 +175,7 @@ ELSE (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
       /opt/gnome/lib64/gtk-2.0/include
       /usr/lib/gtk-2.0/include
       /usr/lib64/gtk-2.0/include
+      /opt/local/lib/gtk-2.0/include
       $ENV{DEVLIBS_PATH}//include//
     )
 
@@ -186,6 +192,7 @@ ELSE (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
       /opt/gnome/include/cairo
       /usr/include
       /usr/include/cairo
+      /opt/local/include/cairo
       $ENV{DEVLIBS_PATH}//include//
     )
     #MESSAGE(STATUS "DEBUG: GTK2_CAIRO_INCLUDE_PATH = ${GTK2_CAIRO_INCLUDE_PATH}")
@@ -202,6 +209,7 @@ ELSE (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
       ${_ATK_INCLUDEDIR}
       /opt/gnome/include/atk-1.0
       /usr/include/atk-1.0
+      /opt/local/include/atk-1.0
       $ENV{DEVLIBS_PATH}//include//
     )
     #MESSAGE(STATUS "DEBUG: GTK2_ATK_INCLUDE_PATH = ${GTK2_ATK_INCLUDE_PATH}")
index 0c47499067e54c2618913740ca35fa3eebf0cacb..1c983950314d2a0ca3800d71d4099a6bddffbd17 100644 (file)
@@ -50,6 +50,7 @@ else (GTKMM_LIBRARIES AND GTKMM_INCLUDE_DIRS)
       /usr/include
       /usr/local/include
       /opt/local/include
+      /opt/local/lib/gtkmm-2.4/include
       /sw/include
       /usr/lib/gtkmm-2.4/include
       /usr/lib64/gtkmm-2.4/include
@@ -101,7 +102,7 @@ find_package(CAIROMM REQUIRED)
       ${ATKMM_LIBRARIES}
       ${GDKMM_LIBRARIES}
       ${GIOMM_LIBRARIES}
-      ${GLIBKMM_LIBRARIES}
+      ${GLIBMM_LIBRARIES}
       ${PANGOMM_LIBRARIES}
       ${CAIROMM_LIBRARIES}
     )
index 62681cf7f01dfa48fe1f489e506081149a65b491..ed0abc545b5fe4a00e631b0de3e2fe6fc6a40f8c 100644 (file)
@@ -51,6 +51,7 @@ else (SIGC++_LIBRARIES AND SIGC++_INCLUDE_DIRS)
       /usr/include
       /usr/local/include
       /opt/local/include
+      /opt/local/lib/sigc++-2.0/include
       /sw/include
       /usr/lib/sigc++-2.0/include
       /usr/lib64/sigc++-2.0/include
index 9aea995d2e5a6443b49b51aa43dd99a4f4ec021c..e75c6174b520d68a71e892f42c29d162ee2656bf 100644 (file)
@@ -1,30 +1,3 @@
-#generate parser file with ragel
-SET(SVG_PARSER_CPP "${CMAKE_CURRENT_SOURCE_DIR}/svg-path-parser.cpp")
-SET(SVG_PARSER_TMP "${CMAKE_CURRENT_SOURCE_DIR}/svg-path-parser.tmp")
-SET(SVG_PARSER_RL "${CMAKE_CURRENT_SOURCE_DIR}/svg-path-parser.rl")
-SET(GENERATE_SVG_PARSER NOT EXISTS "${SVG_PARSER_CPP}")
-SET(REGENERATE_SVG_PARSER "${SVG_PARSER_CPP}" IS_NEWER_THAN "${SVG_PARSER_RL}")
-IF( EXISTS "/usr/bin/ragel" OR EXISTS "/usr/local/bin/ragel" )
-IF(GENERATE_SVG_PARSER OR REGENERATE_SVG_PARSER)
-  EXECUTE_PROCESS(COMMAND ragel --version      OUTPUT_VARIABLE CMD_OUTPUT ERROR_QUIET)
-  STRING(REGEX MATCH "version [0-9]+[.]*[0-9]*" RALEG_VERSION ${CMD_OUTPUT})
-  STRING(REGEX REPLACE "version ([0-9]+).*" "\\1" RALEG_MAJOR ${RALEG_VERSION})
-  STRING(REGEX MATCH "[0-9]+$" RALEG_MINOR ${RALEG_VERSION})
-  IF( ${RALEG_MAJOR} LESS 6 AND ${RALEG_MINOR} LESS 18 )
-    SET(RLCODEGEN_CMD  rlcodegen)
-  ELSE( ${RALEG_MAJOR} LESS 6 AND ${RALEG_MINOR} LESS 18 )
-    SET(RLCODEGEN_CMD rlgen-cd)
-  ENDIF( ${RALEG_MAJOR} LESS 6 AND ${RALEG_MINOR} LESS 18 )
-  ADD_CUSTOM_COMMAND(OUTPUT "${SVG_PARSER_CPP}"
-                     COMMAND ragel -o "${SVG_PARSER_TMP}" "${SVG_PARSER_RL}"
-                     COMMAND ${RLCODEGEN_CMD} -T0 -o "${SVG_PARSER_CPP}" "${SVG_PARSER_TMP}"
-                     DEPENDS "${SVG_PARSER_RL}"
-                     WORKING_DIRECTORY "${CURRENT_SOURCE_DIR}"
-                     COMMENT "Generating svg_path_parser.cpp with ragel"
-                     )
-ENDIF(GENERATE_SVG_PARSER OR REGENERATE_SVG_PARSER)
-ENDIF( EXISTS "/usr/bin/ragel" OR EXISTS "/usr/local/bin/ragel" )
-
 SET(2GEOM_SRC
 
 svg-path.h
@@ -151,17 +124,3 @@ numeric/matrix.cpp
 ADD_LIBRARY(2geom ${LIB_TYPE} ${2GEOM_SRC})
 #TARGET_LINK_LIBRARIES(2geom blas gsl)
 TARGET_LINK_LIBRARIES(2geom "${LINK_GSL} ${GTK2_LINK_FLAGS}")
-INSTALL(TARGETS 2geom
-  RUNTIME DESTINATION bin
-  LIBRARY DESTINATION lib
-  ARCHIVE DESTINATION lib
-)
-FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
-INSTALL(FILES ${files} DESTINATION include/2geom/2geom)
-
-#CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/2geom.pc.in
-#               ${CMAKE_BINARY_DIR}/2geom.pc @ONLY IMMEDIATE )
-#INSTALL(FILES "${CMAKE_BINARY_DIR}/2geom.pc" DESTINATION lib/pkgconfig)
-#ADD_SUBDIRECTORY (toys)
-#ADD_SUBDIRECTORY (tests)
-#ADD_SUBDIRECTORY (py2geom)