diff options
37 files changed, 1419 insertions, 527 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ec13d3324..c9dd3f126 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,6 @@ +include(CMakeScripts/HelperMacros.cmake) # Misc Utility Macros + project(inkscape) set(INKSCAPE_VERSION 0.48+devel) @@ -7,24 +9,12 @@ cmake_minimum_required(VERSION 2.4.6) set(CMAKE_INCLUDE_CURRENT_DIR TRUE) if(COMMAND cmake_policy) - CMAKE_POLICY(SET CMP0003 NEW) + cmake_policy(SET CMP0003 NEW) + cmake_policy(SET CMP0005 NEW) # propper define quoting endif() list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeScripts") -# main source list -set_property(GLOBAL PROPERTY inkscape_global_SRC "") -macro (add_inkscape_source - sources) - - foreach(_SRC ${ARGV}) - get_filename_component(_ABS_SRC ${_SRC} ABSOLUTE) - set_property(GLOBAL APPEND PROPERTY inkscape_global_SRC ${_ABS_SRC}) - endforeach() - unset(_SRC) - unset(_ABS_SRC) -endmacro() - # XXX, TODO: use pkgconfig, This part is WIP to get building # - campbell @@ -34,56 +24,39 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -fPIC -funsigned-char -fno-strict- include_directories( - /usr/include/freetype2 - /usr/include/gnome-vfs-2.0 - /usr/lib/gnome-vfs-2.0/include - /usr/include/gconf/2 - /usr/include/orbit-2.0 - /usr/include/glib-2.0 - /usr/lib/glib-2.0/include - /usr/include/ImageMagick - /usr/include/poppler - /usr/include/poppler/glib - /usr/include/poppler - /usr/include/glib-2.0 - /usr/lib/glib-2.0/include + /usr/include/atk-1.0 + /usr/include/atkmm-1.6 /usr/include/cairo - /usr/include/gtk-2.0 - /usr/lib/gtk-2.0/include + /usr/include/cairomm-1.0 + /usr/include/gconf/2 /usr/include/gdk-pixbuf-2.0 - /usr/include/pixman-1 - /usr/include/freetype2 - /usr/include/libpng14 - /usr/include/pango-1.0 + /usr/include/gdkmm-2.4 + /usr/include/giomm-2.4 /usr/include/glib-2.0 - /usr/lib/glib-2.0/include + /usr/include/glibmm-2.4 + /usr/include/gnome-vfs-2.0 /usr/include/gtk-2.0 - /usr/lib/gtk-2.0/include - /usr/include/atk-1.0 - /usr/include/cairo - /usr/include/gdk-pixbuf-2.0 + /usr/include/gtk-unix-print-2.0 + /usr/include/gtkmm-2.4 + /usr/include/gtkspell-2.0 + /usr/include/ImageMagick + /usr/include/orbit-2.0 /usr/include/pango-1.0 + /usr/include/pangomm-1.4 /usr/include/pixman-1 - /usr/include/freetype2 - /usr/include/libpng14 - /usr/include/libxml2 + /usr/include/poppler + /usr/include/poppler/glib /usr/include/sigc++-2.0 - /usr/lib/sigc++-2.0/include - /usr/include/gtkspell-2.0 - /usr/include/glibmm-2.4 - /usr/lib/glibmm-2.4/include - /usr/include/giomm-2.4 - /usr/lib/giomm-2.4/include - /usr/include/gdkmm-2.4 - /usr/lib/gdkmm-2.4/include - /usr/include/pangomm-1.4 - /usr/lib/pangomm-1.4/include - /usr/include/cairomm-1.0 /usr/lib/cairomm-1.0/include - /usr/include/gtkmm-2.4 + /usr/lib/gdkmm-2.4/include + /usr/lib/giomm-2.4/include + /usr/lib/glib-2.0/include + /usr/lib/glibmm-2.4/include + /usr/lib/gnome-vfs-2.0/include + /usr/lib/gtk-2.0/include /usr/lib/gtkmm-2.4/include - /usr/include/atkmm-1.6 - /usr/include/gtk-unix-print-2.0 + /usr/lib/pangomm-1.4/include + /usr/lib/sigc++-2.0/include ) add_definitions(-D_FORTIFY_SOURCE=2) @@ -92,14 +65,10 @@ add_definitions(-DORBIT2=1) add_definitions(-DHAVE_CONFIG_H) add_definitions(-DHAVE_CAIRO_PDF=1) # needed for src/libnrtype/Layout-TNG.h add_definitions(-DHAVE_TR1_UNORDERED_SET) # XXX make an option! -add_definitions(-DVERSION="\\"0.48+devel\\"") # XXX make an option! # XXX - end hackish defines! - - -include(ConfigPaths) #Installation Paths -include(DefineDependsandFlags) #Includes, Compiler Flags, and Link Libraries -include(HelperMacros) #Misc Utility Macros +include(ConfigPaths) # Installation Paths +include(DefineDependsandFlags) # Includes, Compiler Flags, and Link Libraries option(ENABLE_PROFILING "Turn on profiling" OFF) # Set to true if compiler/linker should enable profiling @@ -118,10 +87,5 @@ configure_file( add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") -set(folders - src -) -foreach(dirlist ${folders}) - add_subdirectory(${dirlist}) -endforeach() +add_subdirectory(src) diff --git a/CMakeScripts/ConfigChecks.cmake b/CMakeScripts/ConfigChecks.cmake index d20868767..a1c93b374 100644 --- a/CMakeScripts/ConfigChecks.cmake +++ b/CMakeScripts/ConfigChecks.cmake @@ -2,9 +2,9 @@ # From here on:
# Set all HAVE_XXX variables, to correctly set all defines in config.h
#SET(CMAKE_REQUIRED_INCLUDES ${INK_INCLUDES})
-INCLUDE (CheckIncludeFiles)
-INCLUDE (CheckFunctionExists)
-INCLUDE (CheckStructMember)
+include(CheckIncludeFiles)
+include(CheckFunctionExists)
+include(CheckStructMember)
# usage: CHECK_INCLUDE_FILES (<header> <RESULT_VARIABLE> )
# usage: CHECK_FUNCTION_EXISTS (<function name> <RESULT_VARIABLE> )
# usage: CHECK_STRUCT_MEMBER (<struct> <member> <header> <RESULT_VARIABLE>)
@@ -59,13 +59,12 @@ CHECK_INCLUDE_FILES(zlib.h HAVE_ZLIB_H) #Enable pango defines, necessary for compilation on Win32, how about Linux?
# yes but needs to be done a better way
-IF (HAVE_CAIRO_PDF)
- SET(PANGO_ENABLE_ENGINE TRUE)
- SET(RENDER_WITH_PANGO_CAIRO TRUE)
-ENDIF(HAVE_CAIRO_PDF)
+if(HAVE_CAIRO_PDF)
+ set(PANGO_ENABLE_ENGINE TRUE)
+ set(RENDER_WITH_PANGO_CAIRO TRUE)
+endif()
# Create the two configuration files: config.h and inkscape_version.h
# Create them in the binary root dir
-CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
-FILE(WRITE ${CMAKE_BINARY_DIR}/inkscape_version.h "#define INKSCAPE_VERSION \"${INKSCAPE_VERSION}\"\n")
+configure_file(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
add_definitions(-DHAVE_CONFIG_H)
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index 89f33114d..00753e980 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -1,60 +1,97 @@ +# ---------------------------------------------------------------------------- +# Files we include +# ---------------------------------------------------------------------------- + # Include dependencies: find_package(GTK2 COMPONENTS gtk gtkmm 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(Freetype2 REQUIRED) # our own find_package(GnomeVFS2) -find_package(Boost REQUIRED) + find_package(BoehmGC REQUIRED) +add_definitions(${BOEHMGC_DEFINITIONS}) + find_package(LibWPG) -find_package(PNG REQUIRED) +find_package(PNG REQUIRED) + find_package(Popt REQUIRED) +add_definitions(${POPT_DEFINITIONS}) + +# ---------------------------------------------------------------------------- +# CMake's builtin +# ---------------------------------------------------------------------------- + +find_package(Boost REQUIRED) + +find_package(ASPELL) +add_definitions(${ASPELL_DEFINITIONS}) + find_package(OpenSSL) -INCLUDE(IncludeJava) + +find_package(LibXslt REQUIRED) +add_definitions(${LIBXSLT_DEFINITIONS}) + +find_package(LibXml2 REQUIRED) +add_definitions(${LIBXML2_DEFINITIONS}) + +find_package(OpenMP REQUIRED) # cmake's +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") +if(APPLE AND ${CMAKE_GENERATOR} MATCHES "Xcode") + set(CMAKE_XCODE_ATTRIBUTE_ENABLE_OPENMP_SUPPORT "YES") +endif() +mark_as_advanced(OpenMP_C_FLAGS) +mark_as_advanced(OpenMP_CXX_FLAGS) + +include(IncludeJava) # end Dependencies -#Linking -LIST(APPEND INKSCAPE_LIBS -# ${GTK2_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} + +# Linking +list(APPEND INKSCAPE_LIBS + # ${GTK2_LIBRARIES} + # ${SIGC++_LIBRARIES} + # ${GSL_LIBRARIES} + ${LIBXML2_LIBRARIES} + ${LIBXSLT_LIBRARIES} + # ${IMAGEMAGICK++_LIBRARIES} + ${FREETYPE2_LIBRARIES} + # ${GNOMEVFS2_LIBRARIES} + ${Boost_LIBRARIES} + ${BOEHMGC_LIBRARIES} + ${PNG_LIBRARIES} + ${POPT_LIBRARIES} + ${OPENSSL_LIBRARIES} + ${ASPELL_LIBRARIES} ) -#Includes -SET(INK_INCLUDES -${CMAKE_BINARY_DIR} -${PROJECT_SOURCE_DIR} -${PROJECT_SOURCE_DIR}/src -${GTK2_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} + +# Includes +set(INK_INCLUDES + ${CMAKE_BINARY_DIR} + ${PROJECT_SOURCE_DIR} + ${PROJECT_SOURCE_DIR}/src + ${GTK2_INCLUDE_DIRS} + ${SIGC++_INCLUDE_DIRS} + ${GSL_INCLUDE_DIRS} + ${LIBXML2_INCLUDE_DIR} + ${LIBXSLT_INCLUDE_DIR} + ${IMAGEMAGICK++_INCLUDE_DIRS} + ${FREETYPE2_INCLUDE_DIRS} + ${GNOMEVFS2_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} + ${BOEHMGC_INCLUDE_DIRS} + ${PNG_INCLUDE_DIR} + ${POPT_INCLUDE_DIRS} + ${OPENSSL_INCLUDE_DIR} + ${ASPELL_INCLUDE_DIR} ) -#C/C++ Flags -INCLUDE_DIRECTORIES(${INK_INCLUDES}) -INCLUDE(ConfigChecks) +# C/C++ Flags +include_directories(${INK_INCLUDES}) + +include(ConfigChecks) diff --git a/CMakeScripts/FindSSL.cmake b/CMakeScripts/FindSSL.cmake deleted file mode 100644 index 7a2671699..000000000 --- a/CMakeScripts/FindSSL.cmake +++ /dev/null @@ -1,89 +0,0 @@ -# - Try to find SSL -# Once done this will define -# -# SSL_FOUND - system has SSL -# SSL_INCLUDE_DIRS - the SSL include directory -# SSL_LIBRARIES - Link these to use SSL -# SSL_DEFINITIONS - Compiler switches required for using SSL -# -# 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 (SSL_LIBRARIES AND SSL_INCLUDE_DIRS) - # in cache already - set(SSL_FOUND TRUE) -else (SSL_LIBRARIES AND SSL_INCLUDE_DIRS) - # 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(libssl _SSL_INCLUDEDIR _SSL_LIBDIR _SSL_LDFLAGS _SSL_CFLAGS) - else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(_SSL libssl) - endif (PKG_CONFIG_FOUND) - endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - find_path(SSL_INCLUDE_DIR - NAMES - ssl.h - PATHS - ${_SSL_INCLUDEDIR} - /usr/include - /usr/local/include - /opt/local/include - /sw/include - PATH_SUFFIXES - openssl - ) - - find_library(SSL_LIBRARY - NAMES - ssl - PATHS - ${_SSL_LIBDIR} - /usr/lib - /usr/local/lib - /opt/local/lib - /sw/lib - ) - - if (SSL_LIBRARY) - set(SSL_FOUND TRUE) - endif (SSL_LIBRARY) - - set(SSL_INCLUDE_DIRS - ${SSL_INCLUDE_DIR} - ) - - if (SSL_FOUND) - set(SSL_LIBRARIES - ${SSL_LIBRARIES} - ${SSL_LIBRARY} - ) - endif (SSL_FOUND) - - if (SSL_INCLUDE_DIRS AND SSL_LIBRARIES) - set(SSL_FOUND TRUE) - endif (SSL_INCLUDE_DIRS AND SSL_LIBRARIES) - - if (SSL_FOUND) - if (NOT SSL_FIND_QUIETLY) - message(STATUS "Found SSL: ${SSL_LIBRARIES}") - endif (NOT SSL_FIND_QUIETLY) - else (SSL_FOUND) - if (SSL_FIND_REQUIRED) - message(FATAL_ERROR "Could not find SSL") - endif (SSL_FIND_REQUIRED) - endif (SSL_FOUND) - - # show the SSL_INCLUDE_DIRS and SSL_LIBRARIES variables only in the advanced view - mark_as_advanced(SSL_INCLUDE_DIRS SSL_LIBRARIES) - -endif (SSL_LIBRARIES AND SSL_INCLUDE_DIRS) - diff --git a/CMakeScripts/FindXML2.cmake b/CMakeScripts/FindXML2.cmake deleted file mode 100644 index 1e2b0d3af..000000000 --- a/CMakeScripts/FindXML2.cmake +++ /dev/null @@ -1,90 +0,0 @@ -# - Try to find XML2 -# Once done this will define -# -# XML2_FOUND - system has XML2 -# XML2_INCLUDE_DIRS - the XML2 include directory -# XML2_LIBRARIES - Link these to use XML2 -# XML2_DEFINITIONS - Compiler switches required for using XML2 -# -# 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 (XML2_LIBRARIES AND XML2_INCLUDE_DIRS) - # in cache already - set(XML2_FOUND TRUE) -else (XML2_LIBRARIES AND XML2_INCLUDE_DIRS) - # 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(libxml-2.0 _XML2_INCLUDEDIR _XML2_LIBDIR _XML2_LDFLAGS _XML2_CFLAGS) - else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(_XML2 libxml-2.0) - endif (PKG_CONFIG_FOUND) - endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - find_path(XML2_INCLUDE_DIR - NAMES - libxml/xmlunicode.h - PATHS - ${_XML2_INCLUDEDIR} - /usr/include - /usr/local/include - /opt/local/include - /sw/include - $ENV{DEVLIBS_PATH}//include// - PATH_SUFFIXES - libxml2 - ) - - find_library(XML2_LIBRARY - NAMES - xml2 - PATHS - ${_XML2_LIBDIR} - /usr/lib - /usr/local/lib - /opt/local/lib - /sw/lib - ) - - if (XML2_LIBRARY) - set(XML2_FOUND TRUE) - endif (XML2_LIBRARY) - - set(XML2_INCLUDE_DIRS - ${XML2_INCLUDE_DIR} - ) - - if (XML2_FOUND) - set(XML2_LIBRARIES - ${XML2_LIBRARIES} - ${XML2_LIBRARY} - ) - endif (XML2_FOUND) - - if (XML2_INCLUDE_DIRS AND XML2_LIBRARIES) - set(XML2_FOUND TRUE) - endif (XML2_INCLUDE_DIRS AND XML2_LIBRARIES) - - if (XML2_FOUND) - if (NOT XML2_FIND_QUIETLY) - message(STATUS "Found XML2: ${XML2_LIBRARIES}") - endif (NOT XML2_FIND_QUIETLY) - else (XML2_FOUND) - if (XML2_FIND_REQUIRED) - message(FATAL_ERROR "Could not find XML2") - endif (XML2_FIND_REQUIRED) - endif (XML2_FOUND) - - # show the XML2_INCLUDE_DIRS and XML2_LIBRARIES variables only in the advanced view - mark_as_advanced(XML2_INCLUDE_DIRS XML2_LIBRARIES) - -endif (XML2_LIBRARIES AND XML2_INCLUDE_DIRS) - diff --git a/CMakeScripts/FindXSLT.cmake b/CMakeScripts/FindXSLT.cmake deleted file mode 100644 index bda46e640..000000000 --- a/CMakeScripts/FindXSLT.cmake +++ /dev/null @@ -1,90 +0,0 @@ -# - Try to find XSLT -# Once done this will define -# -# XSLT_FOUND - system has XSLT -# XSLT_INCLUDE_DIRS - the XSLT include directory -# XSLT_LIBRARIES - Link these to use XSLT -# XSLT_DEFINITIONS - Compiler switches required for using XSLT -# -# 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 (XSLT_LIBRARIES AND XSLT_INCLUDE_DIRS) - # in cache already - set(XSLT_FOUND TRUE) -else (XSLT_LIBRARIES AND XSLT_INCLUDE_DIRS) - # 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(libxslt _XSLT_INCLUDEDIR _XSLT_LIBDIR _XSLT_LDFLAGS _XSLT_CFLAGS) - else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(_XSLT libxslt) - endif (PKG_CONFIG_FOUND) - endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - find_path(XSLT_INCLUDE_DIR - NAMES - xslt.h - PATHS - ${_XSLT_INCLUDEDIR} - /usr/include - /usr/local/include - /opt/local/include - /sw/include - $ENV{DEVLIBS_PATH}//include// - PATH_SUFFIXES - libxslt - ) - - find_library(XSLT_LIBRARY - NAMES - xslt - PATHS - ${_XSLT_LIBDIR} - /usr/lib - /usr/local/lib - /opt/local/lib - /sw/lib - ) - - if (XSLT_LIBRARY) - set(XSLT_FOUND TRUE) - endif (XSLT_LIBRARY) - - set(XSLT_INCLUDE_DIRS - ${XSLT_INCLUDE_DIR} - ) - - if (XSLT_FOUND) - set(XSLT_LIBRARIES - ${XSLT_LIBRARIES} - ${XSLT_LIBRARY} - ) - endif (XSLT_FOUND) - - if (XSLT_INCLUDE_DIRS AND XSLT_LIBRARIES) - set(XSLT_FOUND TRUE) - endif (XSLT_INCLUDE_DIRS AND XSLT_LIBRARIES) - - if (XSLT_FOUND) - if (NOT XSLT_FIND_QUIETLY) - message(STATUS "Found XSLT: ${XSLT_LIBRARIES}") - endif (NOT XSLT_FIND_QUIETLY) - else (XSLT_FOUND) - if (XSLT_FIND_REQUIRED) - message(FATAL_ERROR "Could not find XSLT") - endif (XSLT_FIND_REQUIRED) - endif (XSLT_FOUND) - - # show the XSLT_INCLUDE_DIRS and XSLT_LIBRARIES variables only in the advanced view - mark_as_advanced(XSLT_INCLUDE_DIRS XSLT_LIBRARIES) - -endif (XSLT_LIBRARIES AND XSLT_INCLUDE_DIRS) - diff --git a/CMakeScripts/HelperMacros.cmake b/CMakeScripts/HelperMacros.cmake index dd8c25f00..592e962c7 100644 --- a/CMakeScripts/HelperMacros.cmake +++ b/CMakeScripts/HelperMacros.cmake @@ -1,13 +1,65 @@ # A macro to replace slashes and spaces in a string with underscores
-MACRO(SANITIZE_PATH _string_var)
- STRING(REGEX REPLACE "[\\/ ]+" "_" ${_string_var} ${${_string_var}})
-ENDMACRO(SANITIZE_PATH _string_var)
-
-# A macro to prepend a given string onto the beginning of each string in a list
-MACRO(PREPEND _list _str)
- SET(_temp_list ${${_list}})
- SET(${_list})
- FOREACH(x ${_temp_list})
- SET(${_list} ${${_list}} ${_str}${x})
- ENDFOREACH(x)
-ENDMACRO(PREPEND _list _str) +macro(SANITIZE_PATH _string_var)
+ string(REGEX REPLACE "[\\/ ]+" "_" ${_string_var} ${${_string_var}})
+endmacro()
+
+
+macro(inkscape_source_group
+ sources)
+
+ # Group by location on disk
+ source_group("Source Files" FILES CMakeLists.txt)
+
+ foreach(_SRC ${sources})
+ get_filename_component(_SRC_EXT ${_SRC} EXT)
+ if(${_SRC_EXT} MATCHES ".h" OR ${_SRC_EXT} MATCHES ".hpp")
+ source_group("Header Files" FILES ${_SRC})
+ else()
+ source_group("Source Files" FILES ${_SRC})
+ endif()
+ endforeach()
+
+ unset(_SRC)
+ unset(_SRC_EXT)
+endmacro()
+
+
+# only MSVC uses SOURCE_GROUP
+macro(add_inkscape_lib
+ name
+ sources)
+
+ add_library(${name} ${sources})
+
+ # works fine without having the includes
+ # listed is helpful for IDE's (QtCreator/MSVC)
+ inkscape_source_group("${sources}")
+
+endmacro()
+
+
+# A macro to append to the global source property
+set_property(GLOBAL PROPERTY inkscape_global_SRC "")
+
+macro (add_inkscape_source
+ sources)
+
+ foreach(_SRC ${ARGV})
+ get_filename_component(_ABS_SRC ${_SRC} ABSOLUTE)
+ set_property(GLOBAL APPEND PROPERTY inkscape_global_SRC ${_ABS_SRC})
+ endforeach()
+ unset(_SRC)
+ unset(_ABS_SRC)
+endmacro()
+
+# A macro to append to the global source property
+macro (add_inkscape_library
+ sources)
+
+ foreach(_SRC ${ARGV})
+ get_filename_component(_ABS_SRC ${_SRC} ABSOLUTE)
+ set_property(GLOBAL APPEND PROPERTY inkscape_global_SRC ${_ABS_SRC})
+ endforeach()
+ unset(_SRC)
+ unset(_ABS_SRC)
+endmacro()
diff --git a/config.h.cmake b/config.h.cmake index d9d1bde03..f4532ea22 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -232,6 +232,9 @@ /* Define to the version of this package. */ #define PACKAGE_VERSION "${INKSCAPE_VERSION}" +/* Define the version as a string. */ +#define VERSION "${INKSCAPE_VERSION}" + /* Define as the return type of signal handlers (`int' or `void'). */ #cmakedefine RETSIGTYPE diff --git a/cxxtest/CMakeLists.txt b/cxxtest/CMakeLists.txt index d049fccbb..95cfc8c51 100644 --- a/cxxtest/CMakeLists.txt +++ b/cxxtest/CMakeLists.txt @@ -4,12 +4,7 @@ set(cxxtest_SRC ) # Add New folders in src folder here -set(cxxtestfolders - cxxtest - docs - sample -) -foreach(cxxtestdirlist ${cxxtestfolders}) - add_subdirectory(${cxxtestdirlist}) -endforeach() +add_subdirectory(cxxtest) +add_subdirectory(docs) +add_subdirectory(sample) diff --git a/src/2geom/CMakeLists.txt b/src/2geom/CMakeLists.txt index 6c6001c4b..c04718e79 100644 --- a/src/2geom/CMakeLists.txt +++ b/src/2geom/CMakeLists.txt @@ -122,4 +122,4 @@ set(2geom_SRC ) # make lib for 2geom_LIB -add_library(2geom_LIB ${2geom_SRC}) +add_inkscape_lib(2geom_LIB "${2geom_SRC}") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 72644b416..718c92b4b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,12 @@ +# -----------------------------------------------------------------------------
+# Define the main source
+# -----------------------------------------------------------------------------
+
+set(main_SRC
+ main.cpp
+)
+
set(sp_SRC
sp-anchor.cpp
# sp-animation.cpp
@@ -67,6 +75,91 @@ set(sp_SRC sp-use.cpp
spiral-context.cpp
splivarot.cpp
+
+ sp-anchor.h
+ sp-animation.h
+ sp-clippath.h
+ sp-conn-end-pair.h
+ sp-conn-end.h
+ sp-cursor.h
+ sp-defs.h
+ sp-desc.h
+ sp-ellipse.h
+ sp-filter-fns.h
+ sp-filter-primitive.h
+ sp-filter-reference.h
+ sp-filter-units.h
+ sp-filter.h
+ sp-flowdiv.h
+ sp-flowregion.h
+ sp-flowtext.h
+ sp-font-face.h
+ sp-font.h
+ sp-gaussian-blur-fns.h
+ sp-gaussian-blur.h
+ sp-glyph-kerning.h
+ sp-glyph.h
+ sp-gradient-fns.h
+ sp-gradient-reference.h
+ sp-gradient-spread.h
+ sp-gradient-test.h
+ sp-gradient-units.h
+ sp-gradient-vector.h
+ sp-gradient.h
+ sp-guide-attachment.h
+ sp-guide-constraint.h
+ sp-guide.h
+ sp-image.h
+ sp-item-group.h
+ sp-item-notify-moveto.h
+ sp-item-rm-unsatisfied-cns.h
+ sp-item-transform.h
+ sp-item-update-cns.h
+ sp-item.h
+ sp-line.h
+ sp-linear-gradient-fns.h
+ sp-linear-gradient.h
+ sp-lpe-item.h
+ sp-marker-loc.h
+ sp-mask.h
+ sp-metadata.h
+ sp-metric.h
+ sp-metrics.h
+ sp-missing-glyph.h
+ sp-namedview.h
+ sp-object-group.h
+ sp-object-repr.h
+ sp-object.h
+ sp-offset.h
+ sp-paint-server-reference.h
+ sp-paint-server.h
+ sp-path.h
+ sp-pattern.h
+ sp-polygon.h
+ sp-polyline.h
+ sp-radial-gradient-fns.h
+ sp-radial-gradient.h
+ sp-rect.h
+ sp-root.h
+ sp-script.h
+ sp-shape.h
+ # sp-skeleton.h
+ sp-spiral.h
+ sp-star.h
+ sp-stop.h
+ sp-string.h
+ sp-style-elem-test.h
+ sp-style-elem.h
+ sp-switch.h
+ sp-symbol.h
+ sp-text.h
+ sp-textpath.h
+ sp-title.h
+ sp-tref-reference.h
+ sp-tref.h
+ sp-tspan.h
+ sp-use-reference.h
+ sp-use.h
)
set(inkscape_SRC
@@ -199,6 +292,194 @@ set(inkscape_SRC verbs.cpp
version.cpp
zoom-context.cpp
+
+
+ # -------
+ # Headers
+ MultiPrinter.h
+ PylogFormatter.h
+ TRPIFormatter.h
+ approx-equal.h
+ arc-context.h
+ attributes-test.h
+ attributes.h
+ axis-manip.h
+ bad-uri-exception.h
+ box3d-context.h
+ box3d-side.h
+ box3d.h
+ color-profile-fns.h
+ color-profile-test.h
+ color-profile.h
+ color-rgba.h
+ color.h
+ common-context.h
+ composite-undo-stack-observer.h
+ conditions.h
+ conn-avoid-ref.h
+ connection-points.h
+ connection-pool.h
+ connector-context.h
+ console-output-undo-observer.h
+ context-fns.h
+ decimal-round.h
+ desktop-events.h
+ desktop-handles.h
+ desktop-style.h
+ desktop.h
+ device-manager.h
+ dir-util-test.h
+ dir-util.h
+ document-private.h
+ document-subset.h
+ document-undo.h
+ document.h
+ draw-anchor.h
+ draw-context.h
+ dropper-context.h
+ dyna-draw-context.h
+ ege-adjustment-action.h
+ ege-color-prof-tracker.h
+ ege-output-action.h
+ ege-select-one-action.h
+ enums.h
+ eraser-context.h
+ event-context.h
+ event-log.h
+ event.h
+ extract-uri-test.h
+ extract-uri.h
+ file.h
+ fill-or-stroke.h
+ filter-chemistry.h
+ filter-enums.h
+ flood-context.h
+ forward.h
+ gc-alloc.h
+ gc-allocator.h
+ gc-anchored.h
+ gc-core.h
+ gc-finalized.h
+ gc-managed.h
+ gc-soft-ptr.h
+ gradient-chemistry.h
+ gradient-context.h
+ gradient-drag.h
+ graphlayout.h
+ guide-snapper.h
+ help.h
+ helper-fns.h
+ icon-size.h
+ id-clash.h
+ ige-mac-menu.h
+ ink-action.h
+ ink-comboboxentry-action.h
+ inkscape-private.h
+ inkscape-version.h
+ inkscape.h
+ interface.h
+ isinf.h
+ isnormal.h
+ knot-enums.h
+ knot-holder-entity.h
+ knot.h
+ knotholder.h
+ layer-fns.h
+ layer-manager.h
+ line-geometry.h
+ line-snapper.h
+ lpe-tool-context.h
+ macros.h
+ main-cmdlineact.h
+ marker-test.h
+ marker.h
+ measure-context.h
+ media.h
+ memeq.h
+ menus-skeleton.h
+ message-context.h
+ message-stack.h
+ message.h
+ mod360-test.h
+ mod360.h
+ modifier-fns.h
+ number-opt-number.h
+ object-edit.h
+ object-hierarchy.h
+ object-snapper.h
+ path-chemistry.h
+ path-prefix.h
+ pen-context.h
+ pencil-context.h
+ persp3d-reference.h
+ persp3d.h
+ perspective-line.h
+ preferences-skeleton.h
+ preferences-test.h
+ preferences.h
+ prefix.h
+ print.h
+ profile-manager.h
+ proj_pt.h
+ rdf.h
+ rect-context.h
+ registrytool.h
+ remove-last.h
+ removeoverlap.h
+ require-config.h
+ resource-manager.h
+ round-test.h
+ round.h
+ rubberband.h
+ satisfied-guide-cns.h
+ selcue.h
+ select-context.h
+ selection-chemistry.h
+ selection-describer.h
+ selection.h
+ seltrans-handles.h
+ seltrans.h
+ shape-editor.h
+ shortcuts.h
+ snap-candidate.h
+ snap-enums.h
+ snap-preferences.h
+ snap.h
+ snapped-curve.h
+ snapped-line.h
+ snapped-point.h
+ snapper.h
+ spiral-context.h
+ splivarot.h
+ spray-context.h
+ star-context.h
+ streq.h
+ strneq.h
+ style-test.h
+ style.h
+ svg-profile.h
+ svg-view-widget.h
+ svg-view.h
+ syseq.h
+ test-helpers.h
+ text-chemistry.h
+ text-context.h
+ text-editing.h
+ text-tag-attributes.h
+ tools-switch.h
+ transf_mat_3x4.h
+ tweak-context.h
+ unclump.h
+ undo-stack-observer.h
+ unicoderange.h
+ unit-constants.h
+ uri-references.h
+ uri.h
+ vanishing-point.h
+ verbs-test.h
+ verbs.h
+ version.h
+ zoom-context.h
)
if(WIN32)
@@ -209,49 +490,44 @@ if(WIN32) )
endif()
+
+# -----------------------------------------------------------------------------
+# Load in subdirectories
+# -----------------------------------------------------------------------------
+
# All folders for internal inkscape
-set(internalfolders
- bind
- debug
- dialogs
- display
- dom
- extension
- filters
- helper
- io
- # jabber_whiteboard
- live_effects
- # pedro
- svg
- trace
- ui
- util
- widgets
- xml
- 2geom
-)
+# these call add_inkscape_source
+add_subdirectory(bind)
+add_subdirectory(debug)
+add_subdirectory(dialogs)
+add_subdirectory(display)
+add_subdirectory(dom)
+add_subdirectory(extension)
+add_subdirectory(filters)
+add_subdirectory(helper)
+add_subdirectory(io)
+# add_subdirectory(jabber_whiteboard)
+add_subdirectory(live_effects)
+# add_subdirectory(pedro)
+add_subdirectory(svg)
+add_subdirectory(trace)
+add_subdirectory(ui)
+add_subdirectory(util)
+add_subdirectory(widgets)
+add_subdirectory(xml)
+add_subdirectory(2geom)
-set(libfolders
- # Directories containing lists files that describe building internal libraries
- libavoid
- libcola
- libcroco
- libgdl
- libvpsc
- livarot
- libnr
- libnrtype
-)
-set(dirs
- ${internalfolders}
- ${libfolders}
-)
+# Directories containing lists files that describe building internal libraries
+add_subdirectory(libavoid)
+add_subdirectory(libcola)
+add_subdirectory(libcroco)
+add_subdirectory(libgdl)
+add_subdirectory(libvpsc)
+add_subdirectory(livarot)
+add_subdirectory(libnr)
+add_subdirectory(libnrtype)
-foreach(srclistsrc ${dirs})
- add_subdirectory(${srclistsrc})
-endforeach()
get_property(inkscape_global_SRC GLOBAL PROPERTY inkscape_global_SRC)
@@ -260,11 +536,15 @@ set(inkscape_SRC ${inkscape_SRC}
)
-add_library(sp_LIB ${sp_SRC})
-add_library(inkscape_LIB ${inkscape_SRC})
+
+# -----------------------------------------------------------------------------
+# Setup the executable
+# -----------------------------------------------------------------------------
+add_inkscape_lib(sp_LIB "${sp_SRC}")
+add_inkscape_lib(inkscape_LIB "${inkscape_SRC}")
# make executable for INKSCAPE
-add_executable(inkscape main.cpp)
+add_executable(inkscape ${main_SRC})
target_link_libraries(inkscape
# order from automake
@@ -285,56 +565,16 @@ target_link_libraries(inkscape 2geom_LIB
${INKSCAPE_LIBS}
-
-
+
# system libs
- -lxslt
- -lgtkspell
- -lgsl
- -lgslcblas
+ -lgsl # needed
+ -lgslcblas # needed
-lgtkmm-2.4
- -latkmm-1.6
-lgdkmm-2.4
- -lgiomm-2.4
-lpangomm-1.4
- -lgtk-x11-2.0
- -lglibmm-2.4
- -lcairomm-1.0
-lsigc-2.0
- -latk-1.0
- -lgio-2.0
- -lpng
- -lX11
- -lxml2
- -ldl
- -lgomp
- -lpopt
- -laspell
- -lgnomevfs-2
- -lgconf-2
- -lpangoft2-1.0
- -lfontconfig
- -lfreetype
- -lz
-lMagick++
-lMagickCore
- -lgc
- -llcms
- -lpoppler-glib
- -lgdk-x11-2.0
- -lpoppler
- -lpangocairo-1.0
- -lgdk_pixbuf-2.0
- -lpng14
- -lm
- -lpango-1.0
- -lcairo
- -lgmodule-2.0
- -lgobject-2.0
- -lgthread-2.0
- -lrt
- -lglib-2.0
-
)
# TODO
diff --git a/src/bind/CMakeLists.txt b/src/bind/CMakeLists.txt index 8a98e20a3..9b6abad4f 100644 --- a/src/bind/CMakeLists.txt +++ b/src/bind/CMakeLists.txt @@ -2,7 +2,17 @@ set(bind_SRC dobinding.cpp javabind.cpp + + + # ------- + # Headers + javabind-private.h + javabind.h + javainc/jni.h + javainc/linux/jni_md.h + javainc/solaris/jni_md.h + javainc/win32/jni_md.h ) -# add_library(bind_LIB ${bind_SRC}) +# add_inkscape_lib(bind_LIB "${bind_SRC}") add_inkscape_source("${bind_SRC}") diff --git a/src/debug/CMakeLists.txt b/src/debug/CMakeLists.txt index 9039d52bb..5c0354fce 100644 --- a/src/debug/CMakeLists.txt +++ b/src/debug/CMakeLists.txt @@ -7,7 +7,22 @@ set(debug_SRC sysv-heap.cpp timestamp.cpp gdk-event-latency-tracker.cpp + + + # ------ + # Header + demangle.h + event-tracker.h + event.h + gc-heap.h + gdk-event-latency-tracker.h + heap.h + log-display-config.h + logger.h + simple-event.h + sysv-heap.h + timestamp.h ) -# add_library(debug_LIB ${debug_SRC}) +# add_inkscape_lib(debug_LIB "${debug_SRC}") add_inkscape_source("${debug_SRC}") diff --git a/src/dialogs/CMakeLists.txt b/src/dialogs/CMakeLists.txt index f2d05a02b..6586b78af 100644 --- a/src/dialogs/CMakeLists.txt +++ b/src/dialogs/CMakeLists.txt @@ -9,7 +9,20 @@ set(dialogs_SRC spellcheck.cpp text-edit.cpp xml-tree.cpp + + + # ------- + # Headers + clonetiler.h + dialog-events.h + export.h + find.h + item-properties.h + object-attributes.h + spellcheck.h + text-edit.h + xml-tree.h ) -# add_library(dialogs_LIB ${dialogs_SRC}) +# add_inkscape_lib(dialogs_LIB "${dialogs_SRC}") add_inkscape_source("${dialogs_SRC}") diff --git a/src/display/CMakeLists.txt b/src/display/CMakeLists.txt index 056067ea4..30643550f 100644 --- a/src/display/CMakeLists.txt +++ b/src/display/CMakeLists.txt @@ -57,7 +57,74 @@ set(display_SRC sp-ctrlline.cpp sp-ctrlpoint.cpp sp-ctrlquadr.cpp + + + # ------- + # Headers + canvas-arena.h + canvas-axonomgrid.h + canvas-bpath.h + canvas-grid.h + canvas-temporary-item-list.h + canvas-temporary-item.h + canvas-text.h + curve-test.h + curve.h + gnome-canvas-acetate.h + grayscale.h + guideline.h + inkscape-cairo.h + nr-3dutils.h + nr-arena-forward.h + nr-arena-glyphs.h + nr-arena-group.h + nr-arena-image.h + nr-arena-item.h + nr-arena-shape.h + nr-arena.h + nr-filter-blend.h + nr-filter-colormatrix.h + nr-filter-component-transfer.h + nr-filter-composite.h + nr-filter-convolve-matrix.h + nr-filter-diffuselighting.h + nr-filter-displacement-map.h + nr-filter-flood.h + nr-filter-gaussian.h + nr-filter-getalpha.h + nr-filter-image.h + nr-filter-merge.h + nr-filter-morphology.h + nr-filter-offset.h + nr-filter-pixops.h + nr-filter-primitive.h + nr-filter-skeleton.h + nr-filter-slot.h + nr-filter-specularlighting.h + nr-filter-tile.h + nr-filter-turbulence.h + nr-filter-types.h + nr-filter-units.h + nr-filter-utils.h + nr-filter.h + nr-light-types.h + nr-light.h + nr-plain-stuff-gdk.h + nr-plain-stuff.h + pixblock-scaler.h + pixblock-transform.h + rendermode.h + snap-indicator.h + sodipodi-ctrl.h + sodipodi-ctrlrect.h + sp-canvas-group.h + sp-canvas-item.h + sp-canvas-util.h + sp-canvas.h + sp-ctrlline.h + sp-ctrlpoint.h + sp-ctrlquadr.h ) -# add_library(display_LIB ${display_SRC}) +# add_inkscape_lib(display_LIB "${display_SRC}") add_inkscape_source("${display_SRC}") diff --git a/src/dom/CMakeLists.txt b/src/dom/CMakeLists.txt index 5a3ebebf8..dbaa1a763 100644 --- a/src/dom/CMakeLists.txt +++ b/src/dom/CMakeLists.txt @@ -47,6 +47,53 @@ set(dom_SRC # work/testzip.cpp # work/xpathtests.cpp + + + # ------- + # Headers + css.h + cssreader.h + dom.h + domimpl.h + domptr.h + domstring.h + events.h + ls.h + lsimpl.h + smil.h + smilimpl.h + stylesheets.h + svg.h + svg2.h + svgimpl.h + svgreader.h + svgtypes.h + traversal.h + ucd.h + uri.h + views-level3.h + views.h + xmlreader.h + xmlwriter.h + xpath.h + xpathimpl.h + xpathparser.h + xpathtoken.h + + odf/odfdocument.h + + io/base64stream.h + io/bufferstream.h + io/domstream.h + io/gzipstream.h + io/httpclient.h + io/socket.h + io/stringstream.h + io/uristream.h + + util/digest.h + util/thread.h + util/ziptool.h ) -add_library(dom_LIB ${dom_SRC}) +add_inkscape_lib(dom_LIB "${dom_SRC}") diff --git a/src/extension/CMakeLists.txt b/src/extension/CMakeLists.txt index b2550361f..8a58ae2be 100644 --- a/src/extension/CMakeLists.txt +++ b/src/extension/CMakeLists.txt @@ -107,6 +107,111 @@ set(extension_SRC # dxf2svg/dxf2svg.cpp # dxf2svg/read_dxf.cpp # dxf2svg/test_dxf.cpp + + + # ------ + # Header + db.h + dependency.h + effect.h + error-file.h + execution-env.h + extension-forward.h + extension.h + init.h + input.h + output.h + param/bool.h + param/color.h + param/description.h + param/enum.h + param/float.h + param/int.h + param/notebook.h + param/parameter.h + param/radiobutton.h + param/string.h + patheffect.h + prefdialog.h + print.h + system.h + timer.h + + implementation/implementation.h + implementation/script.h + implementation/xslt.h + + internal/bitmap/adaptiveThreshold.h + internal/bitmap/addNoise.h + internal/bitmap/blur.h + internal/bitmap/channel.h + internal/bitmap/charcoal.h + internal/bitmap/colorize.h + internal/bitmap/contrast.h + internal/bitmap/cycleColormap.h + internal/bitmap/despeckle.h + internal/bitmap/edge.h + internal/bitmap/emboss.h + internal/bitmap/enhance.h + internal/bitmap/equalize.h + internal/bitmap/gaussianBlur.h + internal/bitmap/imagemagick.h + internal/bitmap/implode.h + internal/bitmap/level.h + internal/bitmap/levelChannel.h + internal/bitmap/medianFilter.h + internal/bitmap/modulate.h + internal/bitmap/negate.h + internal/bitmap/normalize.h + internal/bitmap/oilPaint.h + internal/bitmap/opacity.h + internal/bitmap/raise.h + internal/bitmap/reduceNoise.h + internal/bitmap/sample.h + internal/bitmap/shade.h + internal/bitmap/sharpen.h + internal/bitmap/solarize.h + internal/bitmap/spread.h + internal/bitmap/swirl.h + internal/bitmap/threshold.h + internal/bitmap/unsharpmask.h + internal/bitmap/wave.h + internal/bluredge.h + internal/cairo-png-out.h + internal/cairo-ps-out.h + internal/cairo-render-context.h + internal/cairo-renderer-pdf-out.h + internal/cairo-renderer.h + internal/clear-n_.h + internal/emf-win32-inout.h + internal/emf-win32-print.h + internal/filter/abc.h + internal/filter/color.h + internal/filter/drop-shadow.h + internal/filter/experimental.h + internal/filter/filter.h + internal/filter/morphology.h + internal/filter/shadows.h + internal/filter/snow.h + internal/gdkpixbuf-input.h + internal/gimpgrad.h + internal/grid.h + internal/javafx-out.h + internal/latex-pstricks-out.h + internal/latex-pstricks.h + internal/latex-text-renderer.h + internal/odf.h + internal/pdf-input-cairo.h + internal/pdfinput/pdf-input.h + internal/pdfinput/pdf-parser.h + internal/pdfinput/svg-builder.h + internal/pov-out.h + internal/svg.h + internal/svgz.h + internal/win32.h + internal/wpg-input.h + + script/InkscapeScript.h ) if(WIN32) @@ -115,5 +220,5 @@ if(WIN32) ) endif() -# add_library(extension_LIB ${extension_SRC}) +# add_inkscape_lib(extension_LIB "${extension_SRC}") add_inkscape_source("${extension_SRC}") diff --git a/src/filters/CMakeLists.txt b/src/filters/CMakeLists.txt index 8016553c8..72e0bba78 100644 --- a/src/filters/CMakeLists.txt +++ b/src/filters/CMakeLists.txt @@ -20,7 +20,45 @@ set(filters_SRC spotlight.cpp tile.cpp turbulence.cpp + + # ------- + # Headers + blend-fns.h + blend.h + colormatrix-fns.h + colormatrix.h + componenttransfer-fns.h + componenttransfer-funcnode.h + componenttransfer.h + composite-fns.h + composite.h + convolvematrix-fns.h + convolvematrix.h + diffuselighting-fns.h + diffuselighting.h + displacementmap-fns.h + displacementmap.h + distantlight.h + flood-fns.h + flood.h + image-fns.h + image.h + merge-fns.h + merge.h + mergenode.h + morphology-fns.h + morphology.h + offset-fns.h + offset.h + pointlight.h + specularlighting-fns.h + specularlighting.h + spotlight.h + tile-fns.h + tile.h + turbulence-fns.h + turbulence.h ) -#add_library(filters_LIB ${filters_SRC}) +# add_inkscape_lib(filters_LIB "${filters_SRC}"") add_inkscape_source("${filters_SRC}") diff --git a/src/helper/CMakeLists.txt b/src/helper/CMakeLists.txt index b4786ff54..f1069e986 100644 --- a/src/helper/CMakeLists.txt +++ b/src/helper/CMakeLists.txt @@ -21,11 +21,31 @@ set(helper_SRC #units-test.cpp unit-tracker.cpp window.cpp - sp-marshal.cpp - sp-marshal.list + # we generate this file and it's .h counter-part ${sp_marshal_SRC} + + + # ------- + # Headers + action.h + geom-curves.h + geom-nodetype.h + geom.h + gnome-utils.h + helper-forward.h + pixbuf-ops.h + png-write.h + recthull.h + sp-marshal.h + stlport.h + stock-items.h + unit-menu.h + unit-tracker.h + units-test.h + units.h + window.h ) -# add_library(helper_LIB ${helper_SRC}) +# add_inkscape_lib(helper_LIB "${helper_SRC}") add_inkscape_source("${helper_SRC}") diff --git a/src/io/CMakeLists.txt b/src/io/CMakeLists.txt index e9bff2bc2..c5606779e 100644 --- a/src/io/CMakeLists.txt +++ b/src/io/CMakeLists.txt @@ -11,7 +11,22 @@ set(io_SRC sys.cpp uristream.cpp xsltstream.cpp + + + # ------- + # Headers + base64stream.h + ftos.h + gzipstream.h + inkjar.h + inkscapestream.h + resource.h + simple-sax.h + stringstream.h + sys.h + uristream.h + xsltstream.h ) -# add_library(io_LIB ${io_SRC}) +# add_inkscape_lib(io_LIB "${io_SRC}") add_inkscape_source("${io_SRC}") diff --git a/src/jabber_whiteboard/CMakeLists.txt b/src/jabber_whiteboard/CMakeLists.txt index 62de25d70..b91bdf141 100644 --- a/src/jabber_whiteboard/CMakeLists.txt +++ b/src/jabber_whiteboard/CMakeLists.txt @@ -17,7 +17,28 @@ set(jabber_whiteboard_SRC session-manager.cpp dialog/choose-desktop.cpp + + + # ------- + # Headers + defines.h + dialog/choose-desktop.h + inkboard-document.h + invitation-confirm-dialog.h + keynode.h + message-aggregator.h + message-node.h + message-queue.h + message-tags.h + message-utilities.h + message-verifier.h + node-tracker.h + node-utilities.h + pedrogui.h + session-file-selector.h + session-manager.h + tracker-node.h ) -# add_library(jabber_whiteboard_LIB ${jabber_whiteboard_SRC}) +# add_inkscape_lib(jabber_whiteboard_LIB "${jabber_whiteboard_SRC}") add_inkscape_source("${jabber_whiteboard_SRC}") diff --git a/src/libavoid/CMakeLists.txt b/src/libavoid/CMakeLists.txt index 04b7375b1..de067833b 100644 --- a/src/libavoid/CMakeLists.txt +++ b/src/libavoid/CMakeLists.txt @@ -13,6 +13,25 @@ set(libavoid_SRC viscluster.cpp visibility.cpp vpsc.cpp + + # ------- + # Headers + assertions.h + connector.h + debug.h + geometry.h + geomtypes.h + graph.h + libavoid.h + makepath.h + orthogonal.h + router.h + shape.h + timer.h + vertices.h + viscluster.h + visibility.h + vpsc.h ) -add_library(avoid_LIB ${libavoid_SRC}) +add_inkscape_lib(avoid_LIB "${libavoid_SRC}") diff --git a/src/libcola/CMakeLists.txt b/src/libcola/CMakeLists.txt index 032bffb54..c89ffc692 100644 --- a/src/libcola/CMakeLists.txt +++ b/src/libcola/CMakeLists.txt @@ -7,6 +7,17 @@ set(libcola_SRC gradient_projection.cpp shortest_paths.cpp straightener.cpp + + + # ------- + # Headers + cola.h + conjugate_gradient.h + # cycle_detector.h + defs.h + gradient_projection.h + shortest_paths.h + straightener.h ) -add_library(cola_LIB ${libcola_SRC}) +add_inkscape_lib(cola_LIB "${libcola_SRC}") diff --git a/src/libcroco/CMakeLists.txt b/src/libcroco/CMakeLists.txt index c4676c504..890f58825 100644 --- a/src/libcroco/CMakeLists.txt +++ b/src/libcroco/CMakeLists.txt @@ -27,6 +27,36 @@ set(libcroco_SRC cr-tknzr.c cr-token.c cr-utils.c + + cr-additional-sel.h + cr-attr-sel.h + cr-cascade.h + cr-declaration.h + cr-doc-handler.h + cr-enc-handler.h + cr-fonts.h + cr-input.h + cr-libxml-node-iface.h + cr-node-iface.h + cr-num.h + cr-om-parser.h + cr-parser.h + cr-parsing-location.h + cr-prop-list.h + cr-pseudo.h + cr-rgb.h + cr-sel-eng.h + cr-selector.h + cr-simple-sel.h + cr-statement.h + cr-string.h + cr-style.h + cr-stylesheet.h + cr-term.h + cr-tknzr.h + cr-token.h + cr-utils.h + libcroco.h ) -add_library(croco_LIB ${libcroco_SRC}) +add_inkscape_lib(croco_LIB "${libcroco_SRC}") diff --git a/src/libgdl/CMakeLists.txt b/src/libgdl/CMakeLists.txt index cf550107a..befb6edb7 100644 --- a/src/libgdl/CMakeLists.txt +++ b/src/libgdl/CMakeLists.txt @@ -16,12 +16,34 @@ set(libgdl_SRC gdl-tools.h libgdlmarshal.c libgdltypebuiltins.c + + + # ------- + # Headers + gdl-dock-bar.h + gdl-dock-item-grip.h + gdl-dock-item.h + gdl-dock-master.h + gdl-dock-notebook.h + gdl-dock-object.h + gdl-dock-paned.h + gdl-dock-placeholder.h + gdl-dock-tablabel.h + gdl-dock.h + gdl-i18n.h + gdl-stock-icons.h + gdl-stock.h + gdl-switcher.h + libgdl.h + libgdlmarshal.h + libgdltypebuiltins.h ) if(WIN32) list(APPEND libgdl_SRC gdl-win32.c + gdl-win32.h ) endif() -add_library(gdl_LIB ${libgdl_SRC}) +add_inkscape_lib(gdl_LIB "${libgdl_SRC}") diff --git a/src/libnr/CMakeLists.txt b/src/libnr/CMakeLists.txt index 0d3202636..994c5d348 100644 --- a/src/libnr/CMakeLists.txt +++ b/src/libnr/CMakeLists.txt @@ -1,6 +1,6 @@ set(nr_SRC - #in-svg-plane-test.cpp + # in-svg-plane-test.cpp nr-blit.cpp nr-compose.cpp nr-compose-transform.cpp @@ -15,11 +15,11 @@ set(nr_SRC nr-pixblock-pattern.cpp nr-pixblock-pixel.cpp nr-point-fns.cpp - #nr-point-fns-test.cpp + # nr-point-fns-test.cpp nr-rect.cpp nr-rect-l.cpp nr-rotate-fns.cpp - #nr-rotate-fns-test.cpp + # nr-rotate-fns-test.cpp nr-rotate-matrix-ops.cpp nr-scale-matrix-ops.cpp nr-scale-translate-ops.cpp @@ -28,9 +28,74 @@ set(nr_SRC nr-translate-scale-ops.cpp #nr-translate-test.cpp nr-types.cpp - #nr-types-test.cpp + # nr-types-test.cpp nr-values.cpp - #testnr.cpp + # testnr.cpp + + # ------- + # Headers + # in-svg-plane-test.h + in-svg-plane.h + nr-blit.h + nr-compose-reference.h + nr-compose-test.h + nr-compose-transform.h + nr-compose.h + nr-convert2geom.h + nr-convex-hull-ops.h + nr-convex-hull.h + nr-coord.h + nr-dim2.h + nr-forward.h + nr-gradient.h + nr-i-coord.h + nr-macros.h + nr-matrix-div.h + nr-matrix-fns.h + nr-matrix-ops.h + nr-matrix-rotate-ops.h + nr-matrix-scale-ops.h + nr-matrix-test.h + nr-matrix-translate-ops.h + nr-matrix.h + nr-maybe.h + nr-object.h + nr-path-code.h + nr-pixblock-line.h + nr-pixblock-pattern.h + nr-pixblock-pixel.h + nr-pixblock.h + nr-pixops.h + # nr-point-fns-test.h + nr-point-fns.h + nr-point-l.h + nr-point-matrix-ops.h + nr-point-ops.h + nr-point.h + nr-rect-l.h + nr-rect-ops.h + nr-rect.h + nr-render.h + nr-rotate-fns-test.h + nr-rotate-fns.h + nr-rotate-matrix-ops.h + nr-rotate-ops.h + nr-rotate-test.h + nr-rotate.h + nr-scale-matrix-ops.h + nr-scale-ops.h + nr-scale-test.h + nr-scale-translate-ops.h + nr-scale.h + nr-translate-matrix-ops.h + nr-translate-ops.h + nr-translate-rotate-ops.h + nr-translate-scale-ops.h + # nr-translate-test.h + nr-translate.h + # nr-types-test.h + nr-types.h + nr-values.h ) -add_library(nr_LIB ${nr_SRC}) +add_inkscape_lib(nr_LIB "${nr_SRC}") diff --git a/src/libnrtype/CMakeLists.txt b/src/libnrtype/CMakeLists.txt index d5f9b846f..835665761 100644 --- a/src/libnrtype/CMakeLists.txt +++ b/src/libnrtype/CMakeLists.txt @@ -14,6 +14,27 @@ set(nrtype_SRC nr-type-primitives.cpp RasterFont.cpp TextWrapper.cpp + + FontFactory.h + Layout-TNG-Scanline-Maker.h + Layout-TNG.h + RasterFont.h + TextWrapper.h + boundary-type.h + font-glyph.h + font-instance.h + font-lister.h + font-style-to-pos.h + font-style.h + nr-type-pos-def.h + nr-type-primitives.h + nrtype-forward.h + one-box.h + one-glyph.h + one-para.h + raster-glyph.h + raster-position.h + text-boundary.h ) -add_library(nrtype_LIB ${nrtype_SRC}) +add_inkscape_lib(nrtype_LIB "${nrtype_SRC}") diff --git a/src/libvpsc/CMakeLists.txt b/src/libvpsc/CMakeLists.txt index ebc1e79d6..8db059b5d 100644 --- a/src/libvpsc/CMakeLists.txt +++ b/src/libvpsc/CMakeLists.txt @@ -9,6 +9,21 @@ set(libvpsc_SRC solve_VPSC.cpp
variable.cpp
pairingheap/PairingHeap.cpp
+
+
+ # -------
+ # Headers
+ block.h
+ blocks.h
+ constraint.h
+ csolve_VPSC.h
+ generate-constraints.h
+ pairingheap/PairingHeap.h
+ pairingheap/dsexceptions.h
+ placement_SolveVPSC.h
+ remove_rectangle_overlap.h
+ solve_VPSC.h
+ variable.h
)
-add_library(vpsc_LIB ${libvpsc_SRC})
+add_inkscape_lib(vpsc_LIB "${libvpsc_SRC}")
diff --git a/src/livarot/CMakeLists.txt b/src/livarot/CMakeLists.txt index 51bb9530e..1890bd1a7 100644 --- a/src/livarot/CMakeLists.txt +++ b/src/livarot/CMakeLists.txt @@ -20,6 +20,22 @@ set(livarot_SRC sweep-event.cpp sweep-tree.cpp sweep-tree-list.cpp + + AVL.h + AlphaLigne.h + BitLigne.h + Livarot.h + LivarotDefs.h + Path.h + Shape.h + float-line.h + int-line.h + livarot-forward.h + path-description.h + sweep-event-queue.h + sweep-event.h + sweep-tree-list.h + sweep-tree.h ) -add_library(livarot_LIB ${livarot_SRC}) +add_inkscape_lib(livarot_LIB "${livarot_SRC}") diff --git a/src/live_effects/CMakeLists.txt b/src/live_effects/CMakeLists.txt index 148ea92f7..3bca16715 100644 --- a/src/live_effects/CMakeLists.txt +++ b/src/live_effects/CMakeLists.txt @@ -52,7 +52,64 @@ set(live_effects_SRC parameter/text.cpp parameter/unit.cpp parameter/vector.cpp + + # ------- + # Headers + bezctx.h + bezctx_intf.h + effect-enum.h + effect.h + lpe-angle_bisector.h + lpe-bendpath.h + lpe-boolops.h + lpe-circle_3pts.h + lpe-circle_with_radius.h + lpe-constructgrid.h + lpe-copy_rotate.h + lpe-curvestitch.h + lpe-dynastroke.h + lpe-envelope.h + lpe-extrude.h + lpe-gears.h + lpe-interpolate.h + lpe-knot.h + lpe-lattice.h + lpe-line_segment.h + lpe-mirror_symmetry.h + lpe-offset.h + lpe-parallel.h + lpe-path_length.h + lpe-patternalongpath.h + lpe-perp_bisector.h + lpe-perspective_path.h + lpe-powerstroke.h + lpe-recursiveskeleton.h + lpe-rough-hatches.h + lpe-ruler.h + lpe-skeleton.h + lpe-sketch.h + lpe-spiro.h + lpe-tangent_to_curve.h + lpe-test-doEffect-stack.h + lpe-text_label.h + lpe-vonkoch.h + lpegroupbbox.h + lpeobject-reference.h + lpeobject.h + parameter/array.h + parameter/bool.h + parameter/enum.h + parameter/parameter.h + parameter/path-reference.h + parameter/path.h + parameter/point.h + parameter/powerstrokepointarray.h + parameter/random.h + parameter/text.h + parameter/unit.h + parameter/vector.h + spiro.h ) -# add_library(live_effects_LIB ${live_effects_SRC}) +# add_inkscape_lib(live_effects_LIB "${live_effects_SRC}") add_inkscape_source("${live_effects_SRC}") diff --git a/src/pedro/CMakeLists.txt b/src/pedro/CMakeLists.txt index 7dce5b755..c51090067 100644 --- a/src/pedro/CMakeLists.txt +++ b/src/pedro/CMakeLists.txt @@ -10,5 +10,5 @@ set(pedro_SRC pedroxmpp.cpp ) -# add_library(pedro_LIB ${pedro_SRC}) +# add_inkscape_lib(pedro_LIB "${pedro_SRC}") add_inkscape_source("${pedro_SRC}") diff --git a/src/svg/CMakeLists.txt b/src/svg/CMakeLists.txt index 8c1f0058e..9a721969a 100644 --- a/src/svg/CMakeLists.txt +++ b/src/svg/CMakeLists.txt @@ -12,8 +12,25 @@ set(svg_SRC svg-color.cpp svg-length.cpp svg-path.cpp - #test-stubs.cpp + # test-stubs.cpp + + css-ostringstream-test.h + css-ostringstream.h + path-string.h + stringstream-test.h + stringstream.h + strip-trailing-zeros.h + svg-affine-test.h + svg-color-test.h + svg-color.h + svg-icc-color.h + svg-length-test.h + svg-length.h + svg-path-geom-test.h + svg.h + # test-stubs.h + ) -# add_library(svg_LIB ${svg_SRC}) +# add_inkscape_lib(svg_LIB "${svg_SRC}") add_inkscape_source("${svg_SRC}") diff --git a/src/trace/CMakeLists.txt b/src/trace/CMakeLists.txt index 3f712a314..958907df6 100644 --- a/src/trace/CMakeLists.txt +++ b/src/trace/CMakeLists.txt @@ -14,7 +14,30 @@ set(trace_SRC potrace/potracelib.cpp potrace/render.cpp potrace/trace.cpp + + + # ------- + # Headers + filterset.h + imagemap-gdk.h + imagemap.h + pool.h + quantize.h + siox.h + trace.h + + potrace/auxiliary.h + potrace/bitmap.h + potrace/curve.h + potrace/decompose.h + potrace/greymap.h + potrace/inkscape-potrace.h + potrace/lists.h + potrace/potracelib.h + potrace/progress.h + potrace/render.h + potrace/trace.h ) -# add_library(trace_LIB ${trace_SRC}) +# add_inkscape_lib(trace_LIB "${trace_SRC}") add_inkscape_source("${trace_SRC}") diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index bf9ddb4c8..30b72437f 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -109,6 +109,132 @@ set(ui_SRC view/view.cpp view/view-widget.cpp + + + # ------- + # Headers + clipboard.h + context-menu.h + icon-names.h + previewable.h + previewfillable.h + previewholder.h + uxmanager.h + + cache/svg_preview_cache.h + + dialog/aboutbox.h + dialog/align-and-distribute.h + dialog/behavior.h + dialog/calligraphic-profile-rename.h + dialog/color-item.h + dialog/debug.h + dialog/desktop-tracker.h + dialog/dialog-manager.h + dialog/dialog.h + dialog/dock-behavior.h + dialog/document-metadata.h + dialog/document-properties.h + dialog/extension-editor.h + dialog/extensions.h + dialog/filedialog.h + dialog/filedialogimpl-gtkmm.h + dialog/filedialogimpl-win32.h + dialog/fill-and-stroke.h + dialog/filter-effects-dialog.h + dialog/find.h + dialog/floating-behavior.h + dialog/glyphs.h + dialog/guides.h + dialog/icon-preview.h + dialog/inkscape-preferences.h + dialog/input.h + dialog/layer-properties.h + dialog/layers.h + dialog/livepatheffect-editor.h + dialog/memory.h + dialog/messages.h + dialog/ocaldialogs.h + dialog/panel-dialog.h + dialog/print-colors-preview-dialog.h + dialog/print.h + dialog/scriptdialog.h + dialog/session-player.h + dialog/svg-fonts-dialog.h + dialog/swatches.h + dialog/tile.h + dialog/tracedialog.h + dialog/transformation.h + dialog/undo-history.h + dialog/whiteboard-connect.h + dialog/whiteboard-sharewithchat.h + dialog/whiteboard-sharewithuser.h + + tool/commit-events.h + tool/control-point-selection.h + tool/control-point.h + tool/curve-drag-point.h + tool/event-utils.h + tool/manipulator.h + tool/modifier-tracker.h + tool/multi-path-manipulator.h + tool/node-tool.h + tool/node-types.h + tool/node.h + tool/path-manipulator.h + tool/selectable-control-point.h + tool/selector.h + tool/shape-record.h + tool/transform-handle-set.h + + view/edit-widget-interface.h + view/view-widget.h + view/view.h + + widget/attr-widget.h + widget/button.h + widget/color-picker.h + widget/color-preview.h + widget/combo-enums.h + widget/combo-text.h + widget/dock-item.h + widget/dock.h + widget/entity-entry.h + widget/entry.h + widget/filter-effect-chooser.h + widget/handlebox.h + widget/icon-widget.h + widget/imageicon.h + widget/imagetoggler.h + widget/labelled.h + widget/layer-selector.h + widget/licensor.h + widget/notebook-page.h + widget/object-composite-settings.h + widget/page-sizer.h + widget/panel.h + widget/point.h + widget/preferences-widget.h + widget/random.h + widget/registered-enums.h + widget/registered-widget.h + widget/registry.h + widget/rendering-options.h + widget/rotateable.h + widget/ruler.h + widget/scalar-unit.h + widget/scalar.h + widget/selected-style.h + widget/spin-slider.h + widget/spinbutton.h + widget/style-subject.h + widget/style-swatch.h + widget/svg-canvas.h + widget/text.h + widget/tolerance-slider.h + widget/toolbox.h + widget/unit-menu.h + widget/zoom-status.h ) if(WIN32) @@ -117,5 +243,5 @@ if(WIN32) ) endif() -# add_library(ui_LIB ${ui_SRC}) +# add_inkscape_lib(ui_LIB "${ui_SRC}") add_inkscape_source("${ui_SRC}") diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index ca90272ae..5c8411437 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -5,7 +5,37 @@ set(util_SRC expression-evaluator.cpp share.cpp units.cpp + + accumulators.h + compose.hpp + copy.h + ege-appear-time-tracker.h + ege-tags.h + enums.h + expression-evaluator.h + filter-list.h + find-if-before.h + find-last-if.h + fixed_point.h + format.h + forward-pointer-iterator.h + function.h + glib-list-iterators.h + list-container-test.h + list-container.h + list-copy.h + list.h + longest-common-suffix.h + map-list.h + mathfns.h + reference.h + reverse-list.h + share.h + tuple.h + ucompose.hpp + units.h + unordered-containers.h ) -# add_library(util_LIB ${util_SRC}) +# add_inkscape_lib(util_LIB "${util_SRC}") add_inkscape_source("${util_SRC}") diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt index 09d2d6303..d9e05f06a 100644 --- a/src/widgets/CMakeLists.txt +++ b/src/widgets/CMakeLists.txt @@ -34,7 +34,44 @@ set(widgets_SRC stroke-style.cpp swatch-selector.cpp toolbox.cpp + + button.h + dash-selector.h + desktop-widget.h + eek-preview.h + ege-paint-def.h + fill-n-stroke-factory.h + fill-style.h + font-selector.h + gradient-image.h + gradient-selector.h + gradient-toolbar.h + gradient-vector.h + icon.h + paint-selector.h + ruler.h + select-toolbar.h + shrink-wrap-button.h + sp-attribute-widget.h + sp-color-gtkselector.h + sp-color-icc-selector.h + sp-color-notebook.h + sp-color-preview.h + sp-color-scales.h + sp-color-selector.h + sp-color-slider.h + sp-color-wheel-selector.h + sp-widget.h + sp-xmlview-attr-list.h + sp-xmlview-content.h + sp-xmlview-tree.h + spinbutton-events.h + spw-utilities.h + stroke-style.h + swatch-selector.h + toolbox.h + widget-sizes.h ) -# add_library(widgets_LIB ${widgets_SRC}) +# add_inkscape_lib(widgets_LIB "${widgets_SRC}") add_inkscape_source("${widgets_SRC}") diff --git a/src/xml/CMakeLists.txt b/src/xml/CMakeLists.txt index 3cca53fd8..d7a0e197d 100644 --- a/src/xml/CMakeLists.txt +++ b/src/xml/CMakeLists.txt @@ -16,7 +16,38 @@ set(xml_SRC subtree.cpp helper-observer.cpp rebase-hrefs.cpp + + attribute-record.h + comment-node.h + composite-node-observer.h + croco-node-iface.h + document.h + element-node.h + event-fns.h + event.h + helper-observer.h + invalid-operation-exception.h + log-builder.h + node-event-vector.h + node-fns.h + node-iterators.h + node-observer.h + node.h + pi-node.h + quote-test.h + quote.h + rebase-hrefs-test.h + rebase-hrefs.h + repr-action-test.h + repr-sorting.h + repr.h + simple-document.h + simple-node.h + sp-css-attr.h + subtree.h + text-node.h + xml-forward.h ) -# add_library(xml_LIB ${xml_SRC}) +# add_inkscape_lib(xml_LIB "${xml_SRC}") add_inkscape_source("${xml_SRC}") |
