DefineDependsandFlags.cmake revision f3f2b5271c51317a23df919fc903a5ec7f2c9df6
set(INKSCAPE_INCS
${CMAKE_BINARY_DIR}
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/src
)
set(INKSCAPE_LIBS "")
# ----------------------------------------------------------------------------
# Files we include
# ----------------------------------------------------------------------------
find_package(GSL REQUIRED)
list(APPEND INKSCAPE_INCS ${GSL_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${GSL_LIBRARIES})
list(APPEND INKSCAPE_LIBS "-lgslcblas") # FIXME
find_package(GnomeVFS2)
list(APPEND INKSCAPE_INCS ${GNOMEVFS2_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${GNOMEVFS-2_LIBRARY})
find_package(BoehmGC REQUIRED)
list(APPEND INKSCAPE_INCS ${BOEHMGC_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${BOEHMGC_LIBRARIES})
add_definitions(${BOEHMGC_DEFINITIONS})
find_package(LibWPG)
find_package(PNG REQUIRED)
list(APPEND INKSCAPE_INCS ${PNG_PNG_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${PNG_LIBRARY})
find_package(Popt REQUIRED)
list(APPEND INKSCAPE_INCS ${POPT_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${POPT_LIBRARIES})
add_definitions(${POPT_DEFINITIONS})
# ----------------------------------------------------------------------------
# CMake's builtin
# ----------------------------------------------------------------------------
# Include dependencies:
find_package(GTK2 COMPONENTS gtk gtkmm REQUIRED)
list(APPEND INKSCAPE_INCS
${GTK2_GDK_INCLUDE_DIR}
${GTK2_GDKMM_INCLUDE_DIR}
${GTK2_GDK_PIXBUF_INCLUDE_DIR}
${GTK2_GDKCONFIG_INCLUDE_DIR}
${GTK2_GDKMMCONFIG_INCLUDE_DIR}
${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_GIOMM_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}
)
find_package(Freetype REQUIRED)
list(APPEND INKSCAPE_INCS ${FREETYPE_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${FREETYPE_LIBRARIES})
find_package(Boost REQUIRED)
list(APPEND INKSCAPE_INCS ${Boost_INCLUDE_DIRS})
# list(APPEND INKSCAPE_LIBS ${Boost_LIBRARIES})
find_package(ASPELL)
list(APPEND INKSCAPE_INCS ${ASPELL_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${ASPELL_LIBRARIES})
add_definitions(${ASPELL_DEFINITIONS})
find_package(OpenSSL)
list(APPEND INKSCAPE_INCS ${OPENSSL_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${OPENSSL_LIBRARIES})
find_package(LibXslt REQUIRED)
list(APPEND INKSCAPE_INCS ${LIBXSLT_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${LIBXSLT_LIBRARIES})
add_definitions(${LIBXSLT_DEFINITIONS})
find_package(LibXml2 REQUIRED)
list(APPEND INKSCAPE_INCS ${LIBXML2_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${LIBXML2_LIBRARIES})
add_definitions(${LIBXML2_DEFINITIONS})
find_package(OpenMP REQUIRED) # cmake's
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)
find_package(ZLIB REQUIRED)
list(APPEND INKSCAPE_INCS ${ZLIB_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${ZLIB_LIBRARIES})
find_package(ImageMagick COMPONENTS MagickCore Magick++ REQUIRED)
list(APPEND INKSCAPE_INCS ${ImageMagick_MagickCore_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${ImageMagick_Magick++_LIBRARY})
include(IncludeJava)
# end Dependencies
# message(FATAL_ERROR "Whee: ${INKSCAPE_INCS}")
# message(FATAL_ERROR "Whee: ${INKSCAPE_LIBS}")
# message(FATAL_ERROR "Whee: ${INKSCAPE_LINK_DIRS}")
# C/C++ Flags
include_directories(${INKSCAPE_INCS})
unset(INKSCAPE_INCS)
include(ConfigChecks)