diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2016-04-16 14:39:29 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2016-04-16 14:39:29 +0000 |
| commit | eeed7483385d14192bb11ef501bc729c286da7c5 (patch) | |
| tree | f59a70eb69105145d10f6b1898bd6f32a76e987c | |
| parent | CMake: Disable broken pseudo-option for GTKSPELL - determined automatically b... (diff) | |
| download | inkscape-eeed7483385d14192bb11ef501bc729c286da7c5.tar.gz inkscape-eeed7483385d14192bb11ef501bc729c286da7c5.zip | |
CMake build: builds with WITH_DBUS
(bzr r14853)
| -rw-r--r-- | CMakeScripts/ConfigChecks.cmake | 3 | ||||
| -rw-r--r-- | CMakeScripts/DefineDependsandFlags.cmake | 10 | ||||
| -rw-r--r-- | src/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/extension/CMakeLists.txt | 15 | ||||
| -rw-r--r-- | src/extension/dbus/CMakeLists.txt | 29 |
5 files changed, 41 insertions, 20 deletions
diff --git a/CMakeScripts/ConfigChecks.cmake b/CMakeScripts/ConfigChecks.cmake index 926dc3ad3..34396ef28 100644 --- a/CMakeScripts/ConfigChecks.cmake +++ b/CMakeScripts/ConfigChecks.cmake @@ -65,7 +65,6 @@ if(HAVE_CAIRO_PDF) 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 +# Create the configuration files config.h in the binary root dir configure_file(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/include/config.h) add_definitions(-DHAVE_CONFIG_H) diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index 204f96c02..8e1cf2826 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -183,11 +183,13 @@ else(POTRACE_FOUND) endif() if(WITH_DBUS) - find_package(DBus REQUIRED) + pkg_check_modules(DBUS dbus-1 dbus-glib-1) if(DBUS_FOUND) - list(APPEND INKSCAPE_INCS_SYS ${DBUS_INCLUDE_DIR}) - list(APPEND INKSCAPE_INCS_SYS ${DBUS_ARCH_INCLUDE_DIR}) - list(APPEND INKSCAPE_LIBS ${DBUS_LIBRARIES}) + list(APPEND INKSCAPE_LIBS ${DBUS_LDFLAGS}) + list(APPEND INKSCAPE_INCS_SYS ${DBUS_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/src/extension/dbus/) + list(APPEND INKSCAPE_LIBS ${DBUS_LIBRARIES}) + add_definitions(${DBUS_CFLAGS_OTHER}) + else() set(WITH_DBUS OFF) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5c436cefb..e97ea8489 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -526,6 +526,10 @@ endif() add_dependencies(inkscape inkscape_version) +if(WITH_DBUS) + add_dependencies(inkscape inkscape_dbus) +endif() + if (NOT "${WITH_EXT_GDL}") list (APPEND INKSCAPE_LIBS "gdl_LIB") endif() diff --git a/src/extension/CMakeLists.txt b/src/extension/CMakeLists.txt index 21e652563..86a192f47 100644 --- a/src/extension/CMakeLists.txt +++ b/src/extension/CMakeLists.txt @@ -244,20 +244,7 @@ if(WITH_IMAGE_MAGICK) endif() if(WITH_DBUS) - list(APPEND extension_SRC - dbus/application-interface.cpp - dbus/dbus-init.cpp - dbus/document-interface.cpp - - # ------ - # Header - dbus/application-interface.h - dbus/dbus-init.h - dbus/document-interface.h - dbus/wrapper/inkscape-dbus-wrapper.h - ) - - include_directories(dbus) + add_subdirectory(dbus) endif() # add_inkscape_lib(extension_LIB "${extension_SRC}") diff --git a/src/extension/dbus/CMakeLists.txt b/src/extension/dbus/CMakeLists.txt new file mode 100644 index 000000000..ad9e1fd7d --- /dev/null +++ b/src/extension/dbus/CMakeLists.txt @@ -0,0 +1,29 @@ +if(WITH_DBUS) +include_directories(${CMAKE_BINARY_DIR}/src/extension/dbus) +set(dbus_SRC "") + list(APPEND dbus_SRC + application-interface.cpp + dbus-init.cpp + document-interface.cpp + ) + add_custom_target(inkscape_dbus + DEPENDS ${CMAKE_BINARY_DIR}/src/extension/dbus/application-server-glue.h ${CMAKE_BINARY_DIR}/src/extension/dbus/document-server-glue.h ${CMAKE_BINARY_DIR}/src/extension/dbus/document-client-glue.h + ) + add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/src/extension/dbus/application-server-glue.h ${CMAKE_BINARY_DIR}/src/extension/dbus/document-server-glue.h ${CMAKE_BINARY_DIR}/src/extension/dbus/document-client-glue.h + DEPENDS ${CMAKE_SOURCE_DIR}/src/extension/dbus/application-interface.xml ${CMAKE_SOURCE_DIR}/src/extension/dbus/document-interface.xml + COMMAND dbus-binding-tool --mode=glib-server --output=${CMAKE_BINARY_DIR}/src/extension/dbus/application-server-glue.h --prefix=application_interface ${CMAKE_SOURCE_DIR}/src/extension/dbus/application-interface.xml + COMMAND dbus-binding-tool --mode=glib-server --output=${CMAKE_BINARY_DIR}/src/extension/dbus/document-server-glue.h --prefix=document_interface ${CMAKE_SOURCE_DIR}/src/extension/dbus/document-interface.xml + COMMAND dbus-binding-tool --mode=glib-client --output=${CMAKE_BINARY_DIR}/src/extension/dbus/document-client-glue.h --prefix=document_interface ${CMAKE_SOURCE_DIR}/src/extension/dbus/document-interface.xml + ) + set_source_files_properties( + ${CMAKE_BINARY_DIR}/src/extension/dbus/application-server-glue.h + PROPERTIES GENERATED TRUE) + set_source_files_properties( + ${CMAKE_BINARY_DIR}/src/extension/dbus/document-server-glue.h + PROPERTIES GENERATED TRUE) + set_source_files_properties( + ${CMAKE_BINARY_DIR}/src/extension/dbus/document-client-glue.h + PROPERTIES GENERATED TRUE) +add_inkscape_source("${dbus_SRC}") +endif() |
