DefineDependsandFlags.cmake revision d28339d35a0e8b28ef7b0f098577c852dec19384
8N/A
8N/Aset(INKSCAPE_LIBS "")
8N/Aset(INKSCAPE_INCS "")
8N/Aset(INKSCAPE_INCS_SYS "")
8N/A
8N/Alist(APPEND INKSCAPE_INCS ${PROJECT_SOURCE_DIR}
8N/A ${PROJECT_SOURCE_DIR}/src
8N/A
8N/A # generated includes
8N/A ${CMAKE_BINARY_DIR}/include
8N/A)
8N/A
8N/A# ----------------------------------------------------------------------------
8N/A# Files we include
8N/A# ----------------------------------------------------------------------------
8N/A
8N/Afind_package(GSL REQUIRED)
8N/Alist(APPEND INKSCAPE_INCS_SYS ${GSL_INCLUDE_DIRS})
8N/Alist(APPEND INKSCAPE_LIBS ${GSL_LIBRARIES})
8N/Aif (WIN32)
65N/A list(APPEND INKSCAPE_LIBS "-L$ENV{DEVLIBS_PATH}/lib") # FIXME
8N/A list(APPEND INKSCAPE_LIBS "-lpangocairo-1.0.dll") # FIXME
8N/A list(APPEND INKSCAPE_LIBS "-lpangoft2-1.0.dll") # FIXME
8N/A list(APPEND INKSCAPE_LIBS "-lpangowin32-1.0.dll") # FIXME
8N/A list(APPEND INKSCAPE_LIBS "-lgthread-2.0.dll") # FIXME
65N/Aelseif(APPLE)
65N/A if(DEFINED ENV{CMAKE_PREFIX_PATH})
262N/A # Adding the library search path explicitly seems not required
8N/A # if MacPorts is installed in default prefix ('/opt/local') -
24N/A # Cmake then can rely on the hard-coded paths in its modules.
8N/A # Only prepend search path if $CMAKE_PREFIX_PATH is defined:
65N/A list(APPEND INKSCAPE_LIBS "-L$ENV{CMAKE_PREFIX_PATH}/lib") # FIXME
58N/A endif()
516N/A list(APPEND INKSCAPE_LIBS "-lpangocairo-1.0") # FIXME
416N/A list(APPEND INKSCAPE_LIBS "-lpangoft2-1.0") # FIXME
95N/A list(APPEND INKSCAPE_LIBS "-lfontconfig") # FIXME
95N/A if(${GTK+_2.0_TARGET} MATCHES "x11")
1183N/A # only link X11 if using X11 backend of GTK2
416N/A list(APPEND INKSCAPE_LIBS "-lX11") # FIXME
516N/A endif()
1195N/Aelse()
8N/A list(APPEND INKSCAPE_LIBS "-ldl") # FIXME
8N/A list(APPEND INKSCAPE_LIBS "-lpangocairo-1.0") # FIXME
65N/A list(APPEND INKSCAPE_LIBS "-lpangoft2-1.0") # FIXME
574N/A list(APPEND INKSCAPE_LIBS "-lfontconfig") # FIXME
8N/A list(APPEND INKSCAPE_LIBS "-lX11") # FIXME
290N/Aendif()
815N/A
635N/Aif(NOT APPLE)
1182N/A # FIXME: should depend on availability of OpenMP support (see below) (?)
1190N/A list(APPEND INKSCAPE_LIBS "-lgomp") # FIXME
1182N/Aendif()
1182N/Alist(APPEND INKSCAPE_LIBS "-lgslcblas") # FIXME
1182N/A
1182N/Aif(WITH_GNOME_VFS)
1182N/A find_package(GnomeVFS2)
1182N/A if(GNOMEVFS2_FOUND)
1182N/A list(APPEND INKSCAPE_INCS_SYS ${GNOMEVFS2_INCLUDE_DIR})
1182N/A list(APPEND INKSCAPE_LIBS ${GNOMEVFS-2_LIBRARY})
1182N/A else()
1182N/A set(WITH_GNOME_VFS OFF)
635N/A endif()
1183N/Aendif()
1183N/A
1183N/Aif(ENABLE_LCMS)
1183N/A find_package(LCMS2)
635N/A if(LCMS2_FOUND)
635N/A list(APPEND INKSCAPE_INCS_SYS ${LCMS2_INCLUDE_DIRS})
1190N/A list(APPEND INKSCAPE_LIBS ${LCMS2_LIBRARIES})
1182N/A add_definitions(${LCMS2_DEFINITIONS})
574N/A set (HAVE_LIBLCMS2 1)
664N/A else()
664N/A find_package(LCMS)
749N/A if(LCMS_FOUND)
664N/A list(APPEND INKSCAPE_INCS_SYS ${LCMS_INCLUDE_DIRS})
664N/A list(APPEND INKSCAPE_LIBS ${LCMS_LIBRARIES})
574N/A add_definitions(${LCMS_DEFINITIONS})
574N/A set (HAVE_LIBLCMS1 1)
574N/A else()
1190N/A set(ENABLE_LCMS OFF)
574N/A endif()
792N/A endif()
792N/Aendif()
574N/A
574N/Afind_package(Iconv REQUIRED)
792N/Alist(APPEND INKSCAPE_INCS_SYS ${ICONV_INCLUDE_DIRS})
1016N/Alist(APPEND INKSCAPE_LIBS ${ICONV_LIBRARIES})
792N/Aadd_definitions(${ICONV_DEFINITIONS})
1016N/A
58N/Afind_package(Intl REQUIRED)
50N/Alist(APPEND INKSCAPE_INCS_SYS ${Intl_INCLUDE_DIRS})
50N/Alist(APPEND INKSCAPE_LIBS ${Intl_LIBRARIES})
50N/Aadd_definitions(${Intl_DEFINITIONS})
1190N/A
574N/Afind_package(BoehmGC REQUIRED)
1182N/Alist(APPEND INKSCAPE_INCS_SYS ${BOEHMGC_INCLUDE_DIRS})
1182N/Alist(APPEND INKSCAPE_LIBS ${BOEHMGC_LIBRARIES})
574N/Aadd_definitions(${BOEHMGC_DEFINITIONS})
822N/A
792N/Aif(ENABLE_POPPLER)
792N/A find_package(PopplerCairo)
792N/A if(POPPLER_FOUND)
792N/A set(HAVE_POPPLER ON)
792N/A if(ENABLE_POPPLER_CAIRO)
792N/A if(POPPLER_CAIRO_FOUND AND POPPLER_GLIB_FOUND)
792N/A set(HAVE_POPPLER_CAIRO ON)
792N/A endif()
792N/A if(POPPLER_GLIB_FOUND AND CAIRO_SVG_FOUND)
792N/A set(HAVE_POPPLER_GLIB ON)
792N/A endif()
1190N/A endif()
792N/A if(POPPLER_VERSION VERSION_GREATER "0.8.3" OR
574N/A POPPLER_VERSION VERSION_EQUAL "0.8.3")
635N/A set(POPPLER_NEW_GFXFONT ON)
574N/A endif()
1190N/A if(POPPLER_VERSION VERSION_GREATER "0.12.2" OR
664N/A POPPLER_VERSION VERSION_EQUAL "0.12.2")
1190N/A set(POPPLER_NEW_COLOR_SPACE_API ON)
1190N/A endif()
815N/A if(POPPLER_VERSION VERSION_GREATER "0.26.0" OR
1183N/A POPPLER_VERSION VERSION_EQUAL "0.26.0")
1183N/A set(POPPLER_EVEN_NEWER_COLOR_SPACE_API ON)
65N/A endif()
65N/A if(POPPLER_VERSION VERSION_GREATER "0.29.0" OR
232N/A POPPLER_VERSION VERSION_EQUAL "0.29.0")
232N/A set(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API ON)
71N/A endif()
355N/A if(POPPLER_VERSION VERSION_GREATER "0.15.1" OR
575N/A POPPLER_VERSION VERSION_EQUAL "0.15.1")
575N/A set(POPPLER_NEW_GFXPATCH ON)
575N/A endif()
575N/A if(POPPLER_VERSION VERSION_GREATER "0.20.0" OR
575N/A POPPLER_VERSION VERSION_EQUAL "0.20.0")
58N/A set(POPPLER_NEW_ERRORAPI ON)
1182N/A endif()
1182N/A else()
1182N/A set(ENABLE_POPPLER_CAIRO OFF)
1182N/A endif()
71N/Aelse()
1190N/A set(HAVE_POPPLER OFF)
262N/A set(ENABLE_POPPLER_CAIRO OFF)
262N/Aendif()
355N/A
262N/Alist(APPEND INKSCAPE_INCS_SYS ${POPPLER_INCLUDE_DIRS})
1190N/Alist(APPEND INKSCAPE_LIBS ${POPPLER_LIBRARIES})
262N/Aadd_definitions(${POPPLER_DEFINITIONS})
262N/A
262N/Aif(WITH_LIBWPG)
262N/A find_package(LibWPG)
65N/A if(LIBWPG_FOUND)
1190N/A set(WITH_LIBWPG01 ${LIBWPG-0.1_FOUND})
1182N/A set(WITH_LIBWPG02 ${LIBWPG-0.2_FOUND})
58N/A set(WITH_LIBWPG03 ${LIBWPG-0.3_FOUND})
1190N/A list(APPEND INKSCAPE_INCS_SYS ${LIBWPG_INCLUDE_DIRS})
1183N/A list(APPEND INKSCAPE_LIBS ${LIBWPG_LIBRARIES})
71N/A add_definitions(${LIBWPG_DEFINITIONS})
1195N/A else()
71N/A set(WITH_LIBWPG OFF)
71N/A endif()
71N/Aendif()
71N/A
75N/Aif(WITH_LIBVISIO)
71N/A find_package(LibVisio)
71N/A if(LIBVISIO_FOUND)
71N/A set(WITH_LIBVISIO00 ${LIBVISIO-0.0_FOUND})
71N/A set(WITH_LIBVISIO01 ${LIBVISIO-0.1_FOUND})
24N/A list(APPEND INKSCAPE_INCS_SYS ${LIBVISIO_INCLUDE_DIRS})
1190N/A list(APPEND INKSCAPE_LIBS ${LIBVISIO_LIBRARIES})
8N/A add_definitions(${LIBVISIO_DEFINITIONS})
8N/A else()
212N/A set(WITH_LIBVISIO OFF)
95N/A endif()
1238N/Aendif()
95N/A
95N/Aif(WITH_LIBCDR)
95N/A find_package(LibCDR)
95N/A if(LIBCDR_FOUND)
95N/A set(WITH_LIBCDR00 ${LIBCDR-0.0_FOUND})
95N/A set(WITH_LIBCDR01 ${LIBCDR-0.1_FOUND})
95N/A list(APPEND INKSCAPE_INCS_SYS ${LIBCDR_INCLUDE_DIRS})
95N/A list(APPEND INKSCAPE_LIBS ${LIBCDR_LIBRARIES})
95N/A add_definitions(${LIBCDR_DEFINITIONS})
815N/A else()
459N/A set(WITH_LIBCDR OFF)
95N/A endif()
1182N/Aendif()
1182N/A
95N/AFIND_PACKAGE(JPEG REQUIRED)
95N/A#IF(JPEG_FOUND)
95N/A #INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR})
95N/A #TARGET_LINK_LIBRARIES(mpo ${JPEG_LIBRARIES})
95N/A#ENDIF()
95N/Alist(APPEND INKSCAPE_INCS_SYS ${JPEG_INCLUDE_DIR})
579N/Alist(APPEND INKSCAPE_LIBS ${JPEG_LIBRARIES})
579N/A
579N/Afind_package(PNG REQUIRED)
575N/Alist(APPEND INKSCAPE_INCS_SYS ${PNG_PNG_INCLUDE_DIR})
575N/Alist(APPEND INKSCAPE_LIBS ${PNG_LIBRARY})
95N/A
95N/Afind_package(Popt REQUIRED)
95N/Alist(APPEND INKSCAPE_INCS_SYS ${POPT_INCLUDE_DIR})
95N/Alist(APPEND INKSCAPE_LIBS ${POPT_LIBRARIES})
355N/Aadd_definitions(${POPT_DEFINITIONS})
355N/A
355N/Aif(WITH_DBUS)
95N/A find_package(DBus REQUIRED)
355N/A if(DBUS_FOUND)
355N/A list(APPEND INKSCAPE_INCS_SYS ${DBUS_INCLUDE_DIR})
355N/A list(APPEND INKSCAPE_INCS_SYS ${DBUS_ARCH_INCLUDE_DIR})
347N/A list(APPEND INKSCAPE_LIBS ${DBUS_LIBRARIES})
347N/A else()
1182N/A set(WITH_DBUS OFF)
347N/A endif()
347N/Aendif()
1182N/A
347N/Aif(WITH_GTEST)
347N/A if(EXISTS "${GMOCK_DIR}" AND IS_DIRECTORY "${GMOCK_DIR}")
1190N/A
1190N/A else()
347N/A set(WITH_GTEST off)
1190N/A endif()
1190N/Aendif()
1183N/A
99N/A# ----------------------------------------------------------------------------
1190N/A# CMake's builtin
95N/A# ----------------------------------------------------------------------------
1195N/A
355N/A# Include dependencies:
355N/A# use patched version until GTK2_CAIROMMCONFIG_INCLUDE_DIR is added
355N/Afind_package(GTK2 COMPONENTS gtk gtkmm REQUIRED)
355N/Alist(APPEND INKSCAPE_INCS_SYS
355N/A ${GTK2_GDK_INCLUDE_DIR}
355N/A ${GTK2_GDKMM_INCLUDE_DIR}
355N/A ${GTK2_GDK_PIXBUF_INCLUDE_DIR}
95N/A ${GTK2_GDKCONFIG_INCLUDE_DIR}
95N/A ${GTK2_GDKMMCONFIG_INCLUDE_DIR}
355N/A ${GTK2_GLIB_INCLUDE_DIR}
95N/A ${GTK2_GLIBCONFIG_INCLUDE_DIR}
95N/A ${GTK2_GLIBMM_INCLUDE_DIR}
815N/A ${GTK2_GLIBMMCONFIG_INCLUDE_DIR}
298N/A ${GTK2_GTK_INCLUDE_DIR}
176N/A ${GTK2_GTKMM_INCLUDE_DIR}
176N/A ${GTK2_GTKMMCONFIG_INCLUDE_DIR}
176N/A ${GTK2_ATK_INCLUDE_DIR}
815N/A ${GTK2_ATKMM_INCLUDE_DIR}
459N/A ${GTK2_PANGO_INCLUDE_DIR}
664N/A ${GTK2_PANGOMM_INCLUDE_DIR}
516N/A ${GTK2_PANGOMMCONFIG_INCLUDE_DIR}
516N/A ${GTK2_CAIRO_INCLUDE_DIR}
1182N/A ${GTK2_CAIROMM_INCLUDE_DIR}
1182N/A ${GTK2_CAIROMMCONFIG_INCLUDE_DIR} # <-- not in cmake 2.8.4
516N/A ${GTK2_GIOMM_INCLUDE_DIR}
516N/A ${GTK2_GIOMMCONFIG_INCLUDE_DIR}
516N/A ${GTK2_SIGC++_INCLUDE_DIR}
516N/A ${GTK2_SIGC++CONFIG_INCLUDE_DIR}
516N/A)
516N/A
516N/Alist(APPEND INKSCAPE_LIBS
516N/A ${GTK2_GDK_LIBRARY}
1182N/A ${GTK2_GDKMM_LIBRARY}
516N/A ${GTK2_GDK_PIXBUF_LIBRARY}
516N/A ${GTK2_GLIB_LIBRARY}
516N/A ${GTK2_GLIBMM_LIBRARY}
516N/A ${GTK2_GTK_LIBRARY}
516N/A ${GTK2_GTKMM_LIBRARY}
203N/A ${GTK2_ATK_LIBRARY}
203N/A ${GTK2_ATKMM_LIBRARY}
203N/A ${GTK2_PANGO_LIBRARY}
212N/A ${GTK2_PANGOMM_LIBRARY}
815N/A ${GTK2_CAIRO_LIBRARY}
212N/A ${GTK2_CAIROMM_LIBRARY}
212N/A ${GTK2_GIOMM_LIBRARY}
212N/A ${GTK2_SIGC++_LIBRARY}
212N/A ${GTK2_GOBJECT_LIBRARY}
212N/A)
212N/A
212N/A
1190N/Afind_package(Freetype REQUIRED)
314N/Alist(APPEND INKSCAPE_INCS_SYS ${FREETYPE_INCLUDE_DIRS})
314N/Alist(APPEND INKSCAPE_LIBS ${FREETYPE_LIBRARIES})
993N/A
314N/Afind_package(Boost REQUIRED)
314N/Alist(APPEND INKSCAPE_INCS_SYS ${Boost_INCLUDE_DIRS})
1183N/A# list(APPEND INKSCAPE_LIBS ${Boost_LIBRARIES})
1183N/A
314N/Afind_package(ASPELL)
314N/Aif(ASPELL_FOUND)
314N/A list(APPEND INKSCAPE_INCS_SYS ${ASPELL_INCLUDE_DIR})
314N/A list(APPEND INKSCAPE_LIBS ${ASPELL_LIBRARIES})
1183N/A add_definitions(${ASPELL_DEFINITIONS})
1183N/A set(HAVE_ASPELL TRUE)
1183N/Aendif()
1183N/A
314N/Aif(WITH_GTKSPELL)
435N/A find_package(GtkSpell)
435N/A if(GTKSPELL_FOUND)
592N/A list(APPEND INKSCAPE_INCS_SYS ${GTKSPELL_INCLUDE_DIR})
1182N/A list(APPEND INKSCAPE_LIBS ${GTKSPELL_LIBRARIES})
1182N/A add_definitions(${GTKSPELL_DEFINITIONS})
1182N/A else()
1182N/A set(WITH_GTKSPELL OFF)
1182N/A endif()
435N/Aendif()
765N/A
765N/A#find_package(OpenSSL)
765N/A#list(APPEND INKSCAPE_INCS_SYS ${OPENSSL_INCLUDE_DIR})
765N/A#list(APPEND INKSCAPE_LIBS ${OPENSSL_LIBRARIES})
765N/A
765N/Afind_package(LibXslt REQUIRED)
765N/Alist(APPEND INKSCAPE_INCS_SYS ${LIBXSLT_INCLUDE_DIR})
765N/Alist(APPEND INKSCAPE_LIBS ${LIBXSLT_LIBRARIES})
792N/Aadd_definitions(${LIBXSLT_DEFINITIONS})
792N/A
792N/Afind_package(LibXml2 REQUIRED)
792N/Alist(APPEND INKSCAPE_INCS_SYS ${LIBXML2_INCLUDE_DIR})
792N/Alist(APPEND INKSCAPE_LIBS ${LIBXML2_LIBRARIES})
792N/Aadd_definitions(${LIBXML2_DEFINITIONS})
792N/A
765N/Afind_package(OpenMP)
8N/Aif(OpenMP_FOUND)
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)
endif()
find_package(ZLIB REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${ZLIB_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${ZLIB_LIBRARIES})
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)
# end Dependencies
list(REMOVE_DUPLICATES INKSCAPE_LIBS)
list(REMOVE_DUPLICATES INKSCAPE_INCS_SYS)
# C/C++ Flags
include_directories(${INKSCAPE_INCS})
include_directories(SYSTEM ${INKSCAPE_INCS_SYS})
include(${CMAKE_CURRENT_LIST_DIR}/ConfigChecks.cmake)
unset(INKSCAPE_INCS)
unset(INKSCAPE_INCS_SYS)