From 16b2c93dcfca8c6ee6cd61f4065a9a387fcde3bd Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Wed, 13 Apr 2016 13:58:08 +0200 Subject: Fix CMake caching issue with GtkSpell (bzr r14823) --- CMakeScripts/DefineDependsandFlags.cmake | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'CMakeScripts') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index d8088bf9a..4429758c0 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -247,9 +247,12 @@ if("${WITH_GTK3_EXPERIMENTAL}") pkg_check_modules(GTKSPELL3 gtkspell3-3.0) if("${GTKSPELL3_FOUND}") - message("Using GtkSpell3 3.0") + message("Using GtkSpell3") set (WITH_GTKSPELL 1) + else() + unset(WITH_GTKSPELL) endif() + list(APPEND INKSCAPE_INCS_SYS ${GTK3_INCLUDE_DIRS} ${GTKSPELL3_INCLUDE_DIRS} @@ -268,19 +271,21 @@ else() ) list(APPEND INKSCAPE_CXX_FLAGS ${GTK_CFLAGS_OTHER}) pkg_check_modules(GTKSPELL2 gtkspell-2.0) - if("${GTKSPELL3_FOUND}") - message("Using GtkSpell3 3.0") - add_definitions(${GTK_CFLAGS_OTHER}) + if("${GTKSPELL2_FOUND}") + message("Using GtkSpell 2") + add_definitions(${GTKSPELL2_CFLAGS_OTHER}) set (WITH_GTKSPELL 1) + else() + unset(WITH_GTKSPELL) endif() list(APPEND INKSCAPE_INCS_SYS ${GTK_INCLUDE_DIRS} - ${GTKSPELL_INCLUDE_DIRS} + ${GTKSPELL2_INCLUDE_DIRS} ) list(APPEND INKSCAPE_LIBS ${GTK_LIBRARIES} - ${GTKSPELL_LIBRARIES} + ${GTKSPELL2_LIBRARIES} ) endif() @@ -300,17 +305,6 @@ if(ASPELL_FOUND) set(HAVE_ASPELL TRUE) endif() -if("${TRY_GTKSPELL}" AND "${WITH_GTKSPELL}") - find_package(GtkSpell) - if(GTKSPELL_FOUND) - list(APPEND INKSCAPE_INCS_SYS ${GTKSPELL_INCLUDE_DIR}) - list(APPEND INKSCAPE_LIBS ${GTKSPELL_LIBRARIES}) - add_definitions(${GTKSPELL_DEFINITIONS}) - else() - set(WITH_GTKSPELL OFF) - endif() -endif() - #find_package(OpenSSL) #list(APPEND INKSCAPE_INCS_SYS ${OPENSSL_INCLUDE_DIR}) #list(APPEND INKSCAPE_LIBS ${OPENSSL_LIBRARIES}) -- cgit v1.2.3 From 2b635a500e8844e5788d8178d13887c2b5ace640 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Thu, 14 Apr 2016 16:58:56 +0200 Subject: Fix c++11 flag when required on non-debian-based systems (bzr r14844) --- CMakeScripts/DefineDependsandFlags.cmake | 3 +++ CMakeScripts/Modules/FindSigC++.cmake | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'CMakeScripts') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index 4429758c0..00c2131e2 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -368,6 +368,9 @@ if(WITH_NLS) endif(GETTEXT_FOUND) endif(WITH_NLS) +#sets c++11 for newer sigc++ if required when pkg-config does not detect it +find_package(SigC++ REQUIRED) + pkg_check_modules(SIGC++ REQUIRED sigc++-2.0 ) list(APPEND INKSCAPE_LIBS ${SIGC++_LDFLAGS}) diff --git a/CMakeScripts/Modules/FindSigC++.cmake b/CMakeScripts/Modules/FindSigC++.cmake index 8046410b5..14cbf47f7 100644 --- a/CMakeScripts/Modules/FindSigC++.cmake +++ b/CMakeScripts/Modules/FindSigC++.cmake @@ -106,10 +106,12 @@ endif (SIGC++_LIBRARIES AND SIGC++_INCLUDE_DIRS) # https://bugs.launchpad.net/inkscape/+bug/1488079 macro (sigcpp_compile extra_cppflags) + set(sigcpp_compile_output "") try_compile(SIGCPP_COMPILES_FINE "${CMAKE_BINARY_DIR}/sigcpp-bindir" SOURCES "${CMAKE_SOURCE_DIR}/CMakeScripts/Modules/sigcpp_test.cpp" COMPILE_DEFINITIONS ${_SIGC++_CFLAGS} ${extra_cppflags} - LINK_LIBRARIES ${SIGC++_LIBRARIES}) + LINK_LIBRARIES ${SIGC++_LIBRARIES} + OUTPUT_VARIABLE sigcpp_compile_output) endmacro() @@ -120,7 +122,7 @@ if (NOT "${SIGCPP_COMPILES_FINE}") if ("${SIGCPP_COMPILES_FINE}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${cppflag}") else() - message(FATAL_ERROR "Could not compile against SIGC++") + message(FATAL_ERROR "Could not compile against SIGC++ - output is <<${sigcpp_compile_output}>>") endif() endif() -- cgit v1.2.3 From 8047a376e9e79ab45bb6eb97c5d234c5a5247175 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sat, 16 Apr 2016 15:31:28 +0100 Subject: CMake: Disable broken pseudo-option for GTKSPELL - determined automatically by pkg-config, and fix a couple of typos (bzr r14852) --- CMakeScripts/DefineDependsandFlags.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeScripts') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index 00c2131e2..204f96c02 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -239,7 +239,7 @@ if("${WITH_GTK3_EXPERIMENTAL}") pkg_check_modules(GDL_3_6 gdl-3.0>=3.6) if("${GDL_3_6_FOUND}") - message("Using Gdl 3.6 or higher") + message("Using GDL 3.6 or higher") set (WITH_GDL_3_6 1) endif() @@ -247,7 +247,7 @@ if("${WITH_GTK3_EXPERIMENTAL}") pkg_check_modules(GTKSPELL3 gtkspell3-3.0) if("${GTKSPELL3_FOUND}") - message("Using GtkSpell3") + message("Using GtkSpell 3") set (WITH_GTKSPELL 1) else() unset(WITH_GTKSPELL) -- cgit v1.2.3 From eeed7483385d14192bb11ef501bc729c286da7c5 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 16 Apr 2016 16:39:29 +0200 Subject: CMake build: builds with WITH_DBUS (bzr r14853) --- CMakeScripts/ConfigChecks.cmake | 3 +-- CMakeScripts/DefineDependsandFlags.cmake | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'CMakeScripts') 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() -- cgit v1.2.3