DefineDependsandFlags.cmake revision 14d987a7eb2831892a63e804779b279f0fde3fc8
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonset(INKSCAPE_LIBS "")
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonset(INKSCAPE_INCS "")
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonset(INKSCAPE_INCS_SYS "")
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS ${PROJECT_SOURCE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${PROJECT_SOURCE_DIR}/src
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton # generated includes
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton ${CMAKE_BINARY_DIR}/include
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton# ----------------------------------------------------------------------------
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# Files we include
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# ----------------------------------------------------------------------------
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonfind_package(GSL REQUIRED)
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadowlist(APPEND INKSCAPE_INCS_SYS ${GSL_INCLUDE_DIRS})
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_LIBS ${GSL_LIBRARIES})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton list(APPEND INKSCAPE_LIBS "-L$ENV{DEVLIBS_PATH}/lib") # FIXME
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton list(APPEND INKSCAPE_LIBS "-lpangocairo-1.0.dll") # FIXME
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton list(APPEND INKSCAPE_LIBS "-lpangoft2-1.0.dll") # FIXME
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton list(APPEND INKSCAPE_LIBS "-lpangowin32-1.0.dll") # FIXME
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton list(APPEND INKSCAPE_LIBS "-lgthread-2.0.dll") # FIXME
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton if(DEFINED ENV{CMAKE_PREFIX_PATH})
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton # Adding the library search path explicitly seems not required
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton # if MacPorts is installed in default prefix ('/opt/local') -
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton # Cmake then can rely on the hard-coded paths in its modules.
7e14cb7b914c462b0bc1069cedb30c8e064ec43eCampbell Barton # Only prepend search path if $CMAKE_PREFIX_PATH is defined:
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton list(APPEND INKSCAPE_LIBS "-L$ENV{CMAKE_PREFIX_PATH}/lib") # FIXME
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Barton list(APPEND INKSCAPE_LIBS "-lpangocairo-1.0") # FIXME
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Barton list(APPEND INKSCAPE_LIBS "-lpangoft2-1.0") # FIXME
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Barton list(APPEND INKSCAPE_LIBS "-lfontconfig") # FIXME
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Barton if(${GTK+_2.0_TARGET} MATCHES "x11")
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Barton # only link X11 if using X11 backend of GTK2
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Barton list(APPEND INKSCAPE_LIBS "-lX11") # FIXME
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Barton list(APPEND INKSCAPE_LIBS "-ldl") # FIXME
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Barton list(APPEND INKSCAPE_LIBS "-lpangocairo-1.0") # FIXME
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadow list(APPEND INKSCAPE_LIBS "-lpangoft2-1.0") # FIXME
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton list(APPEND INKSCAPE_LIBS "-lfontconfig") # FIXME
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton list(APPEND INKSCAPE_LIBS "-lX11") # FIXME
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton # FIXME: should depend on availability of OpenMP support (see below) (?)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_LIBS "-lgomp") # FIXME
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonlist(APPEND INKSCAPE_LIBS "-lgslcblas") # FIXME
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonif(WITH_GNOME_VFS)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton find_package(GnomeVFS2)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton if(GNOMEVFS2_FOUND)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_INCS_SYS ${GNOMEVFS2_INCLUDE_DIR})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_LIBS ${GNOMEVFS-2_LIBRARY})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton set(WITH_GNOME_VFS OFF)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonif(ENABLE_LCMS)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton find_package(LCMS2)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton if(LCMS2_FOUND)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_INCS_SYS ${LCMS2_INCLUDE_DIRS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_LIBS ${LCMS2_LIBRARIES})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton add_definitions(${LCMS2_DEFINITIONS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton set (HAVE_LIBLCMS2 1)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton find_package(LCMS)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton if(LCMS_FOUND)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_INCS_SYS ${LCMS_INCLUDE_DIRS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_LIBS ${LCMS_LIBRARIES})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton add_definitions(${LCMS_DEFINITIONS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton set (HAVE_LIBLCMS1 1)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton set(ENABLE_LCMS OFF)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonfind_package(Iconv REQUIRED)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${ICONV_INCLUDE_DIRS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonlist(APPEND INKSCAPE_LIBS ${ICONV_LIBRARIES})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonadd_definitions(${ICONV_DEFINITIONS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonfind_package(Intl REQUIRED)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${Intl_INCLUDE_DIRS})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonlist(APPEND INKSCAPE_LIBS ${Intl_LIBRARIES})
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonadd_definitions(${Intl_DEFINITIONS})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonfind_package(BoehmGC REQUIRED)
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadowlist(APPEND INKSCAPE_INCS_SYS ${BOEHMGC_INCLUDE_DIRS})
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_LIBS ${BOEHMGC_LIBRARIES})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonadd_definitions(${BOEHMGC_DEFINITIONS})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonif(ENABLE_POPPLER)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton find_package(PopplerCairo)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton if(POPPLER_FOUND)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton set(HAVE_POPPLER ON)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton if(ENABLE_POPPLER_CAIRO)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton if(POPPLER_CAIRO_FOUND AND POPPLER_GLIB_FOUND)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton set(HAVE_POPPLER_CAIRO ON)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton if(POPPLER_GLIB_FOUND AND CAIRO_SVG_FOUND)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton set(HAVE_POPPLER_GLIB ON)
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton if(POPPLER_VERSION VERSION_GREATER "0.8.3" OR
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton POPPLER_VERSION VERSION_EQUAL "0.8.3")
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton set(POPPLER_NEW_GFXFONT ON)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton if(POPPLER_VERSION VERSION_GREATER "0.12.2" OR
f47b2b3d3ec4743574380b7cf46d1c75cf6d252eCampbell Barton POPPLER_VERSION VERSION_EQUAL "0.12.2")
4666b23d22584eff7fc4e22649fe8172b4f0bd61Campbell Barton set(POPPLER_NEW_COLOR_SPACE_API ON)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton if(POPPLER_VERSION VERSION_GREATER "0.26.0" OR
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton POPPLER_VERSION VERSION_EQUAL "0.26.0")
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(POPPLER_EVEN_NEWER_COLOR_SPACE_API ON)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton if(POPPLER_VERSION VERSION_GREATER "0.29.0" OR
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton POPPLER_VERSION VERSION_EQUAL "0.29.0")
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API ON)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton if(POPPLER_VERSION VERSION_GREATER "0.15.1" OR
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton POPPLER_VERSION VERSION_EQUAL "0.15.1")
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(POPPLER_NEW_GFXPATCH ON)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton if(POPPLER_VERSION VERSION_GREATER "0.20.0" OR
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton POPPLER_VERSION VERSION_EQUAL "0.20.0")
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(POPPLER_NEW_ERRORAPI ON)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(ENABLE_POPPLER_CAIRO OFF)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(HAVE_POPPLER OFF)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(ENABLE_POPPLER_CAIRO OFF)
f47b2b3d3ec4743574380b7cf46d1c75cf6d252eCampbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${POPPLER_INCLUDE_DIRS})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS ${POPPLER_LIBRARIES})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonadd_definitions(${POPPLER_DEFINITIONS})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonif(WITH_LIBWPG)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton find_package(LibWPG)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton if(LIBWPG_FOUND)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(WITH_LIBWPG01 ${LIBWPG-0.1_FOUND})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(WITH_LIBWPG02 ${LIBWPG-0.2_FOUND})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(WITH_LIBWPG03 ${LIBWPG-0.3_FOUND})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton list(APPEND INKSCAPE_INCS_SYS ${LIBWPG_INCLUDE_DIRS})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton list(APPEND INKSCAPE_LIBS ${LIBWPG_LIBRARIES})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton add_definitions(${LIBWPG_DEFINITIONS})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(WITH_LIBWPG OFF)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonif(WITH_LIBVISIO)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton find_package(LibVisio)
277d64e3473489ba670163810e709eb4bc7cdcdcCampbell Barton if(LIBVISIO_FOUND)
f3f2b5271c51317a23df919fc903a5ec7f2c9df6Campbell Barton set(WITH_LIBVISIO00 ${LIBVISIO-0.0_FOUND})
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton set(WITH_LIBVISIO01 ${LIBVISIO-0.1_FOUND})
f3f2b5271c51317a23df919fc903a5ec7f2c9df6Campbell Barton list(APPEND INKSCAPE_INCS_SYS ${LIBVISIO_INCLUDE_DIRS})
f3f2b5271c51317a23df919fc903a5ec7f2c9df6Campbell Barton list(APPEND INKSCAPE_LIBS ${LIBVISIO_LIBRARIES})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton add_definitions(${LIBVISIO_DEFINITIONS})
f3f2b5271c51317a23df919fc903a5ec7f2c9df6Campbell Barton set(WITH_LIBVISIO OFF)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonif(WITH_LIBCDR)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton find_package(LibCDR)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton if(LIBCDR_FOUND)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton set(WITH_LIBCDR00 ${LIBVISIO-0.0_FOUND})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton set(WITH_LIBCDR01 ${LIBVISIO-0.1_FOUND})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_INCS_SYS ${LIBCDR_INCLUDE_DIRS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_LIBS ${LIBCDR_LIBRARIES})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton add_definitions(${LIBCDR_DEFINITIONS})
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton set(WITH_LIBCDR OFF)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell BartonFIND_PACKAGE(JPEG REQUIRED)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton#IF(JPEG_FOUND)
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton #INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR})
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadow #TARGET_LINK_LIBRARIES(mpo ${JPEG_LIBRARIES})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${JPEG_INCLUDE_DIR})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonlist(APPEND INKSCAPE_LIBS ${JPEG_LIBRARIES})
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonfind_package(PNG REQUIRED)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${PNG_PNG_INCLUDE_DIR})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonlist(APPEND INKSCAPE_LIBS ${PNG_LIBRARY})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonfind_package(Popt REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${POPT_INCLUDE_DIR})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS ${POPT_LIBRARIES})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonadd_definitions(${POPT_DEFINITIONS})
62d49bd575c4bfb0dba9e697f333c2bd2a615f93Jon A. Cruz find_package(DBus REQUIRED)
62d49bd575c4bfb0dba9e697f333c2bd2a615f93Jon A. Cruz if(DBUS_FOUND)
62d49bd575c4bfb0dba9e697f333c2bd2a615f93Jon A. Cruz list(APPEND INKSCAPE_INCS_SYS ${DBUS_INCLUDE_DIR})
62d49bd575c4bfb0dba9e697f333c2bd2a615f93Jon A. Cruz list(APPEND INKSCAPE_INCS_SYS ${DBUS_ARCH_INCLUDE_DIR})
62d49bd575c4bfb0dba9e697f333c2bd2a615f93Jon A. Cruz list(APPEND INKSCAPE_LIBS ${DBUS_LIBRARIES})
62d49bd575c4bfb0dba9e697f333c2bd2a615f93Jon A. Cruz set(WITH_DBUS OFF)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonif(WITH_GTEST)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton if(EXISTS "${GMOCK_DIR}" AND IS_DIRECTORY "${GMOCK_DIR}")
62d49bd575c4bfb0dba9e697f333c2bd2a615f93Jon A. Cruz set(WITH_GTEST off)
e661c64a3dee1421ca5f20d596766d6e5ea5816bCampbell Barton# ----------------------------------------------------------------------------
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# CMake's builtin
f80e1179eb1764d39518dc458f0e9d1188fc9417Campbell Barton# ----------------------------------------------------------------------------
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# Include dependencies:
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadow# use patched version until GTK2_CAIROMMCONFIG_INCLUDE_DIR is added
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonfind_package(GTK2 COMPONENTS gtk gtkmm REQUIRED)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton ${GTK2_GDK_INCLUDE_DIR}
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton ${GTK2_GDKMM_INCLUDE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${GTK2_GDK_PIXBUF_INCLUDE_DIR}
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton ${GTK2_GDKCONFIG_INCLUDE_DIR}
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton ${GTK2_GDKMMCONFIG_INCLUDE_DIR}
f80e1179eb1764d39518dc458f0e9d1188fc9417Campbell Barton ${GTK2_GLIB_INCLUDE_DIR}
include(${CMAKE_CURRENT_LIST_DIR}/IncludeJava.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/ConfigChecks.cmake)