387N/Aset(INKSCAPE_INCS_SYS "")
387N/Aset(INKSCAPE_CXX_FLAGS "")
387N/Alist(APPEND INKSCAPE_INCS ${PROJECT_SOURCE_DIR}
387N/A ${PROJECT_SOURCE_DIR}/src
387N/A ${CMAKE_BINARY_DIR}/include
387N/A# ----------------------------------------------------------------------------
387N/A# ----------------------------------------------------------------------------
387N/A message("---------------- BEGIN: Win32 ----------------")
387N/A # The name of the target operating system
387N/A set(CMAKE_SYSTEM_NAME Windows)
387N/A message("CMAKE_SYSTEM_NAME: " ${CMAKE_SYSTEM_NAME})
387N/A set(CMAKE_C_COMPILER gcc)
387N/A set(CMAKE_CXX_COMPILER g++)
387N/A set(CMAKE_RC_COMPILER windres)
811N/A # Adjust the command line parameters for windres to the verion of MinGW.
387N/A set(CMAKE_RC_COMPILER_INIT windres)
387N/A set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff -i <SOURCE> -o <OBJECT>")
844N/A # Here is the target environment located
387N/A set(CMAKE_FIND_ROOT_PATH $ENV{MINGW_PATH}/mingw64/)
387N/A message("CMAKE_FIND_ROOT_PATH: " ${CMAKE_FIND_ROOT_PATH})
2899N/A # Tweak CMake into using Unix-style library names.
387N/A set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
387N/A #set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a" "
.dll.a")
387N/A message("CMAKE_FIND_LIBRARY_PREFIXES: " ${CMAKE_FIND_LIBRARY_PREFIXES})
387N/A message("CMAKE_FIND_LIBRARY_SUFFIXES: " ${CMAKE_FIND_LIBRARY_SUFFIXES})
1542N/A message("SDL_INCLUDE_DIR: " ${SDL_INCLUDE_DIR})
387N/A #if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd64")
387N/A link_directories($ENV{DEVLIBS_PATH}/lib)
387N/A link_directories($ENV{WINDIR}/system32)
3353N/A get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
387N/A message("CMAKE_INCLUDE_DIR:" ${dir})
1542N/A add_definitions(-DFLT_EPSILON=1e-9)
387N/A add_definitions(-DFLT_MAX=1e+37)
3353N/A add_definitions(-DFLT_MIN=1e-37)
387N/A list(APPEND INKSCAPE_LIBS "-lgomp")
387N/A list(APPEND INKSCAPE_LIBS "-lwinpthread")
387N/A list(APPEND INKSCAPE_LIBS "-lmscms")
list(APPEND INKSCAPE_CXX_FLAGS "-mwindows")
list(APPEND INKSCAPE_CXX_FLAGS "-mthreads")
list(APPEND INKSCAPE_CXX_FLAGS "-m64")
# Try to compile using C++ 11.
set(CMAKE_CXX_STANDARD 11)
message("CMAKE_CXX_STANDARD: " ${CMAKE_CXX_STANDARD})
message("---------------- END: Win32 ----------------")
pkg_check_modules(INKSCAPE_DEP REQUIRED pangocairo pangoft2 fontconfig gthread-2.0 gsl gmodule-2.0)
list(APPEND INKSCAPE_LIBS ${INKSCAPE_DEP_LDFLAGS})
list(APPEND INKSCAPE_INCS_SYS ${INKSCAPE_DEP_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${INKSCAPE_DEP_LIBRARIES})
add_definitions(${INKSCAPE_DEP_CFLAGS_OTHER})
if(APPLE AND DEFINED ENV{CMAKE_PREFIX_PATH})
list(APPEND INKSCAPE_LIBS "-L$ENV{CMAKE_PREFIX_PATH}/lib")
if(${GTK+_2.0_TARGET} MATCHES "x11")
pkg_check_modules(x11 REQUIRED x11)
list(APPEND INKSCAPE_LIBS ${x11_LDFLAGS})
pkg_check_modules(x11 REQUIRED x11)
list(APPEND INKSCAPE_LIBS ${x11_LDFLAGS})
list(APPEND INKSCAPE_INCS_SYS ${GNOMEVFS2_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${GNOMEVFS-2_LIBRARY})
list(APPEND INKSCAPE_INCS_SYS ${LCMS2_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${LCMS2_LIBRARIES})
add_definitions(${LCMS2_DEFINITIONS})
list(APPEND INKSCAPE_INCS_SYS ${LCMS_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${LCMS_LIBRARIES})
add_definitions(${LCMS_DEFINITIONS})
find_package(Iconv REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${ICONV_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${ICONV_LIBRARIES})
add_definitions(${ICONV_DEFINITIONS})
find_package(Intl REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${Intl_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${Intl_LIBRARIES})
add_definitions(${Intl_DEFINITIONS})
find_package(BoehmGC REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${BOEHMGC_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${BOEHMGC_LIBRARIES})
add_definitions(${BOEHMGC_DEFINITIONS})
find_package(PopplerCairo)
if(POPPLER_CAIRO_FOUND AND POPPLER_GLIB_FOUND)
set(HAVE_POPPLER_CAIRO ON)
if(POPPLER_GLIB_FOUND AND CAIRO_SVG_FOUND)
set(HAVE_POPPLER_GLIB ON)
if(POPPLER_VERSION VERSION_GREATER "0.26.0" OR
POPPLER_VERSION VERSION_EQUAL "0.26.0")
set(POPPLER_EVEN_NEWER_COLOR_SPACE_API ON)
if(POPPLER_VERSION VERSION_GREATER "0.29.0" OR
POPPLER_VERSION VERSION_EQUAL "0.29.0")
set(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API ON)
set(ENABLE_POPPLER_CAIRO OFF)
set(ENABLE_POPPLER_CAIRO OFF)
list(APPEND INKSCAPE_INCS_SYS ${POPPLER_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${POPPLER_LIBRARIES})
add_definitions(${POPPLER_DEFINITIONS})
set(WITH_LIBWPG01 ${LIBWPG-0.1_FOUND})
set(WITH_LIBWPG02 ${LIBWPG-0.2_FOUND})
set(WITH_LIBWPG03 ${LIBWPG-0.3_FOUND})
list(APPEND INKSCAPE_INCS_SYS ${LIBWPG_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${LIBWPG_LIBRARIES})
add_definitions(${LIBWPG_DEFINITIONS})
set(WITH_LIBVISIO00 ${LIBVISIO-0.0_FOUND})
set(WITH_LIBVISIO01 ${LIBVISIO-0.1_FOUND})
list(APPEND INKSCAPE_INCS_SYS ${LIBVISIO_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${LIBVISIO_LIBRARIES})
add_definitions(${LIBVISIO_DEFINITIONS})
set(WITH_LIBCDR00 ${LIBCDR-0.0_FOUND})
set(WITH_LIBCDR01 ${LIBCDR-0.1_FOUND})
list(APPEND INKSCAPE_INCS_SYS ${LIBCDR_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${LIBCDR_LIBRARIES})
add_definitions(${LIBCDR_DEFINITIONS})
list(APPEND INKSCAPE_INCS_SYS ${JPEG_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${JPEG_LIBRARIES})
find_package(PNG REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${PNG_PNG_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${PNG_LIBRARY})
find_package(Popt REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${POPT_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${POPT_LIBRARIES})
add_definitions(${POPT_DEFINITIONS})
list(APPEND INKSCAPE_INCS_SYS ${POTRACE_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${POTRACE_LIBRARIES})
add_definitions(-DHAVE_POTRACE)
message(STATUS "Could not locate the Potrace library headers: the Trace Bitmap and Paintbucket tools will be disabled")
find_package(DBus REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${DBUS_INCLUDE_DIR})
list(APPEND INKSCAPE_INCS_SYS ${DBUS_ARCH_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${DBUS_LIBRARIES})
if(EXISTS "${GMOCK_DIR}" AND IS_DIRECTORY "${GMOCK_DIR}")
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# use patched version until GTK2_CAIROMMCONFIG_INCLUDE_DIR is added
if("${WITH_GTK3_EXPERIMENTAL}")
message("Using EXPERIMENTAL Gtkmm 3 build")
list(APPEND INKSCAPE_CXX_FLAGS ${GTK3_CFLAGS_OTHER})
message("Using external GDL")
# Check whether we can use new features in Gtkmm 3.10
# TODO: Drop this test and bump the version number in the GTK test above
# as soon as all supported distributions provide Gtkmm >= 3.10
pkg_check_modules(GTKMM_3_10
if("${GTKMM_3_10_FOUND}")
message("Using Gtkmm 3.10 build")
pkg_check_modules(GDL_3_6 gdl-3.0>=3.6)
message("Using Gdl 3.6 or higher")
pkg_check_modules(GTKSPELL3 gtkspell3-3.0)
message("Using GtkSpell3 3.0")
list(APPEND INKSCAPE_INCS_SYS
${GTKSPELL3_INCLUDE_DIRS}
list(APPEND INKSCAPE_LIBS
pkg_check_modules(GTK REQUIRED
list(APPEND INKSCAPE_CXX_FLAGS ${GTK_CFLAGS_OTHER})
pkg_check_modules(GTKSPELL2 gtkspell-2.0)
message("Using GtkSpell3 3.0")
add_definitions(${GTK_CFLAGS_OTHER})
list(APPEND INKSCAPE_INCS_SYS
list(APPEND INKSCAPE_LIBS
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})
list(APPEND INKSCAPE_INCS_SYS ${ASPELL_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${ASPELL_LIBRARIES})
add_definitions(${ASPELL_DEFINITIONS})
if("${TRY_GTKSPELL}" AND "${WITH_GTKSPELL}")
list(APPEND INKSCAPE_INCS_SYS ${GTKSPELL_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${GTKSPELL_LIBRARIES})
add_definitions(${GTKSPELL_DEFINITIONS})
#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})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
list(APPEND INKSCAPE_CXX_FLAGS ${OpenMP_CXX_FLAGS})
if(APPLE AND ${CMAKE_GENERATOR} MATCHES "Xcode")
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_OPENMP_SUPPORT "YES")
mark_as_advanced(OpenMP_C_FLAGS)
mark_as_advanced(OpenMP_CXX_FLAGS)
# '-fopenmp' is in OpenMP_C_FLAGS, OpenMP_CXX_FLAGS and implies '-lgomp'
# uncomment explicit linking below if still needed:
#list(APPEND INKSCAPE_LIBS "-lgomp") # FIXME
find_package(ZLIB REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${ZLIB_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${ZLIB_LIBRARIES})
pkg_check_modules(ImageMagick ImageMagick MagickCore Magick++ )
list(APPEND INKSCAPE_LIBS ${ImageMagick_LDFLAGS})
add_definitions(${ImageMagick_CFLAGS_OTHER})
list(APPEND INKSCAPE_INCS_SYS ${ImageMagick_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${ImageMagick_LIBRARIES})
set(WITH_IMAGE_MAGICK OFF) # enable 'Extensions > Raster'
message(STATUS "Found gettext + msgfmt to convert language files. Translation enabled")
message(STATUS "Cannot find gettext + msgfmt to convert language file. Translation won't be enabled")
pkg_check_modules(SIGC++ REQUIRED sigc++-2.0 )
list(APPEND INKSCAPE_LIBS ${SIGC++_LDFLAGS})
list(APPEND INKSCAPE_CXX_FLAGS ${SIGC++_CFLAGS_OTHER})
list(REMOVE_DUPLICATES INKSCAPE_CXX_FLAGS)
foreach(flag ${INKSCAPE_CXX_FLAGS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" CACHE STRING "" FORCE)
list(REMOVE_DUPLICATES INKSCAPE_LIBS)
list(REMOVE_DUPLICATES INKSCAPE_INCS_SYS)
include_directories(${INKSCAPE_INCS})
include_directories(SYSTEM ${INKSCAPE_INCS_SYS})