DefineDependsandFlags.cmake revision 846d645a50bd8572a22eb2ca38437b2244de31d9
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadow
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonset(INKSCAPE_LIBS "")
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonset(INKSCAPE_INCS "")
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonset(INKSCAPE_INCS_SYS "")
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton
b3ee2e647c9b62254ce35e5d8e830441b2368096brycelist(APPEND INKSCAPE_INCS ${PROJECT_SOURCE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${PROJECT_SOURCE_DIR}/src
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton # generated includes
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton ${CMAKE_BINARY_DIR}/include
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# ----------------------------------------------------------------------------
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# Files we include
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# ----------------------------------------------------------------------------
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadowfind_package(GSL REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${GSL_INCLUDE_DIRS})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS ${GSL_LIBRARIES})
03872de2909772bb7a3df623f780e4ebb41eef37Johan B. C. Engelenif (WIN32)
d8c8be7181ee60a1161641c60c946ed17b80fec7Campbell Barton list(APPEND INKSCAPE_LIBS "-L$ENV{DEVLIBS_PATH}/lib") # FIXME
d8c8be7181ee60a1161641c60c946ed17b80fec7Campbell Barton list(APPEND INKSCAPE_LIBS "-lpangocairo-1.0.dll") # FIXME
d8c8be7181ee60a1161641c60c946ed17b80fec7Campbell Barton list(APPEND INKSCAPE_LIBS "-lpangoft2-1.0.dll") # FIXME
d8c8be7181ee60a1161641c60c946ed17b80fec7Campbell Barton list(APPEND INKSCAPE_LIBS "-lpangowin32-1.0.dll") # FIXME
d8c8be7181ee60a1161641c60c946ed17b80fec7Campbell Barton list(APPEND INKSCAPE_LIBS "-lgthread-2.0.dll") # FIXME
5f8360890e4758752936c5eda4524b7ffad91360~suvelseif(APPLE)
5f8360890e4758752936c5eda4524b7ffad91360~suv if(DEFINED ENV{CMAKE_PREFIX_PATH})
5f8360890e4758752936c5eda4524b7ffad91360~suv # Adding the library search path explicitly seems not required
5f8360890e4758752936c5eda4524b7ffad91360~suv # if MacPorts is installed in default prefix ('/opt/local') -
5f8360890e4758752936c5eda4524b7ffad91360~suv # Cmake then can rely on the hard-coded paths in its modules.
5f8360890e4758752936c5eda4524b7ffad91360~suv # Only prepend search path if $CMAKE_PREFIX_PATH is defined:
5f8360890e4758752936c5eda4524b7ffad91360~suv list(APPEND INKSCAPE_LIBS "-L$ENV{CMAKE_PREFIX_PATH}/lib") # FIXME
5f8360890e4758752936c5eda4524b7ffad91360~suv endif()
5f8360890e4758752936c5eda4524b7ffad91360~suv list(APPEND INKSCAPE_LIBS "-lpangocairo-1.0") # FIXME
5f8360890e4758752936c5eda4524b7ffad91360~suv list(APPEND INKSCAPE_LIBS "-lpangoft2-1.0") # FIXME
5f8360890e4758752936c5eda4524b7ffad91360~suv list(APPEND INKSCAPE_LIBS "-lfontconfig") # FIXME
5f8360890e4758752936c5eda4524b7ffad91360~suv if(${GTK+_2.0_TARGET} MATCHES "x11")
5f8360890e4758752936c5eda4524b7ffad91360~suv # only link X11 if using X11 backend of GTK2
5f8360890e4758752936c5eda4524b7ffad91360~suv list(APPEND INKSCAPE_LIBS "-lX11") # FIXME
5f8360890e4758752936c5eda4524b7ffad91360~suv endif()
d8c8be7181ee60a1161641c60c946ed17b80fec7Campbell Bartonelse()
d8c8be7181ee60a1161641c60c946ed17b80fec7Campbell Barton list(APPEND INKSCAPE_LIBS "-ldl") # FIXME
d8c8be7181ee60a1161641c60c946ed17b80fec7Campbell Barton list(APPEND INKSCAPE_LIBS "-lpangocairo-1.0") # FIXME
d8c8be7181ee60a1161641c60c946ed17b80fec7Campbell Barton list(APPEND INKSCAPE_LIBS "-lpangoft2-1.0") # FIXME
d8c8be7181ee60a1161641c60c946ed17b80fec7Campbell Barton list(APPEND INKSCAPE_LIBS "-lfontconfig") # FIXME
d8c8be7181ee60a1161641c60c946ed17b80fec7Campbell Barton list(APPEND INKSCAPE_LIBS "-lX11") # FIXME
03872de2909772bb7a3df623f780e4ebb41eef37Johan B. C. Engelenendif()
d8c8be7181ee60a1161641c60c946ed17b80fec7Campbell Barton
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS "-lgslcblas") # FIXME
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Bartonif(WITH_GNOME_VFS)
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton find_package(GnomeVFS2)
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton if(GNOMEVFS2_FOUND)
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton list(APPEND INKSCAPE_INCS_SYS ${GNOMEVFS2_INCLUDE_DIR})
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton list(APPEND INKSCAPE_LIBS ${GNOMEVFS-2_LIBRARY})
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton else()
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton set(WITH_GNOME_VFS OFF)
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton endif()
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Bartonendif()
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Bartonif(ENABLE_LCMS)
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish find_package(LCMS2)
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish if(LCMS2_FOUND)
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish list(APPEND INKSCAPE_INCS_SYS ${LCMS2_INCLUDE_DIRS})
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish list(APPEND INKSCAPE_LIBS ${LCMS2_LIBRARIES})
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish add_definitions(${LCMS2_DEFINITIONS})
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish set (HAVE_LIBLCMS2 1)
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Barton else()
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 else()
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish set(ENABLE_LCMS OFF)
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish endif()
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish endif()
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Bartonendif()
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Barton
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})
c86648fabb19289543998ca00a95afc79d092d68~suv
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})
d7f3b3e2d879b40f59adc6d96921cdba169648ed~suv
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})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Bartonif(ENABLE_POPPLER)
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton find_package(PopplerCairo)
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton if(POPPLER_FOUND)
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton set(HAVE_POPPLER ON)
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton if(ENABLE_POPPLER_CAIRO)
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton if(POPPLER_CAIRO_FOUND AND POPPLER_GLIB_FOUND)
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton set(HAVE_POPPLER_CAIRO ON)
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton endif()
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton if(POPPLER_GLIB_FOUND AND CAIRO_SVG_FOUND)
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton set(HAVE_POPPLER_GLIB ON)
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton endif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton endif()
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton if(POPPLER_VERSION VERSION_GREATER "0.8.3" OR
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton POPPLER_VERSION VERSION_EQUAL "0.8.3")
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton set(POPPLER_NEW_GFXFONT ON)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton endif()
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton if(POPPLER_VERSION VERSION_GREATER "0.12.2" OR
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton POPPLER_VERSION VERSION_EQUAL "0.12.2")
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton set(POPPLER_NEW_COLOR_SPACE_API ON)
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton endif()
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish if(POPPLER_VERSION VERSION_GREATER "0.26.0" OR
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish POPPLER_VERSION VERSION_EQUAL "0.26.0")
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish set(POPPLER_EVEN_NEWER_COLOR_SPACE_API ON)
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish endif()
cbe44c9b41170c0aa520145320438e7d52fb2ab5~suv if(POPPLER_VERSION VERSION_GREATER "0.29.0" OR
cbe44c9b41170c0aa520145320438e7d52fb2ab5~suv POPPLER_VERSION VERSION_EQUAL "0.29.0")
cbe44c9b41170c0aa520145320438e7d52fb2ab5~suv set(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API ON)
cbe44c9b41170c0aa520145320438e7d52fb2ab5~suv endif()
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton if(POPPLER_VERSION VERSION_GREATER "0.15.1" OR
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton POPPLER_VERSION VERSION_EQUAL "0.15.1")
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton set(POPPLER_NEW_GFXPATCH ON)
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton endif()
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton if(POPPLER_VERSION VERSION_GREATER "0.20.0" OR
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton POPPLER_VERSION VERSION_EQUAL "0.20.0")
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton set(POPPLER_NEW_ERRORAPI ON)
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton endif()
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton else()
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton set(ENABLE_POPPLER_CAIRO OFF)
eff8fb9acfee4431530d9bf8e4e038c8516fd369Luca Bruno endif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonelse()
c0a46f99514c9c7fda075f62ed4c86eeda2f4743Campbell Barton set(HAVE_POPPLER OFF)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton set(ENABLE_POPPLER_CAIRO OFF)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonendif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${POPPLER_INCLUDE_DIRS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonlist(APPEND INKSCAPE_LIBS ${POPPLER_LIBRARIES})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonadd_definitions(${POPPLER_DEFINITIONS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonif(WITH_LIBWPG)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton find_package(LibWPG)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton if(LIBWPG_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv set(WITH_LIBWPG01 ${LIBWPG-0.1_FOUND})
a268eb4d3feeb31c3573681214aac856ce446227~suv set(WITH_LIBWPG02 ${LIBWPG-0.2_FOUND})
a268eb4d3feeb31c3573681214aac856ce446227~suv set(WITH_LIBWPG03 ${LIBWPG-0.3_FOUND})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_INCS_SYS ${LIBWPG_INCLUDE_DIRS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_LIBS ${LIBWPG_LIBRARIES})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton add_definitions(${LIBWPG_DEFINITIONS})
099c4fb891bff5187b622510630ed3362b2fb123Campbell Barton else()
099c4fb891bff5187b622510630ed3362b2fb123Campbell Barton set(WITH_LIBWPG OFF)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton endif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonendif()
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton
a268eb4d3feeb31c3573681214aac856ce446227~suvif(WITH_LIBVISIO)
a268eb4d3feeb31c3573681214aac856ce446227~suv find_package(LibVisio)
a268eb4d3feeb31c3573681214aac856ce446227~suv if(LIBVISIO_FOUND)
a268eb4d3feeb31c3573681214aac856ce446227~suv set(WITH_LIBVISIO00 ${LIBVISIO-0.0_FOUND})
a268eb4d3feeb31c3573681214aac856ce446227~suv set(WITH_LIBVISIO01 ${LIBVISIO-0.1_FOUND})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND INKSCAPE_INCS_SYS ${LIBVISIO_INCLUDE_DIRS})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND INKSCAPE_LIBS ${LIBVISIO_LIBRARIES})
a268eb4d3feeb31c3573681214aac856ce446227~suv add_definitions(${LIBVISIO_DEFINITIONS})
a268eb4d3feeb31c3573681214aac856ce446227~suv else()
a268eb4d3feeb31c3573681214aac856ce446227~suv set(WITH_LIBVISIO OFF)
a268eb4d3feeb31c3573681214aac856ce446227~suv endif()
a268eb4d3feeb31c3573681214aac856ce446227~suvendif()
a268eb4d3feeb31c3573681214aac856ce446227~suv
a268eb4d3feeb31c3573681214aac856ce446227~suvif(WITH_LIBCDR)
a268eb4d3feeb31c3573681214aac856ce446227~suv find_package(LibCDR)
a268eb4d3feeb31c3573681214aac856ce446227~suv if(LIBCDR_FOUND)
012841fa8400d68681dc4b4611fd7a37e9f2d7dchouz set(WITH_LIBCDR00 ${LIBCDR-0.0_FOUND})
012841fa8400d68681dc4b4611fd7a37e9f2d7dchouz set(WITH_LIBCDR01 ${LIBCDR-0.1_FOUND})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND INKSCAPE_INCS_SYS ${LIBCDR_INCLUDE_DIRS})
a268eb4d3feeb31c3573681214aac856ce446227~suv list(APPEND INKSCAPE_LIBS ${LIBCDR_LIBRARIES})
a268eb4d3feeb31c3573681214aac856ce446227~suv add_definitions(${LIBCDR_DEFINITIONS})
a268eb4d3feeb31c3573681214aac856ce446227~suv else()
a268eb4d3feeb31c3573681214aac856ce446227~suv set(WITH_LIBCDR OFF)
a268eb4d3feeb31c3573681214aac856ce446227~suv endif()
a268eb4d3feeb31c3573681214aac856ce446227~suvendif()
a268eb4d3feeb31c3573681214aac856ce446227~suv
846d645a50bd8572a22eb2ca38437b2244de31d9~suvFIND_PACKAGE(JPEG)
846d645a50bd8572a22eb2ca38437b2244de31d9~suvIF(JPEG_FOUND)
846d645a50bd8572a22eb2ca38437b2244de31d9~suv list(APPEND INKSCAPE_INCS_SYS ${JPEG_INCLUDE_DIR})
846d645a50bd8572a22eb2ca38437b2244de31d9~suv list(APPEND INKSCAPE_LIBS ${JPEG_LIBRARIES})
846d645a50bd8572a22eb2ca38437b2244de31d9~suv set(HAVE_JPEG ON)
846d645a50bd8572a22eb2ca38437b2244de31d9~suvENDIF()
b3ee2e647c9b62254ce35e5d8e830441b2368096bryce
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonfind_package(PNG REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${PNG_PNG_INCLUDE_DIR})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS ${PNG_LIBRARY})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
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})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Bartonif(WITH_DBUS)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton find_package(DBus REQUIRED)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton if(DBUS_FOUND)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton list(APPEND INKSCAPE_INCS_SYS ${DBUS_INCLUDE_DIR})
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton list(APPEND INKSCAPE_INCS_SYS ${DBUS_ARCH_INCLUDE_DIR})
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton list(APPEND INKSCAPE_LIBS ${DBUS_LIBRARIES})
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton else()
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton set(WITH_DBUS OFF)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton endif()
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Bartonendif()
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton
14d987a7eb2831892a63e804779b279f0fde3fc8Jon A. Cruzif(WITH_GTEST)
14d987a7eb2831892a63e804779b279f0fde3fc8Jon A. Cruz if(EXISTS "${GMOCK_DIR}" AND IS_DIRECTORY "${GMOCK_DIR}")
14d987a7eb2831892a63e804779b279f0fde3fc8Jon A. Cruz
14d987a7eb2831892a63e804779b279f0fde3fc8Jon A. Cruz else()
14d987a7eb2831892a63e804779b279f0fde3fc8Jon A. Cruz set(WITH_GTEST off)
14d987a7eb2831892a63e804779b279f0fde3fc8Jon A. Cruz endif()
14d987a7eb2831892a63e804779b279f0fde3fc8Jon A. Cruzendif()
14d987a7eb2831892a63e804779b279f0fde3fc8Jon A. Cruz
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# ----------------------------------------------------------------------------
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# CMake's builtin
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# ----------------------------------------------------------------------------
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton# Include dependencies:
f47b2b3d3ec4743574380b7cf46d1c75cf6d252eCampbell Barton# use patched version until GTK2_CAIROMMCONFIG_INCLUDE_DIR is added
4666b23d22584eff7fc4e22649fe8172b4f0bd61Campbell Bartonfind_package(GTK2 COMPONENTS gtk gtkmm REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GDK_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GDKMM_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GDK_PIXBUF_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GDKCONFIG_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GDKMMCONFIG_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GLIB_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GLIBCONFIG_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GLIBMM_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GLIBMMCONFIG_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GTK_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GTKMM_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GTKMMCONFIG_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_ATK_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_ATKMM_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_PANGO_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_PANGOMM_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_PANGOMMCONFIG_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_CAIRO_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_CAIROMM_INCLUDE_DIR}
f47b2b3d3ec4743574380b7cf46d1c75cf6d252eCampbell Barton ${GTK2_CAIROMMCONFIG_INCLUDE_DIR} # <-- not in cmake 2.8.4
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GIOMM_INCLUDE_DIR}
5ad07d9f8a12d76d24a6a8f60f4caa29f2265555Shlomi Fish ${GTK2_GIOMMCONFIG_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_SIGC++_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_SIGC++CONFIG_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton)
f47b2b3d3ec4743574380b7cf46d1c75cf6d252eCampbell Barton
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GDK_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GDKMM_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GDK_PIXBUF_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GLIB_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GLIBMM_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GTK_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GTKMM_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_ATK_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_ATKMM_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_PANGO_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_PANGOMM_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_CAIRO_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_CAIROMM_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GIOMM_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_SIGC++_LIBRARY}
d8c8be7181ee60a1161641c60c946ed17b80fec7Campbell Barton ${GTK2_GOBJECT_LIBRARY}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton
277d64e3473489ba670163810e709eb4bc7cdcdcCampbell Barton
f3f2b5271c51317a23df919fc903a5ec7f2c9df6Campbell Bartonfind_package(Freetype REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${FREETYPE_INCLUDE_DIRS})
f3f2b5271c51317a23df919fc903a5ec7f2c9df6Campbell Bartonlist(APPEND INKSCAPE_LIBS ${FREETYPE_LIBRARIES})
f3f2b5271c51317a23df919fc903a5ec7f2c9df6Campbell Barton
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonfind_package(Boost REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${Boost_INCLUDE_DIRS})
f3f2b5271c51317a23df919fc903a5ec7f2c9df6Campbell Barton# list(APPEND INKSCAPE_LIBS ${Boost_LIBRARIES})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonfind_package(ASPELL)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonif(ASPELL_FOUND)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_INCS_SYS ${ASPELL_INCLUDE_DIR})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_LIBS ${ASPELL_LIBRARIES})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton add_definitions(${ASPELL_DEFINITIONS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton set(HAVE_ASPELL TRUE)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonendif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonif(WITH_GTKSPELL)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton find_package(GtkSpell)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton if(GTKSPELL_FOUND)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_INCS_SYS ${GTKSPELL_INCLUDE_DIR})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_LIBS ${GTKSPELL_LIBRARIES})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton add_definitions(${GTKSPELL_DEFINITIONS})
5c770990150a122eea7a262ac62231ea9bf99858Ken Moffat else()
5c770990150a122eea7a262ac62231ea9bf99858Ken Moffat set(WITH_GTKSPELL OFF)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton endif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonendif()
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
1b4e05608c403a2f2b769fe4823d035cf89111dfbryce#find_package(OpenSSL)
1b4e05608c403a2f2b769fe4823d035cf89111dfbryce#list(APPEND INKSCAPE_INCS_SYS ${OPENSSL_INCLUDE_DIR})
1b4e05608c403a2f2b769fe4823d035cf89111dfbryce#list(APPEND INKSCAPE_LIBS ${OPENSSL_LIBRARIES})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
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 Barton
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})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
2ac06557118f2a6e620402ee9984c1c45d981065~suvif(WITH_OPENMP)
2ac06557118f2a6e620402ee9984c1c45d981065~suv find_package(OpenMP)
f0ec2be2d96b2cd2d1b1dc249ab3c9e4a2194a2a~suv if(OPENMP_FOUND)
2ac06557118f2a6e620402ee9984c1c45d981065~suv set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
2ac06557118f2a6e620402ee9984c1c45d981065~suv set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
2ac06557118f2a6e620402ee9984c1c45d981065~suv if(APPLE AND ${CMAKE_GENERATOR} MATCHES "Xcode")
2ac06557118f2a6e620402ee9984c1c45d981065~suv set(CMAKE_XCODE_ATTRIBUTE_ENABLE_OPENMP_SUPPORT "YES")
2ac06557118f2a6e620402ee9984c1c45d981065~suv endif()
2ac06557118f2a6e620402ee9984c1c45d981065~suv mark_as_advanced(OpenMP_C_FLAGS)
2ac06557118f2a6e620402ee9984c1c45d981065~suv mark_as_advanced(OpenMP_CXX_FLAGS)
2ac06557118f2a6e620402ee9984c1c45d981065~suv # '-fopenmp' is in OpenMP_C_FLAGS, OpenMP_CXX_FLAGS and implies '-lgomp'
2ac06557118f2a6e620402ee9984c1c45d981065~suv # uncomment explicit linking below if still needed:
f0ec2be2d96b2cd2d1b1dc249ab3c9e4a2194a2a~suv set(HAVE_OPENMP ON)
2ac06557118f2a6e620402ee9984c1c45d981065~suv #list(APPEND INKSCAPE_LIBS "-lgomp") # FIXME
2ac06557118f2a6e620402ee9984c1c45d981065~suv else()
f0ec2be2d96b2cd2d1b1dc249ab3c9e4a2194a2a~suv set(HAVE_OPENMP OFF)
2ac06557118f2a6e620402ee9984c1c45d981065~suv set(WITH_OPENMP OFF)
62d49bd575c4bfb0dba9e697f333c2bd2a615f93Jon A. Cruz endif()
e661c64a3dee1421ca5f20d596766d6e5ea5816bCampbell Bartonendif()
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonfind_package(ZLIB REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${ZLIB_INCLUDE_DIRS})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS ${ZLIB_LIBRARIES})
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadow
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suvif(WITH_IMAGE_MAGICK)
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv find_package(ImageMagick COMPONENTS MagickCore Magick++)
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv if(ImageMagick_FOUND)
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv # the component-specific paths apparently fail to get detected correctly
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv # on some linux distros (or with older Cmake versions).
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv # Use variables which list all include dirs and libraries instead:
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv list(APPEND INKSCAPE_INCS_SYS ${ImageMagick_INCLUDE_DIRS})
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv list(APPEND INKSCAPE_LIBS ${ImageMagick_LIBRARIES})
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv # TODO: Cmake's ImageMagick module misses required defines for newer
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv # versions of ImageMagick. See also:
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776832
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv #add_definitions(-DMAGICKCORE_HDRI_ENABLE=0) # FIXME (version check?)
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv #add_definitions(-DMAGICKCORE_QUANTUM_DEPTH=16) # FIXME (version check?)
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv else()
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv set(WITH_IMAGE_MAGICK OFF) # enable 'Extensions > Raster'
1199e9f722122c8583ca8fd4ce76d5c058ba0a43~suv endif()
e661c64a3dee1421ca5f20d596766d6e5ea5816bCampbell Bartonendif()
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
f80e1179eb1764d39518dc458f0e9d1188fc9417Campbell Bartoninclude(${CMAKE_CURRENT_LIST_DIR}/IncludeJava.cmake)
72f94547e31c3584590f10d737d53cecab94092chouz
72f94547e31c3584590f10d737d53cecab94092chouzset(ENABLE_NLS OFF)
72f94547e31c3584590f10d737d53cecab94092chouzif(WITH_NLS)
72f94547e31c3584590f10d737d53cecab94092chouz find_package(Gettext)
72f94547e31c3584590f10d737d53cecab94092chouz if(GETTEXT_FOUND)
72f94547e31c3584590f10d737d53cecab94092chouz message(STATUS "Found gettext + msgfmt to convert language files. Translation enabled")
72f94547e31c3584590f10d737d53cecab94092chouz set(ENABLE_NLS ON)
72f94547e31c3584590f10d737d53cecab94092chouz else(GETTEXT_FOUND)
72f94547e31c3584590f10d737d53cecab94092chouz message(STATUS "Cannot find gettext + msgfmt to convert language file. Translation won't be enabled")
72f94547e31c3584590f10d737d53cecab94092chouz endif(GETTEXT_FOUND)
72f94547e31c3584590f10d737d53cecab94092chouzendif(WITH_NLS)
72f94547e31c3584590f10d737d53cecab94092chouz
72f94547e31c3584590f10d737d53cecab94092chouz
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton# end Dependencies
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
d28339d35a0e8b28ef7b0f098577c852dec19384houzlist(REMOVE_DUPLICATES INKSCAPE_LIBS)
d28339d35a0e8b28ef7b0f098577c852dec19384houzlist(REMOVE_DUPLICATES INKSCAPE_INCS_SYS)
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadow
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# C/C++ Flags
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartoninclude_directories(${INKSCAPE_INCS})
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartoninclude_directories(SYSTEM ${INKSCAPE_INCS_SYS})
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton
63356e2fca83eaeb83557dcb312c39ea133569aahouzinclude(${CMAKE_CURRENT_LIST_DIR}/ConfigChecks.cmake)
63356e2fca83eaeb83557dcb312c39ea133569aahouz
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonunset(INKSCAPE_INCS)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonunset(INKSCAPE_INCS_SYS)