From e5d2b25011292d4df0297939c30357ac23fac856 Mon Sep 17 00:00:00 2001 From: su_v Date: Sun, 3 May 2015 20:57:08 +0200 Subject: cmake: use cmake modules for iconv and inlt (bzr r14098) --- CMakeScripts/DefineDependsandFlags.cmake | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'CMakeScripts/DefineDependsandFlags.cmake') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index e96609d34..71bb042bc 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -19,7 +19,6 @@ list(APPEND INKSCAPE_INCS_SYS ${GSL_INCLUDE_DIRS}) list(APPEND INKSCAPE_LIBS ${GSL_LIBRARIES}) if (WIN32) list(APPEND INKSCAPE_LIBS "-L$ENV{DEVLIBS_PATH}/lib") # FIXME - list(APPEND INKSCAPE_LIBS "-lintl.dll") # FIXME list(APPEND INKSCAPE_LIBS "-lpangocairo-1.0.dll") # FIXME list(APPEND INKSCAPE_LIBS "-lpangoft2-1.0.dll") # FIXME list(APPEND INKSCAPE_LIBS "-lpangowin32-1.0.dll") # FIXME @@ -31,23 +30,13 @@ elseif(APPLE) # Cmake then can rely on the hard-coded paths in its modules. # Only prepend search path if $CMAKE_PREFIX_PATH is defined: list(APPEND INKSCAPE_LIBS "-L$ENV{CMAKE_PREFIX_PATH}/lib") # FIXME - # TODO: verify whether linking the next two libs explicitly is always - # required, or only if MacPorts is installed in custom prefix: - list(APPEND INKSCAPE_LIBS "-liconv") # FIXME - list(APPEND INKSCAPE_LIBS "-lintl") # FIXME endif() list(APPEND INKSCAPE_LIBS "-lpangocairo-1.0") # FIXME list(APPEND INKSCAPE_LIBS "-lpangoft2-1.0") # FIXME list(APPEND INKSCAPE_LIBS "-lfontconfig") # FIXME - # GTK+ backend if(${GTK+_2.0_TARGET} MATCHES "x11") # only link X11 if using X11 backend of GTK2 list(APPEND INKSCAPE_LIBS "-lX11") # FIXME - elseif(${GTK+_2.0_TARGET} MATCHES "quartz") - # TODO: gtk-mac-integration (currently only useful for osxmenu branch) - # 1) add configure option (ON/OFF) for gtk-mac-integration - # 2) add checks (GTK+ backend must be "quartz") - # 3) link relevant lib(s) endif() else() list(APPEND INKSCAPE_LIBS "-ldl") # FIXME @@ -93,6 +82,11 @@ if(ENABLE_LCMS) endif() endif() +find_package(Iconv REQUIRED) +list(APPEND INKSCAPE_INCS_SYS ${ICONV_INCLUDE_DIRS}) +list(APPEND INKSCAPE_LIBS ${ICONV_LIBRARIES}) +add_definitions(${ICONV_DEFINITIONS}) + find_package(BoehmGC REQUIRED) list(APPEND INKSCAPE_INCS_SYS ${BOEHMGC_INCLUDE_DIRS}) list(APPEND INKSCAPE_LIBS ${BOEHMGC_LIBRARIES}) @@ -268,6 +262,11 @@ list(APPEND INKSCAPE_LIBS ) +find_package(Intl REQUIRED) +list(APPEND INKSCAPE_INCS_SYS ${Intl_INCLUDE_DIRS}) +list(APPEND INKSCAPE_LIBS ${Intl_LIBRARIES}) +add_definitions(${Intl_DEFINITIONS}) + find_package(Freetype REQUIRED) list(APPEND INKSCAPE_INCS_SYS ${FREETYPE_INCLUDE_DIRS}) list(APPEND INKSCAPE_LIBS ${FREETYPE_LIBRARIES}) -- cgit v1.2.3 From fe043be9888e82f4d199099629824d7e62da3dfa Mon Sep 17 00:00:00 2001 From: su_v Date: Sun, 3 May 2015 22:30:56 +0200 Subject: cmake: move Intl check to 'Files we include' section Because the FindIntl module was only recently added to Cmake, I added a copy to Inkscape's Modules dir in r14098 but forgot to properly reflect this in CMakeScripts/DefineDependsandFlags.cmake. (bzr r14099) --- CMakeScripts/DefineDependsandFlags.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'CMakeScripts/DefineDependsandFlags.cmake') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index 71bb042bc..f7c371bae 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -87,6 +87,11 @@ list(APPEND INKSCAPE_INCS_SYS ${ICONV_INCLUDE_DIRS}) list(APPEND INKSCAPE_LIBS ${ICONV_LIBRARIES}) add_definitions(${ICONV_DEFINITIONS}) +find_package(Intl REQUIRED) +list(APPEND INKSCAPE_INCS_SYS ${Intl_INCLUDE_DIRS}) +list(APPEND INKSCAPE_LIBS ${Intl_LIBRARIES}) +add_definitions(${Intl_DEFINITIONS}) + find_package(BoehmGC REQUIRED) list(APPEND INKSCAPE_INCS_SYS ${BOEHMGC_INCLUDE_DIRS}) list(APPEND INKSCAPE_LIBS ${BOEHMGC_LIBRARIES}) @@ -262,11 +267,6 @@ list(APPEND INKSCAPE_LIBS ) -find_package(Intl REQUIRED) -list(APPEND INKSCAPE_INCS_SYS ${Intl_INCLUDE_DIRS}) -list(APPEND INKSCAPE_LIBS ${Intl_LIBRARIES}) -add_definitions(${Intl_DEFINITIONS}) - find_package(Freetype REQUIRED) list(APPEND INKSCAPE_INCS_SYS ${FREETYPE_INCLUDE_DIRS}) list(APPEND INKSCAPE_LIBS ${FREETYPE_LIBRARIES}) -- cgit v1.2.3 From 20f22e56999d2b90ec2b7a77149748b0c9740dc1 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sun, 3 May 2015 16:05:14 -0700 Subject: Added base unit test source utilizing Google Test and corresponding CMake support. (bzr r14100) --- CMakeScripts/DefineDependsandFlags.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CMakeScripts/DefineDependsandFlags.cmake') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index f7c371bae..abad73a4d 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -213,6 +213,14 @@ if(WITH_DBUS) endif() endif() +if(WITH_GTEST) + if(EXISTS "${GMOCK_DIR}" AND IS_DIRECTORY "${GMOCK_DIR}") + + else() + set(WITH_GTEST off) + endif() +endif() + # ---------------------------------------------------------------------------- # CMake's builtin # ---------------------------------------------------------------------------- -- cgit v1.2.3 From fb173e93270726a750d8928cc3adc540deb88267 Mon Sep 17 00:00:00 2001 From: su_v Date: Mon, 4 May 2015 03:04:21 +0200 Subject: cmake: add configuration option for ImageMagick Usage of ImageMagick for raster extensions and detection of image import resolution is optional; allow compiling without it. Fix failure to correctly detect ImageMagick component include dirs and libraries on linux as reported on irc: use variables which list all include dirs and libraries instead. (bzr r14102) --- CMakeScripts/DefineDependsandFlags.cmake | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'CMakeScripts/DefineDependsandFlags.cmake') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index abad73a4d..854701145 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -330,16 +330,22 @@ find_package(ZLIB REQUIRED) list(APPEND INKSCAPE_INCS_SYS ${ZLIB_INCLUDE_DIRS}) list(APPEND INKSCAPE_LIBS ${ZLIB_LIBRARIES}) -find_package(ImageMagick COMPONENTS MagickCore Magick++) -if(ImageMagick_FOUND) - list(APPEND INKSCAPE_INCS_SYS ${ImageMagick_MagickCore_INCLUDE_DIR}) - list(APPEND INKSCAPE_LIBS ${ImageMagick_Magick++_LIBRARY}) - set(WITH_IMAGE_MAGICK ON) # enable 'Extensions > Raster' - # TODO: Cmake's ImageMagick module misses required defines for newer - # versions of ImageMagick. See also: - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776832 - #add_definitions(-DMAGICKCORE_HDRI_ENABLE=0) # FIXME (version check?) - #add_definitions(-DMAGICKCORE_QUANTUM_DEPTH=16) # FIXME (version check?) +if(WITH_IMAGE_MAGICK) + find_package(ImageMagick COMPONENTS MagickCore Magick++) + if(ImageMagick_FOUND) + # the component-specific paths apparently fail to get detected correctly + # on some linux distros (or with older Cmake versions). + # Use variables which list all include dirs and libraries instead: + list(APPEND INKSCAPE_INCS_SYS ${ImageMagick_INCLUDE_DIRS}) + list(APPEND INKSCAPE_LIBS ${ImageMagick_LIBRARIES}) + # TODO: Cmake's ImageMagick module misses required defines for newer + # versions of ImageMagick. See also: + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776832 + #add_definitions(-DMAGICKCORE_HDRI_ENABLE=0) # FIXME (version check?) + #add_definitions(-DMAGICKCORE_QUANTUM_DEPTH=16) # FIXME (version check?) + else() + set(WITH_IMAGE_MAGICK OFF) # enable 'Extensions > Raster' + endif() endif() include(${CMAKE_CURRENT_LIST_DIR}/IncludeJava.cmake) -- cgit v1.2.3 From 2495bd800225461079ed3b893a55dd4f73ec4d03 Mon Sep 17 00:00:00 2001 From: Ken Moffat <> Date: Mon, 4 May 2015 03:35:42 +0200 Subject: cmake: fix WITH_GTKSPELL configuration option (bzr r14103) --- CMakeScripts/DefineDependsandFlags.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CMakeScripts/DefineDependsandFlags.cmake') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index 854701145..2ce7ffce9 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -297,8 +297,9 @@ if(WITH_GTKSPELL) list(APPEND INKSCAPE_INCS_SYS ${GTKSPELL_INCLUDE_DIR}) list(APPEND INKSCAPE_LIBS ${GTKSPELL_LIBRARIES}) add_definitions(${GTKSPELL_DEFINITIONS}) + else() + set(WITH_GTKSPELL OFF) endif() - set(WITH_GTKSPELL ${GTKSPELL_FOUND}) endif() #find_package(OpenSSL) -- cgit v1.2.3 From c4c82bf875072c6a7796adcd67add5694fdd2cdd Mon Sep 17 00:00:00 2001 From: houz Date: Mon, 4 May 2015 11:29:57 +0200 Subject: cmake: fix copy&paste error in LibCDR check (bzr r14105) --- CMakeScripts/DefineDependsandFlags.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMakeScripts/DefineDependsandFlags.cmake') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index 2ce7ffce9..321bf63bc 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -175,8 +175,8 @@ endif() if(WITH_LIBCDR) find_package(LibCDR) if(LIBCDR_FOUND) - set(WITH_LIBCDR00 ${LIBVISIO-0.0_FOUND}) - set(WITH_LIBCDR01 ${LIBVISIO-0.1_FOUND}) + set(WITH_LIBCDR00 ${LIBCDR-0.0_FOUND}) + set(WITH_LIBCDR01 ${LIBCDR-0.1_FOUND}) list(APPEND INKSCAPE_INCS_SYS ${LIBCDR_INCLUDE_DIRS}) list(APPEND INKSCAPE_LIBS ${LIBCDR_LIBRARIES}) add_definitions(${LIBCDR_DEFINITIONS}) -- cgit v1.2.3 From 2eab6fad30c9c838902d9113c7e0d41b34ce79ea Mon Sep 17 00:00:00 2001 From: houz Date: Mon, 4 May 2015 12:39:09 +0200 Subject: cmake: shorter linker list (remove duplicates) (bzr r14106) --- CMakeScripts/DefineDependsandFlags.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CMakeScripts/DefineDependsandFlags.cmake') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index 321bf63bc..dceed9560 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -352,6 +352,8 @@ endif() include(${CMAKE_CURRENT_LIST_DIR}/IncludeJava.cmake) # end Dependencies +list(REMOVE_DUPLICATES INKSCAPE_LIBS) +list(REMOVE_DUPLICATES INKSCAPE_INCS_SYS) # C/C++ Flags include_directories(${INKSCAPE_INCS}) -- cgit v1.2.3