Code

Cmake: Fixed HAVE_CAIRO_PDF and moved ConfigChecks to it's own file
authorverbalshadow <verbalshadow@users.sourceforge.net>
Sat, 3 May 2008 20:15:46 +0000 (20:15 +0000)
committerverbalshadow <verbalshadow@users.sourceforge.net>
Sat, 3 May 2008 20:15:46 +0000 (20:15 +0000)
CMakeScripts/ConfigChecks.cmake [new file with mode: 0644]
CMakeScripts/ConfigCompileFlags.cmake
CMakeScripts/ConfigInkscapeDepends.cmake
CMakeScripts/ConfigPaths.cmake
CMakeScripts/FindBoost.cmake

diff --git a/CMakeScripts/ConfigChecks.cmake b/CMakeScripts/ConfigChecks.cmake
new file mode 100644 (file)
index 0000000..184239c
--- /dev/null
@@ -0,0 +1,70 @@
+#---------------\r
+# From here on:\r
+# Set all HAVE_XXX variables, to correctly set all defines in config.h\r
+\r
+INCLUDE (CheckIncludeFiles)\r
+INCLUDE (CheckFunctionExists)\r
+INCLUDE (CheckStructMember)\r
+# usage: CHECK_INCLUDE_FILES (<header> <RESULT_VARIABLE> )\r
+# usage: CHECK_FUNCTION_EXISTS (<function name> <RESULT_VARIABLE> )\r
+# usage: CHECK_STRUCT_MEMBER (<struct> <member> <header> <RESULT_VARIABLE>)\r
+\r
+CHECK_INCLUDE_FILES(boost/concept_check.hpp HAVE_BOOST_CONCEPT_CHECK_HPP)\r
+CHECK_INCLUDE_FILES(cairo-pdf.h HAVE_CAIRO_PDF)\r
+CHECK_FUNCTION_EXISTS(floor HAVE_FLOOR)\r
+CHECK_FUNCTION_EXISTS(fpsetmask HAVE_FPSETMASK)\r
+CHECK_INCLUDE_FILES(gc/gc.h HAVE_GC_GC_H)\r
+CHECK_INCLUDE_FILES(gc.h HAVE_GC_H)\r
+CHECK_INCLUDE_FILES(getopt.h HAVE_GETOPT_H)\r
+CHECK_FUNCTION_EXISTS(gettext HAVE_GETTEXT)\r
+CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)\r
+CHECK_FUNCTION_EXISTS(gtk_window_fullscreen HAVE_GTK_WINDOW_FULLSCREEN)\r
+CHECK_FUNCTION_EXISTS(gtk_window_set_default_icon_from_file HAVE_GTK_WINDOW_SET_DEFAULT_ICON_FROM_FILE)\r
+CHECK_INCLUDE_FILES(ieeefp.h HAVE_IEEEFP_H)\r
+CHECK_INCLUDE_FILES(inttypes.h HAVE_INTTYPES_H)\r
+CHECK_INCLUDE_FILES(locale.h HAVE_LC_MESSAGES)\r
+CHECK_INCLUDE_FILES(locale.h HAVE_LOCALE_H)\r
+CHECK_INCLUDE_FILES(libintl.h HAVE_LIBINTL_H)\r
+CHECK_INCLUDE_FILES(fcntl.h HAVE_FCNTL_H)\r
+CHECK_FUNCTION_EXISTS(mallinfo HAVE_MALLINFO)\r
+CHECK_INCLUDE_FILES(malloc.h HAVE_MALLOC_H)\r
+CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)\r
+CHECK_INCLUDE_FILES(memory.h HAVE_MEMORY_H)\r
+CHECK_FUNCTION_EXISTS(memset HAVE_MEMSET)\r
+CHECK_FUNCTION_EXISTS(mkdir HAVE_MKDIR)\r
+CHECK_FUNCTION_EXISTS(pow HAVE_POW)\r
+CHECK_FUNCTION_EXISTS(sqrt HAVE_SQRT)\r
+CHECK_INCLUDE_FILES(stddef.h HAVE_STDDEF_H)\r
+CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)\r
+CHECK_INCLUDE_FILES(stdlib.h HAVE_STDLIB_H)\r
+CHECK_INCLUDE_FILES(strings.h HAVE_STRINGS_H)\r
+CHECK_INCLUDE_FILES(string.h HAVE_STRING_H)\r
+CHECK_FUNCTION_EXISTS(strncasecmp HAVE_STRNCASECMP)\r
+CHECK_FUNCTION_EXISTS(strpbrk HAVE_STRPBRK)\r
+CHECK_FUNCTION_EXISTS(strrchr HAVE_STRRCHR)\r
+CHECK_FUNCTION_EXISTS(strspn HAVE_STRSPN)\r
+CHECK_FUNCTION_EXISTS(strstr HAVE_STRSTR)\r
+CHECK_FUNCTION_EXISTS(strtoul HAVE_STRTOUL)\r
+CHECK_STRUCT_MEMBER(fordblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_FORDBLKS)\r
+CHECK_STRUCT_MEMBER(fsmblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_FSMBLKS)\r
+CHECK_STRUCT_MEMBER(hblkhd mallinfo malloc.h HAVE_STRUCT_MALLINFO_HBLKHD)\r
+CHECK_STRUCT_MEMBER(uordblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_UORDBLKS)\r
+CHECK_STRUCT_MEMBER(usmblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_USMBLKS)\r
+CHECK_INCLUDE_FILES(sys/filio.h HAVE_SYS_FILIO_H)\r
+CHECK_INCLUDE_FILES(sys/stat.h HAVE_SYS_STAT_H)\r
+CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)\r
+CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)\r
+CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)\r
+CHECK_INCLUDE_FILES(zlib.h HAVE_ZLIB_H)
+\r
+#Enable pango defines, necessary for compilation on Win32, how about Linux?
+# yes but needs to be done a better way\r
+IF (HAVE_CAIRO_PDF)\r
+    SET(PANGO_ENABLE_ENGINE TRUE)\r
+    SET(RENDER_WITH_PANGO_CAIRO TRUE)\r
+ENDIF(HAVE_CAIRO_PDF)\r
+\r
+# Create the two configuration files: config.h and inkscape_version.h\r
+# Create them in the binary root dir\r
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)\r
+FILE(WRITE ${CMAKE_BINARY_DIR}/inkscape_version.h "#define INKSCAPE_VERSION \"${INKSCAPE_VERSION}\"\n")
index d100dd4662221b5b222ac988520c259760a7ebca..c5447df49ff2737d9795eb2b794b154db7231be9 100644 (file)
@@ -8,7 +8,6 @@ IF (ENABLE_PROFILING)
     SET(LINK_PROFILING_FLAGS "-pg")
 ENDIF (ENABLE_PROFILING)
 
-
 ADD_DEFINITIONS(-DVERSION=\\\"${INKSCAPE_VERSION}\\\")
 ADD_DEFINITIONS(${DEFINE_FLAGS} -DHAVE_CONFIG_H -D_INTL_REDIRECT_INLINE)
 
@@ -23,8 +22,3 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_PROFILING_FLAGS} ")
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_PROFILING_FLAGS} ")
 
 SET(CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM} ")
-#Linking check
-message(STATUS "@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
-message(STATUS "${INKSCAPE_LINK_FLAGS}")
-message(STATUS "@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
-
index 450bc1fb7d2b8915293c3c26a01701ada94258ce..1f0eac63988a9d4224d1d71eb3ee4a8d6dcad34c 100644 (file)
@@ -1,6 +1,6 @@
 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 individaully\r
+# with some duplication that we can only remove if lookup each sub-lib individually\r
 #    cairo\r
 #    cairomm-1.0\r
 #    glib-2.0
@@ -79,74 +79,8 @@ ENDFOREACH(opt)
 message(STATUS "")\r
 message(STATUS "")\r
 \r
-SET(CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM} -j2")\r
-\r
-#---------------\r
-# From here on:\r
-# Set all HAVE_XXX variables, to correctly set all defines in config.h\r
-\r
-INCLUDE (CheckIncludeFiles)\r
-INCLUDE (CheckFunctionExists)\r
-INCLUDE (CheckStructMember)\r
-# usage: CHECK_INCLUDE_FILES (<header> <RESULT_VARIABLE> )\r
-# usage: CHECK_FUNCTION_EXISTS (<function name> <RESULT_VARIABLE> )\r
-# usage: CHECK_STRUCT_MEMBER (<struct> <member> <header> <RESULT_VARIABLE>)\r
-\r
-CHECK_INCLUDE_FILES(boost/concept_check.hpp HAVE_BOOST_CONCEPT_CHECK_HPP)\r
-CHECK_INCLUDE_FILES(cairo-pdf.h HAVE_CAIRO_PDF)\r
-CHECK_FUNCTION_EXISTS(floor HAVE_FLOOR)\r
-CHECK_FUNCTION_EXISTS(fpsetmask HAVE_FPSETMASK)\r
-CHECK_INCLUDE_FILES(gc/gc.h HAVE_GC_GC_H)\r
-CHECK_INCLUDE_FILES(gc.h HAVE_GC_H)\r
-CHECK_INCLUDE_FILES(getopt.h HAVE_GETOPT_H)\r
-CHECK_FUNCTION_EXISTS(gettext HAVE_GETTEXT)\r
-CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)\r
-CHECK_FUNCTION_EXISTS(gtk_window_fullscreen HAVE_GTK_WINDOW_FULLSCREEN)\r
-CHECK_FUNCTION_EXISTS(gtk_window_set_default_icon_from_file HAVE_GTK_WINDOW_SET_DEFAULT_ICON_FROM_FILE)\r
-CHECK_INCLUDE_FILES(ieeefp.h HAVE_IEEEFP_H)\r
-CHECK_INCLUDE_FILES(inttypes.h HAVE_INTTYPES_H)\r
-CHECK_INCLUDE_FILES(locale.h HAVE_LC_MESSAGES)\r
-CHECK_INCLUDE_FILES(locale.h HAVE_LOCALE_H)\r
-CHECK_INCLUDE_FILES(libintl.h HAVE_LIBINTL_H)\r
-CHECK_INCLUDE_FILES(fcntl.h HAVE_FCNTL_H)\r
-CHECK_FUNCTION_EXISTS(mallinfo HAVE_MALLINFO)\r
-CHECK_INCLUDE_FILES(malloc.h HAVE_MALLOC_H)\r
-CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)\r
-CHECK_INCLUDE_FILES(memory.h HAVE_MEMORY_H)\r
-CHECK_FUNCTION_EXISTS(memset HAVE_MEMSET)\r
-CHECK_FUNCTION_EXISTS(mkdir HAVE_MKDIR)\r
-CHECK_FUNCTION_EXISTS(pow HAVE_POW)\r
-CHECK_FUNCTION_EXISTS(sqrt HAVE_SQRT)\r
-CHECK_INCLUDE_FILES(stddef.h HAVE_STDDEF_H)\r
-CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)\r
-CHECK_INCLUDE_FILES(stdlib.h HAVE_STDLIB_H)\r
-CHECK_INCLUDE_FILES(strings.h HAVE_STRINGS_H)\r
-CHECK_INCLUDE_FILES(string.h HAVE_STRING_H)\r
-CHECK_FUNCTION_EXISTS(strncasecmp HAVE_STRNCASECMP)\r
-CHECK_FUNCTION_EXISTS(strpbrk HAVE_STRPBRK)\r
-CHECK_FUNCTION_EXISTS(strrchr HAVE_STRRCHR)\r
-CHECK_FUNCTION_EXISTS(strspn HAVE_STRSPN)\r
-CHECK_FUNCTION_EXISTS(strstr HAVE_STRSTR)\r
-CHECK_FUNCTION_EXISTS(strtoul HAVE_STRTOUL)\r
-CHECK_STRUCT_MEMBER(fordblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_FORDBLKS)\r
-CHECK_STRUCT_MEMBER(fsmblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_FSMBLKS)\r
-CHECK_STRUCT_MEMBER(hblkhd mallinfo malloc.h HAVE_STRUCT_MALLINFO_HBLKHD)\r
-CHECK_STRUCT_MEMBER(uordblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_UORDBLKS)\r
-CHECK_STRUCT_MEMBER(usmblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_USMBLKS)\r
-CHECK_INCLUDE_FILES(sys/filio.h HAVE_SYS_FILIO_H)\r
-CHECK_INCLUDE_FILES(sys/stat.h HAVE_SYS_STAT_H)\r
-CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)\r
-CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)\r
-CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)\r
-CHECK_INCLUDE_FILES(zlib.h HAVE_ZLIB_H)\r
-\r
-#Enable pango defines, necessary for compilation on Win32, how about Linux?\r
-IF (HAVE_CAIRO_PDF)\r
-    SET(PANGO_ENABLE_ENGINE TRUE)\r
-    SET(RENDER_WITH_PANGO_CAIRO TRUE)\r
-ENDIF(HAVE_CAIRO_PDF)\r
-\r
-# Create the two configuration files: config.h and inkscape_version.h\r
-# Create them in the binary root dir\r
-CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)\r
-FILE(WRITE ${CMAKE_BINARY_DIR}/inkscape_version.h "#define INKSCAPE_VERSION \"${INKSCAPE_VERSION}\"\n")
+SET(CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM} -j2")
+
+INCLUDE(ConfigCompileFlags)\r
+INCLUDE(ConfigChecks)\r
+
index ec3985e3f8b6d0fd19eb4391e91703b5baebf5d5..aac3fc00b6ae3a33f83239a0c4c52ae997b9f635 100644 (file)
@@ -13,7 +13,7 @@ SET(CMAKE_SKIP_RPATH:BOOL OFF)
 # Include base dir, so other files can refer to the generated files.
 # CMAKE_INCLUDE_CURRENT_DIR is not enough as it only includes the current dir and not the basedir with config.h in it
 INCLUDE_DIRECTORIES ("${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}" src/)  \r
-LINK_DIRECTORIES ("${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}" src/)\r
+LINK_DIRECTORIES ("${LINK_DIRECTORIES}" "${CMAKE_BINARY_DIR}" "${PROJECT_SOURCE_DIR}" src/)\r
 
 #INSTALL(TARGETS INKSCAPE\r
 #  RUNTIME DESTINATION bin\r
index f33e152ef02c44522af87402683646268a1a3f95..c0cf6f361567156957b31073be195e650f7be96e 100644 (file)
@@ -7,7 +7,9 @@
 # To find boost on Windows, use DEVLIBS_PATH variable set by mingwenv.bat
 
 FIND_PATH(BOOST_INCLUDE_DIR boost/weak_ptr.hpp 
-                            /usr/include 
+                            /usr/include/boost 
+                            /usr/include
+                            /usr/local/include/boost
                             /usr/local/include
                             $ENV{DEVLIBS_PATH}//include )