DefineDependsandFlags.cmake revision d407f5ef6efba716ab137557cea98756cf185fc9
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonset(INKSCAPE_LIBS "")
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonset(INKSCAPE_INCS "")
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonset(INKSCAPE_INCS_SYS "")
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmouginset(INKSCAPE_CXX_FLAGS "")
b3ee2e647c9b62254ce35e5d8e830441b2368096brycelist(APPEND INKSCAPE_INCS ${PROJECT_SOURCE_DIR}
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce ${PROJECT_SOURCE_DIR}/src
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce # generated includes
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce ${CMAKE_BINARY_DIR}/include
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# ----------------------------------------------------------------------------
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# Files we include
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# ----------------------------------------------------------------------------
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin link_directories($ENV{DEVLIBS_PATH}/lib)
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmouginpkg_check_modules(INKSCAPE_DEP REQUIRED pangocairo pangoft2 fontconfig gthread-2.0 gsl)
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmouginlist(APPEND INKSCAPE_LIBS ${INKSCAPE_DEP_LDFLAGS})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmouginlist(APPEND INKSCAPE_INCS_SYS ${INKSCAPE_DEP_INCLUDE_DIRS})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmouginlist(APPEND INKSCAPE_LIBS ${INKSCAPE_DEP_LIBRARIES})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmouginadd_definitions(${INKSCAPE_DEP_CFLAGS_OTHER})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmouginif(APPLE AND DEFINED ENV{CMAKE_PREFIX_PATH})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin list(APPEND INKSCAPE_LIBS "-L$ENV{CMAKE_PREFIX_PATH}/lib")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(${GTK+_2.0_TARGET} MATCHES "x11")
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin pkg_check_modules(x11 REQUIRED x11)
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin list(APPEND INKSCAPE_LIBS ${x11_LDFLAGS})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin pkg_check_modules(x11 REQUIRED x11)
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin list(APPEND INKSCAPE_LIBS ${x11_LDFLAGS})
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Bartonif(WITH_GNOME_VFS)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce find_package(GnomeVFS2)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(GNOMEVFS2_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_INCS_SYS ${GNOMEVFS2_INCLUDE_DIR})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_LIBS ${GNOMEVFS-2_LIBRARY})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_GNOME_VFS OFF)
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Bartonif(ENABLE_LCMS)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce find_package(LCMS2)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(LCMS2_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_INCS_SYS ${LCMS2_INCLUDE_DIRS})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_LIBS ${LCMS2_LIBRARIES})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce add_definitions(${LCMS2_DEFINITIONS})
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish set (HAVE_LIBLCMS2 1)
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish find_package(LCMS)
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish if(LCMS_FOUND)
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish list(APPEND INKSCAPE_INCS_SYS ${LCMS_INCLUDE_DIRS})
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish list(APPEND INKSCAPE_LIBS ${LCMS_LIBRARIES})
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish add_definitions(${LCMS_DEFINITIONS})
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish set (HAVE_LIBLCMS1 1)
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish set(ENABLE_LCMS OFF)
c86648fabb19289543998ca00a95afc79d092d68~suvfind_package(Iconv REQUIRED)
c86648fabb19289543998ca00a95afc79d092d68~suvlist(APPEND INKSCAPE_INCS_SYS ${ICONV_INCLUDE_DIRS})
c86648fabb19289543998ca00a95afc79d092d68~suvlist(APPEND INKSCAPE_LIBS ${ICONV_LIBRARIES})
c86648fabb19289543998ca00a95afc79d092d68~suvadd_definitions(${ICONV_DEFINITIONS})
d7f3b3e2d879b40f59adc6d96921cdba169648ed~suvfind_package(Intl REQUIRED)
d7f3b3e2d879b40f59adc6d96921cdba169648ed~suvlist(APPEND INKSCAPE_INCS_SYS ${Intl_INCLUDE_DIRS})
d7f3b3e2d879b40f59adc6d96921cdba169648ed~suvlist(APPEND INKSCAPE_LIBS ${Intl_LIBRARIES})
d7f3b3e2d879b40f59adc6d96921cdba169648ed~suvadd_definitions(${Intl_DEFINITIONS})
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadowfind_package(BoehmGC REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${BOEHMGC_INCLUDE_DIRS})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS ${BOEHMGC_LIBRARIES})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonadd_definitions(${BOEHMGC_DEFINITIONS})
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Bartonif(ENABLE_POPPLER)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce find_package(PopplerCairo)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(POPPLER_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(HAVE_POPPLER ON)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(ENABLE_POPPLER_CAIRO)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(POPPLER_CAIRO_FOUND AND POPPLER_GLIB_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(HAVE_POPPLER_CAIRO ON)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(POPPLER_GLIB_FOUND AND CAIRO_SVG_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(HAVE_POPPLER_GLIB ON)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(POPPLER_VERSION VERSION_GREATER "0.26.0" OR
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce POPPLER_VERSION VERSION_EQUAL "0.26.0")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(POPPLER_EVEN_NEWER_COLOR_SPACE_API ON)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(POPPLER_VERSION VERSION_GREATER "0.29.0" OR
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce POPPLER_VERSION VERSION_EQUAL "0.29.0")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API ON)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton set(ENABLE_POPPLER_CAIRO OFF)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(HAVE_POPPLER OFF)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(ENABLE_POPPLER_CAIRO OFF)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${POPPLER_INCLUDE_DIRS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonlist(APPEND INKSCAPE_LIBS ${POPPLER_LIBRARIES})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonadd_definitions(${POPPLER_DEFINITIONS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonif(WITH_LIBWPG)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce find_package(LibWPG)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(LIBWPG_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_LIBWPG01 ${LIBWPG-0.1_FOUND})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_LIBWPG02 ${LIBWPG-0.2_FOUND})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_LIBWPG03 ${LIBWPG-0.3_FOUND})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_INCS_SYS ${LIBWPG_INCLUDE_DIRS})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_LIBS ${LIBWPG_LIBRARIES})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce add_definitions(${LIBWPG_DEFINITIONS})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_LIBWPG OFF)
a268eb4d3feeb31c3573681214aac856ce446227~suvif(WITH_LIBVISIO)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce find_package(LibVisio)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(LIBVISIO_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_LIBVISIO00 ${LIBVISIO-0.0_FOUND})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_LIBVISIO01 ${LIBVISIO-0.1_FOUND})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_INCS_SYS ${LIBVISIO_INCLUDE_DIRS})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_LIBS ${LIBVISIO_LIBRARIES})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce add_definitions(${LIBVISIO_DEFINITIONS})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_LIBVISIO OFF)
a268eb4d3feeb31c3573681214aac856ce446227~suvif(WITH_LIBCDR)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce find_package(LibCDR)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(LIBCDR_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_LIBCDR00 ${LIBCDR-0.0_FOUND})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_LIBCDR01 ${LIBCDR-0.1_FOUND})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_INCS_SYS ${LIBCDR_INCLUDE_DIRS})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_LIBS ${LIBCDR_LIBRARIES})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce add_definitions(${LIBCDR_DEFINITIONS})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_LIBCDR OFF)
846d645a50bd8572a22eb2ca38437b2244de31d9~suvFIND_PACKAGE(JPEG)
846d645a50bd8572a22eb2ca38437b2244de31d9~suvIF(JPEG_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_INCS_SYS ${JPEG_INCLUDE_DIR})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_LIBS ${JPEG_LIBRARIES})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(HAVE_JPEG ON)
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonfind_package(PNG REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${PNG_PNG_INCLUDE_DIR})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS ${PNG_LIBRARY})
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadowfind_package(Popt REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${POPT_INCLUDE_DIR})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS ${POPT_LIBRARIES})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonadd_definitions(${POPT_DEFINITIONS})
d45a8f832349f50f048660da9f452b6c4a63f071Alex Valavanisfind_package(Potrace)
d45a8f832349f50f048660da9f452b6c4a63f071Alex Valavanisif(POTRACE_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_INCS_SYS ${POTRACE_INCLUDE_DIRS})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_LIBS ${POTRACE_LIBRARIES})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(HAVE_POTRACE ON)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce add_definitions(-DHAVE_POTRACE)
4872575eb64a6615c86365696a537833b77f8098Alex Valavaniselse(POTRACE_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(HAVE_POTRACE OFF)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce message(STATUS "Could not locate the Potrace library headers: the Trace Bitmap and Paintbucket tools will be disabled")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce find_package(DBus REQUIRED)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(DBUS_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_INCS_SYS ${DBUS_INCLUDE_DIR})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_INCS_SYS ${DBUS_ARCH_INCLUDE_DIR})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_LIBS ${DBUS_LIBRARIES})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_DBUS OFF)
14d987a7eb2831892a63e804779b279f0fde3fc8Jon A. Cruzif(WITH_GTEST)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(EXISTS "${GMOCK_DIR}" AND IS_DIRECTORY "${GMOCK_DIR}")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_GTEST off)
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# ----------------------------------------------------------------------------
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# CMake's builtin
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# ----------------------------------------------------------------------------
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryceset(TRY_GTKSPELL 1)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton# Include dependencies:
f47b2b3d3ec4743574380b7cf46d1c75cf6d252eCampbell Barton# use patched version until GTK2_CAIROMMCONFIG_INCLUDE_DIR is added
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryceif("${WITH_GTK3_EXPERIMENTAL}")
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish pkg_check_modules(
62973d6b786d576e120dedbce34c8da3ac4e83aeMartin Owens gtkmm-3.0>=3.8
62973d6b786d576e120dedbce34c8da3ac4e83aeMartin Owens gdkmm-3.0>=3.8
62973d6b786d576e120dedbce34c8da3ac4e83aeMartin Owens gtk+-3.0>=3.8
62973d6b786d576e120dedbce34c8da3ac4e83aeMartin Owens gdk-3.0>=3.8
62973d6b786d576e120dedbce34c8da3ac4e83aeMartin Owens gdl-3.0>=3.4
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish message("Using EXPERIMENTAL Gtkmm 3 build")
d407f5ef6efba716ab137557cea98756cf185fc9Marc Jeanmougin list(APPEND INKSCAPE_CXX_FLAGS ${GTK3_CFLAGS_OTHER})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_GTKMM_3_0 1)
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish message("Using external GDL")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_EXT_GDL 1)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce # Check whether we can use new features in Gtkmm 3.10
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce # TODO: Drop this test and bump the version number in the GTK test above
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce # as soon as all supported distributions provide Gtkmm >= 3.10
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce pkg_check_modules(GTKMM_3_10
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce gtkmm-3.0>=3.10,
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if("${GTKMM_3_10_FOUND}")
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish message("Using Gtkmm 3.10 build")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set (WITH_GTKMM_3_10 1)
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish pkg_check_modules(GDL_3_6 gdl-3.0>=3.6)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if("${GDL_3_6_FOUND}")
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish message("Using Gdl 3.6 or higher")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set (WITH_GDL_3_6 1)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(TRY_GTKSPELL )
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish pkg_check_modules(GTKSPELL3 gtkspell3-3.0)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if("${GTKSPELL3_FOUND}")
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish message("Using GtkSpell3 3.0")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set (WITH_GTKSPELL 1)
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish list(APPEND INKSCAPE_INCS_SYS
d407f5ef6efba716ab137557cea98756cf185fc9Marc Jeanmougin ${GTK3_INCLUDE_DIRS}
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish ${GTKSPELL3_INCLUDE_DIRS}
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish list(APPEND INKSCAPE_LIBS
d407f5ef6efba716ab137557cea98756cf185fc9Marc Jeanmougin ${GTK3_LIBRARIES}
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish ${GTKSPELL3_LIBRARIES}
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin pkg_check_modules(GTK REQUIRED
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin gtkmm-2.4>=2.24
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin list(APPEND INKSCAPE_CXX_FLAGS ${GTK_CFLAGS_OTHER})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin pkg_check_modules(GTKSPELL2 gtkspell-2.0)
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin if("${GTKSPELL3_FOUND}")
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin message("Using GtkSpell3 3.0")
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin add_definitions(${GTK_CFLAGS_OTHER})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin set (WITH_GTKSPELL 1)
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish list(APPEND INKSCAPE_INCS_SYS
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin ${GTK_INCLUDE_DIRS}
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin ${GTKSPELL_INCLUDE_DIRS}
ee44657972fae064de9737054b79ab14dc230635Shlomi Fish list(APPEND INKSCAPE_LIBS
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin ${GTK_LIBRARIES}
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin ${GTKSPELL_LIBRARIES}
f3f2b5271c51317a23df919fc903a5ec7f2c9df6Campbell Bartonfind_package(Freetype REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${FREETYPE_INCLUDE_DIRS})
f3f2b5271c51317a23df919fc903a5ec7f2c9df6Campbell Bartonlist(APPEND INKSCAPE_LIBS ${FREETYPE_LIBRARIES})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonfind_package(Boost REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${Boost_INCLUDE_DIRS})
f3f2b5271c51317a23df919fc903a5ec7f2c9df6Campbell Barton# list(APPEND INKSCAPE_LIBS ${Boost_LIBRARIES})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonfind_package(ASPELL)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonif(ASPELL_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_INCS_SYS ${ASPELL_INCLUDE_DIR})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_LIBS ${ASPELL_LIBRARIES})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce add_definitions(${ASPELL_DEFINITIONS})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(HAVE_ASPELL TRUE)
ee44657972fae064de9737054b79ab14dc230635Shlomi Fishif("${TRY_GTKSPELL}" AND "${WITH_GTKSPELL}")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce find_package(GtkSpell)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(GTKSPELL_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_INCS_SYS ${GTKSPELL_INCLUDE_DIR})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce list(APPEND INKSCAPE_LIBS ${GTKSPELL_LIBRARIES})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce add_definitions(${GTKSPELL_DEFINITIONS})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_GTKSPELL OFF)
1b4e05608c403a2f2b769fe4823d035cf89111dfbryce#find_package(OpenSSL)
1b4e05608c403a2f2b769fe4823d035cf89111dfbryce#list(APPEND INKSCAPE_INCS_SYS ${OPENSSL_INCLUDE_DIR})
1b4e05608c403a2f2b769fe4823d035cf89111dfbryce#list(APPEND INKSCAPE_LIBS ${OPENSSL_LIBRARIES})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonfind_package(LibXslt REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${LIBXSLT_INCLUDE_DIR})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS ${LIBXSLT_LIBRARIES})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonadd_definitions(${LIBXSLT_DEFINITIONS})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonfind_package(LibXml2 REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${LIBXML2_INCLUDE_DIR})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS ${LIBXML2_LIBRARIES})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonadd_definitions(${LIBXML2_DEFINITIONS})
2ac06557118f2a6e620402ee9984c1c45d981065~suvif(WITH_OPENMP)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce find_package(OpenMP)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(OPENMP_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin list(APPEND INKSCAPE_CXX_FLAGS ${OpenMP_CXX_FLAGS})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(APPLE AND ${CMAKE_GENERATOR} MATCHES "Xcode")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(CMAKE_XCODE_ATTRIBUTE_ENABLE_OPENMP_SUPPORT "YES")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce mark_as_advanced(OpenMP_C_FLAGS)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce mark_as_advanced(OpenMP_CXX_FLAGS)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce # '-fopenmp' is in OpenMP_C_FLAGS, OpenMP_CXX_FLAGS and implies '-lgomp'
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce # uncomment explicit linking below if still needed:
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(HAVE_OPENMP ON)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce #list(APPEND INKSCAPE_LIBS "-lgomp") # FIXME
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(HAVE_OPENMP OFF)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_OPENMP OFF)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonfind_package(ZLIB REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${ZLIB_INCLUDE_DIRS})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS ${ZLIB_LIBRARIES})
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suvif(WITH_IMAGE_MAGICK)
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin pkg_check_modules(ImageMagick ImageMagick MagickCore Magick++ )
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(ImageMagick_FOUND)
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin list(APPEND INKSCAPE_LIBS ${ImageMagick_LDFLAGS})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin add_definitions(${ImageMagick_CFLAGS_OTHER})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin list(APPEND INKSCAPE_INCS_SYS ${ImageMagick_INCLUDE_DIRS})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin list(APPEND INKSCAPE_LIBS ${ImageMagick_LIBRARIES})
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(WITH_IMAGE_MAGICK OFF) # enable 'Extensions > Raster'
72f94547e31c3584590f10d737d53cecab94092chouzset(ENABLE_NLS OFF)
72f94547e31c3584590f10d737d53cecab94092chouzif(WITH_NLS)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce find_package(Gettext)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce if(GETTEXT_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce message(STATUS "Found gettext + msgfmt to convert language files. Translation enabled")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce set(ENABLE_NLS ON)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce else(GETTEXT_FOUND)
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce message(STATUS "Cannot find gettext + msgfmt to convert language file. Translation won't be enabled")
f5c7ca101be6b6abe17c6c28e971c86617f6c782bryce endif(GETTEXT_FOUND)
72f94547e31c3584590f10d737d53cecab94092chouzendif(WITH_NLS)
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmouginpkg_check_modules(SIGC++ REQUIRED sigc++-2.0 )
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmouginlist(APPEND INKSCAPE_LIBS ${SIGC++_LDFLAGS})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmouginlist(APPEND INKSCAPE_CXX_FLAGS ${SIGC++_CFLAGS_OTHER})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmouginlist(REMOVE_DUPLICATES INKSCAPE_CXX_FLAGS)
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmouginforeach(flag ${INKSCAPE_CXX_FLAGS})
ba99633b519777207a49fc899b48b233ea9956a6Marc Jeanmougin set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" CACHE STRING "" FORCE)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton# end Dependencies
d28339d35a0e8b28ef7b0f098577c852dec19384houzlist(REMOVE_DUPLICATES INKSCAPE_LIBS)
d28339d35a0e8b28ef7b0f098577c852dec19384houzlist(REMOVE_DUPLICATES INKSCAPE_INCS_SYS)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartoninclude_directories(${INKSCAPE_INCS})
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartoninclude_directories(SYSTEM ${INKSCAPE_INCS_SYS})
63356e2fca83eaeb83557dcb312c39ea133569aahouzinclude(${CMAKE_CURRENT_LIST_DIR}/ConfigChecks.cmake)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonunset(INKSCAPE_INCS)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonunset(INKSCAPE_INCS_SYS)