DefineDependsandFlags.cmake revision 14d987a7eb2831892a63e804779b279f0fde3fc8
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadow
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonset(INKSCAPE_LIBS "")
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonset(INKSCAPE_INCS "")
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonset(INKSCAPE_INCS_SYS "")
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_INCS ${PROJECT_SOURCE_DIR}
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton ${PROJECT_SOURCE_DIR}/src
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton # generated includes
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton ${CMAKE_BINARY_DIR}/include
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton# ----------------------------------------------------------------------------
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# Files we include
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# ----------------------------------------------------------------------------
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonfind_package(GSL REQUIRED)
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadowlist(APPEND INKSCAPE_INCS_SYS ${GSL_INCLUDE_DIRS})
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonlist(APPEND INKSCAPE_LIBS ${GSL_LIBRARIES})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonif (WIN32)
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 Bartonelseif(APPLE)
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 endif()
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 endif()
cdc60c622d70859a52693bd71ab473c5dad37eefCampbell Bartonelse()
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
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonendif()
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonif(NOT APPLE)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton # FIXME: should depend on availability of OpenMP support (see below) (?)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton list(APPEND INKSCAPE_LIBS "-lgomp") # FIXME
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonendif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonlist(APPEND INKSCAPE_LIBS "-lgslcblas") # FIXME
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton
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 else()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton set(WITH_GNOME_VFS OFF)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton endif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonendif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton
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 else()
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 else()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton set(ENABLE_LCMS OFF)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton endif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton endif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonendif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton
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 Barton
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})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton
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 Barton
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 endif()
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton if(POPPLER_GLIB_FOUND AND CAIRO_SVG_FOUND)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton set(HAVE_POPPLER_GLIB ON)
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton endif()
a9364748fcbe81592d380ffa00b8ec000e308c5fCampbell Barton endif()
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)
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton endif()
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)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton endif()
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 endif()
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 endif()
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 endif()
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 endif()
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton else()
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(ENABLE_POPPLER_CAIRO OFF)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton endif()
f47b2b3d3ec4743574380b7cf46d1c75cf6d252eCampbell Bartonelse()
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(HAVE_POPPLER OFF)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(ENABLE_POPPLER_CAIRO OFF)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonendif()
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton
f47b2b3d3ec4743574380b7cf46d1c75cf6d252eCampbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${POPPLER_INCLUDE_DIRS})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_LIBS ${POPPLER_LIBRARIES})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonadd_definitions(${POPPLER_DEFINITIONS})
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton
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 else()
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton set(WITH_LIBWPG OFF)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton endif()
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonendif()
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton
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})
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton else()
f3f2b5271c51317a23df919fc903a5ec7f2c9df6Campbell Barton set(WITH_LIBVISIO OFF)
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton endif()
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonendif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton
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 else()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton set(WITH_LIBCDR OFF)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton endif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Bartonendif()
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell BartonFIND_PACKAGE(JPEG REQUIRED)
c43e8c459ef8a48adf6b336c1a8a13cfe0415065Campbell Barton#IF(JPEG_FOUND)
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton #INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR})
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadow #TARGET_LINK_LIBRARIES(mpo ${JPEG_LIBRARIES})
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton#ENDIF()
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${JPEG_INCLUDE_DIR})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonlist(APPEND INKSCAPE_LIBS ${JPEG_LIBRARIES})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonfind_package(PNG REQUIRED)
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonlist(APPEND INKSCAPE_INCS_SYS ${PNG_PNG_INCLUDE_DIR})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Bartonlist(APPEND INKSCAPE_LIBS ${PNG_LIBRARY})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
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})
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
e661c64a3dee1421ca5f20d596766d6e5ea5816bCampbell Bartonif(WITH_DBUS)
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 else()
62d49bd575c4bfb0dba9e697f333c2bd2a615f93Jon A. Cruz set(WITH_DBUS OFF)
62d49bd575c4bfb0dba9e697f333c2bd2a615f93Jon A. Cruz endif()
e661c64a3dee1421ca5f20d596766d6e5ea5816bCampbell Bartonendif()
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Bartonif(WITH_GTEST)
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Barton if(EXISTS "${GMOCK_DIR}" AND IS_DIRECTORY "${GMOCK_DIR}")
71ea20454af9348248ee3726f4fb8edb69e07677Campbell Barton
26127d370fcaac55880cfde4598d5dcf3febef54verbalshadow else()
62d49bd575c4bfb0dba9e697f333c2bd2a615f93Jon A. Cruz set(WITH_GTEST off)
62d49bd575c4bfb0dba9e697f333c2bd2a615f93Jon A. Cruz endif()
2464c7b8a032adea93b775d732db2eedf19f6098Campbell Bartonendif()
62d49bd575c4bfb0dba9e697f333c2bd2a615f93Jon A. Cruz
e661c64a3dee1421ca5f20d596766d6e5ea5816bCampbell Barton# ----------------------------------------------------------------------------
874cad03a8450ed3464f6dfae2eb16108bec5bbdCampbell Barton# CMake's builtin
f80e1179eb1764d39518dc458f0e9d1188fc9417Campbell Barton# ----------------------------------------------------------------------------
71ea20454af9348248ee3726f4fb8edb69e07677Campbell 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}
${GTK2_GLIBCONFIG_INCLUDE_DIR}
${GTK2_GLIBMM_INCLUDE_DIR}
${GTK2_GLIBMMCONFIG_INCLUDE_DIR}
${GTK2_GTK_INCLUDE_DIR}
${GTK2_GTKMM_INCLUDE_DIR}
${GTK2_GTKMMCONFIG_INCLUDE_DIR}
${GTK2_ATK_INCLUDE_DIR}
${GTK2_ATKMM_INCLUDE_DIR}
${GTK2_PANGO_INCLUDE_DIR}
${GTK2_PANGOMM_INCLUDE_DIR}
${GTK2_PANGOMMCONFIG_INCLUDE_DIR}
${GTK2_CAIRO_INCLUDE_DIR}
${GTK2_CAIROMM_INCLUDE_DIR}
${GTK2_CAIROMMCONFIG_INCLUDE_DIR} # <-- not in cmake 2.8.4
${GTK2_GIOMM_INCLUDE_DIR}
${GTK2_GIOMMCONFIG_INCLUDE_DIR}
${GTK2_SIGC++_INCLUDE_DIR}
${GTK2_SIGC++CONFIG_INCLUDE_DIR}
)
list(APPEND INKSCAPE_LIBS
${GTK2_GDK_LIBRARY}
${GTK2_GDKMM_LIBRARY}
${GTK2_GDK_PIXBUF_LIBRARY}
${GTK2_GLIB_LIBRARY}
${GTK2_GLIBMM_LIBRARY}
${GTK2_GTK_LIBRARY}
${GTK2_GTKMM_LIBRARY}
${GTK2_ATK_LIBRARY}
${GTK2_ATKMM_LIBRARY}
${GTK2_PANGO_LIBRARY}
${GTK2_PANGOMM_LIBRARY}
${GTK2_CAIRO_LIBRARY}
${GTK2_CAIROMM_LIBRARY}
${GTK2_GIOMM_LIBRARY}
${GTK2_SIGC++_LIBRARY}
${GTK2_GOBJECT_LIBRARY}
)
find_package(Freetype REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${FREETYPE_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${FREETYPE_LIBRARIES})
find_package(Boost REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${Boost_INCLUDE_DIRS})
# list(APPEND INKSCAPE_LIBS ${Boost_LIBRARIES})
find_package(ASPELL)
if(ASPELL_FOUND)
list(APPEND INKSCAPE_INCS_SYS ${ASPELL_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${ASPELL_LIBRARIES})
add_definitions(${ASPELL_DEFINITIONS})
set(HAVE_ASPELL TRUE)
endif()
if(WITH_GTKSPELL)
find_package(GtkSpell)
if(GTKSPELL_FOUND)
list(APPEND INKSCAPE_INCS_SYS ${GTKSPELL_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${GTKSPELL_LIBRARIES})
add_definitions(${GTKSPELL_DEFINITIONS})
endif()
set(WITH_GTKSPELL ${GTKSPELL_FOUND})
endif()
#find_package(OpenSSL)
#list(APPEND INKSCAPE_INCS_SYS ${OPENSSL_INCLUDE_DIR})
#list(APPEND INKSCAPE_LIBS ${OPENSSL_LIBRARIES})
find_package(LibXslt REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${LIBXSLT_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${LIBXSLT_LIBRARIES})
add_definitions(${LIBXSLT_DEFINITIONS})
find_package(LibXml2 REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${LIBXML2_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${LIBXML2_LIBRARIES})
add_definitions(${LIBXML2_DEFINITIONS})
find_package(OpenMP)
if(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})
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?)
endif()
include(${CMAKE_CURRENT_LIST_DIR}/IncludeJava.cmake)
# end Dependencies
# 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)