Commit 39673303 authored by Patrick Storz's avatar Patrick Storz 🦄

CMake: Drop support for devlibs builds

parent 75ba3f42
Pipeline #54472687 passed with stages
in 127 minutes and 32 seconds
......@@ -232,11 +232,7 @@ install(FILES
TRANSLATORS
DESTINATION ${INKSCAPE_SHARE_INSTALL}/doc)
if(HAVE_MSYS2)
include(CMakeScripts/InstallMSYS2.cmake)
else()
include(CMakeScripts/Install.cmake)
endif()
include(CMakeScripts/Install.cmake)
# -----------------------------------------------------------------------------
# Uninstall Target
......@@ -317,17 +313,10 @@ message("WITH_JEMALLOC: ${WITH_JEMALLOC}")
if(WIN32)
message("")
message("HAVE_MINGW: ${HAVE_MINGW}")
message("HAVE_MINGW64: ${HAVE_MINGW64}")
message("MINGW_PATH: ${MINGW_PATH}")
message("MINGW_ARCH: ${MINGW_ARCH}")
message("MINGW_ARCH_PATH: ${MINGW_ARCH_PATH}")
if(NOT HAVE_MSYS2)
message("DEVLIBS_PATH: ${DEVLIBS_PATH}")
message("DEVLIBS_LIB: ${DEVLIBS_LIB}")
message("DEVLIBS_BIN: ${DEVLIBS_BIN}")
message("PKG_CONFIG_PATH: ${PKG_CONFIG_PATH}")
endif()
endif()
message("------------------------------------------------------------------------")
......@@ -6,11 +6,6 @@ if(WIN32)
include(CMakeScripts/ConfigEnvMinGW.cmake)
if(NOT HAVE_MSYS2)
list(INSERT CMAKE_SYSTEM_INCLUDE_PATH 0 ${DEVLIBS_PATH})
list(INSERT CMAKE_SYSTEM_LIBRARY_PATH 0 ${DEVLIBS_PATH})
endif()
set(CMAKE_C_COMPILER "${MINGW_BIN}/gcc.exe")
set(CMAKE_CXX_COMPILER "${MINGW_BIN}/g++.exe")
set(CMAKE_CXX_STANDARD 11)
......
......@@ -4,94 +4,22 @@
# will be used as default if no environment variables are set.
# -----------------------------------------------------------------------------
# Directory containing the precompiled Inkscape libraries. Usually c:\devlibs or c:\devlibs64
set(ENV_DEVLIBS_PATH C:/devlibs64)
# Directory containing the MinGW instance used for compilation. Usually c:\mingw or c:\mingw64
set(ENV_MINGW_PATH C:/mingw64)
# -----------------------------------------------------------------------------
# MinGW Configuration
# -----------------------------------------------------------------------------
message(STATUS "Configuring MinGW environment:")
if("$ENV{MSYSTEM_CHOST}" STREQUAL "")
if("$ENV{DEVLIBS_PATH}" STREQUAL "")
message(STATUS " Setting path to development libraries from ConfigEnvMinGW.cmake: ${ENV_DEVLIBS_PATH}")
set(DEVLIBS_PATH ${ENV_DEVLIBS_PATH})
else()
message(STATUS " Setting path to development libraries from environment: $ENV{DEVLIBS_PATH}")
set(DEVLIBS_PATH $ENV{DEVLIBS_PATH})
endif()
if("$ENV{MINGW_PATH}" STREQUAL "")
message(STATUS " Setting path to MinGW from ConfigEnvMinGW.cmake: ${ENV_MINGW_PATH}")
set(MINGW_PATH ${ENV_MINGW_PATH})
else()
message(STATUS " Setting path to MinGW from environment: $ENV{MINGW_PATH}")
set(MINGW_PATH $ENV{MINGW_PATH})
endif()
# Normalize directory separator slashes.
string(REGEX REPLACE "\\\\" "/" DEVLIBS_PATH ${DEVLIBS_PATH})
string(REGEX REPLACE "\\\\" "/" MINGW_PATH ${MINGW_PATH})
message(WARNING " Could not detect MinGW build environment. We recommend building with MSYS2. Proceed at your own risk!")
else()
set(HAVE_MSYS2 ON)
message(STATUS " Detected MinGW environment provided by MSYS2")
set(MINGW_PATH $ENV{MINGW_PREFIX})
endif()
# -----------------------------------------------------------------------------
# DEVLIBS CHECKS
# -----------------------------------------------------------------------------
if(NOT HAVE_MSYS2)
# Directory containing the compile time .dll.a and .a files.
set(DEVLIBS_LIB "${DEVLIBS_PATH}/lib")
if(NOT EXISTS "${DEVLIBS_LIB}")
message(FATAL_ERROR "Inkscape development libraries directory does not exist: ${DEVLIBS_LIB}")
endif()
# Add devlibs libraries to linker path.
link_directories(${DEVLIBS_LIB})
set(DEVLIBS_INCLUDE ${DEVLIBS_PATH}/include)
if(NOT EXISTS ${DEVLIBS_INCLUDE})
message(FATAL_ERROR "Inkscape development libraries directory does not exist: ${DEVLIBS_INCLUDE}")
endif()
# Add general MinGW headers to compiler include path.
#include_directories(${DEVLIBS_INCLUDE})
# Directory containing the precompiled .dll files.
set(DEVLIBS_BIN ${DEVLIBS_PATH}/bin)
if(NOT EXISTS ${DEVLIBS_BIN})
message(FATAL_ERROR "Inkscape development binaries directory does not exist: ${DEVLIBS_BIN}")
endif()
# Directory containing the pkgconfig .pc files.
set(PKG_CONFIG_PATH "${DEVLIBS_PATH}/lib/pkgconfig")
if(NOT EXISTS "${PKG_CONFIG_PATH}")
message(FATAL_ERROR "pkgconfig directory does not exist: ${PKG_CONFIG_PATH}")
endif()
# Add the devlibs directories to the paths used to find libraries and programs.
list(APPEND CMAKE_PREFIX_PATH ${DEVLIBS_PATH})
# Eliminate error messages when not having mingw in the environment path variable.
list(APPEND CMAKE_PROGRAM_PATH ${DEVLIBS_BIN})
endif()
# -----------------------------------------------------------------------------
# MINGW CHECKS
# -----------------------------------------------------------------------------
# We are in a MinGW environment.
set(HAVE_MINGW ON)
# Try to determine the MinGW processor architecture.
if(EXISTS "${MINGW_PATH}/i686-w64-mingw32")
set(HAVE_MINGW64 OFF)
......
......@@ -5,223 +5,6 @@ if(UNIX)
DESTINATION ${SHARE_INSTALL}/applications)
install(FILES ${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.appdata.xml
DESTINATION ${SHARE_INSTALL}/metainfo)
endif()
if(WIN32)
install(FILES
AUTHORS
COPYING
NEWS.md
README.md
TRANSLATORS
LICENSES/GPL-2.0.txt
LICENSES/GPL-3.0.txt
LICENSES/LGPL-2.1.txt
DESTINATION .)
install(DIRECTORY doc
DESTINATION .)
# devlibs and mingw dlls
# There are differences in the devlibs for 64-Bit and 32-Bit build environments.
if(HAVE_MINGW64)
install(FILES
${DEVLIBS_BIN}/bz2-1.dll
${DEVLIBS_BIN}/icudt56.dll
${DEVLIBS_BIN}/icuin56.dll
${DEVLIBS_BIN}/icuuc56.dll
${DEVLIBS_BIN}/libMagick++-6.Q16-6.dll
${DEVLIBS_BIN}/libMagickCore-6.Q16-2.dll
${DEVLIBS_BIN}/libMagickWand-6.Q16-2.dll
${DEVLIBS_BIN}/libaspell-15.dll
${DEVLIBS_BIN}/libatk-1.0-0.dll
${DEVLIBS_BIN}/libatkmm-1.6-1.dll
${DEVLIBS_BIN}/libcairo-2.dll
${DEVLIBS_BIN}/libcairo-gobject-2.dll
${DEVLIBS_BIN}/libcairomm-1.0-1.dll
${DEVLIBS_BIN}/libcdr-0.1.dll
${DEVLIBS_BIN}/libcurl-4.dll
${DEVLIBS_BIN}/libepoxy-0.dll
${DEVLIBS_BIN}/libexif-12.dll
${DEVLIBS_BIN}/libexpat-1.dll
${DEVLIBS_BIN}/libexslt-0.dll
${DEVLIBS_BIN}/libffi-6.dll
${DEVLIBS_BIN}/libfontconfig-1.dll
${DEVLIBS_BIN}/libfreetype-6.dll
${DEVLIBS_BIN}/libgc-1.dll
${DEVLIBS_BIN}/libgdk-3-0.dll
${DEVLIBS_BIN}/libgdk_pixbuf-2.0-0.dll
${DEVLIBS_BIN}/libgdkmm-3.0-1.dll
${DEVLIBS_BIN}/libgdl-3-5.dll
${DEVLIBS_BIN}/libgio-2.0-0.dll
${DEVLIBS_BIN}/libgiomm-2.4-1.dll
${DEVLIBS_BIN}/libglib-2.0-0.dll
${DEVLIBS_BIN}/libglibmm-2.4-1.dll
${DEVLIBS_BIN}/libgmodule-2.0-0.dll
${DEVLIBS_BIN}/libgobject-2.0-0.dll
${DEVLIBS_BIN}/libgsl-19.dll
${DEVLIBS_BIN}/libgslcblas-0.dll
${DEVLIBS_BIN}/libgthread-2.0-0.dll
${DEVLIBS_BIN}/libgtk-3-0.dll
${DEVLIBS_BIN}/libgtkmm-3.0-1.dll
${DEVLIBS_BIN}/libharfbuzz-0.dll
${DEVLIBS_BIN}/libiconv-2.dll
${DEVLIBS_BIN}/libintl-8.dll
${DEVLIBS_BIN}/libjpeg-9.dll
${DEVLIBS_BIN}/liblcms2-2.dll
${DEVLIBS_BIN}/liblzma-5.dll
${DEVLIBS_BIN}/libpango-1.0-0.dll
${DEVLIBS_BIN}/libpangocairo-1.0-0.dll
${DEVLIBS_BIN}/libpangoft2-1.0-0.dll
${DEVLIBS_BIN}/libpangomm-1.4-1.dll
${DEVLIBS_BIN}/libpangowin32-1.0-0.dll
${DEVLIBS_BIN}/libpixman-1-0.dll
${DEVLIBS_BIN}/libpng16-16.dll
${DEVLIBS_BIN}/libpoppler-58.dll
${DEVLIBS_BIN}/libpoppler-glib-8.dll
${DEVLIBS_BIN}/libpotrace-0.dll
${DEVLIBS_BIN}/librevenge-0.0.dll
${DEVLIBS_BIN}/librevenge-stream-0.0.dll
${DEVLIBS_BIN}/libsigc-2.0-0.dll
${DEVLIBS_BIN}/libtiff-5.dll
${DEVLIBS_BIN}/libvisio-0.1.dll
${DEVLIBS_BIN}/libwpd-0.10.dll
${DEVLIBS_BIN}/libwpg-0.3.dll
${DEVLIBS_BIN}/libxml2-2.dll
${DEVLIBS_BIN}/libxslt-1.dll
${DEVLIBS_BIN}/zlib1.dll
${MINGW_BIN}/libstdc++-6.dll
${MINGW_BIN}/libwinpthread-1.dll
${MINGW_BIN}/libgcc_s_seh-1.dll
${MINGW_BIN}/libgomp-1.dll
DESTINATION .)
else()
install(FILES
${DEVLIBS_BIN}/bzip2.dll
${DEVLIBS_BIN}/freetype6.dll
${DEVLIBS_BIN}/iconv.dll
${DEVLIBS_BIN}/icudata50.dll
${DEVLIBS_BIN}/icui18n50.dll
${DEVLIBS_BIN}/icuuc50.dll
${DEVLIBS_BIN}/intl.dll
${DEVLIBS_BIN}/libMagick++-3.dll
${DEVLIBS_BIN}/libMagickCore-3.dll
${DEVLIBS_BIN}/libMagickWand-3.dll
${DEVLIBS_BIN}/libatk-1.0-0.dll
${DEVLIBS_BIN}/libatkmm-1.6-1.dll
${DEVLIBS_BIN}/libcairo-2.dll
${DEVLIBS_BIN}/libcairomm-1.0-1.dll
${DEVLIBS_BIN}/libcdr-0.1.dll
${DEVLIBS_BIN}/libexif-12.dll
${DEVLIBS_BIN}/libexpat-1.dll
${DEVLIBS_BIN}/libexslt.dll
${DEVLIBS_BIN}/libfontconfig-1.dll
${DEVLIBS_BIN}/libgcc_s_sjlj-1.dll
${DEVLIBS_BIN}/libgdk-win32-2.0-0.dll
${DEVLIBS_BIN}/libgdk_pixbuf-2.0-0.dll
${DEVLIBS_BIN}/libgdkmm-2.4-1.dll
${DEVLIBS_BIN}/libgio-2.0-0.dll
${DEVLIBS_BIN}/libgiomm-2.4-1.dll
${DEVLIBS_BIN}/libglib-2.0-0.dll
${DEVLIBS_BIN}/libglibmm-2.4-1.dll
${DEVLIBS_BIN}/libgmodule-2.0-0.dll
${DEVLIBS_BIN}/libgobject-2.0-0.dll
${DEVLIBS_BIN}/libgthread-2.0-0.dll
${DEVLIBS_BIN}/libgtk-win32-2.0-0.dll
${DEVLIBS_BIN}/libgtkmm-2.4-1.dll
${DEVLIBS_BIN}/libintl-8.dll
${DEVLIBS_BIN}/libjpeg-7.dll
${DEVLIBS_BIN}/liblcms-1.dll
${DEVLIBS_BIN}/liblcms2-2.dll
${DEVLIBS_BIN}/libopenjpeg-2.dll
${DEVLIBS_BIN}/libpango-1.0-0.dll
${DEVLIBS_BIN}/libpangocairo-1.0-0.dll
${DEVLIBS_BIN}/libpangoft2-1.0-0.dll
${DEVLIBS_BIN}/libpangomm-1.4-1.dll
${DEVLIBS_BIN}/libpangowin32-1.0-0.dll
${DEVLIBS_BIN}/libpixman-1-0.dll
${DEVLIBS_BIN}/libpng12-0.dll
${DEVLIBS_BIN}/libpng14-14.dll
${DEVLIBS_BIN}/libpoppler-58.dll
${DEVLIBS_BIN}/libpoppler-glib-8.dll
${DEVLIBS_BIN}/librevenge-0.0.dll
${DEVLIBS_BIN}/librevenge-stream-0.0.dll
${DEVLIBS_BIN}/libsigc-2.0-0.dll
${DEVLIBS_BIN}/libtiff-3.dll
${DEVLIBS_BIN}/libvisio-0.1.dll
${DEVLIBS_BIN}/libwpd-0.9.dll
${DEVLIBS_BIN}/libwpd-stream-0.9.dll
${DEVLIBS_BIN}/libwpg-0.2.dll
${DEVLIBS_BIN}/libxml2.dll
${DEVLIBS_BIN}/libxslt.dll
${DEVLIBS_BIN}/msvcr70.dll
${DEVLIBS_BIN}/msvcr71.dll
${DEVLIBS_BIN}/pthreadGC2.dll
${DEVLIBS_BIN}/zlib1.dll
${MINGW_BIN}/mingwm10.dll
${MINGW_BIN}/libgomp-1.dll
DESTINATION .)
endif()
# Generate a dummy file in hicolor/index.theme to avoid bug 1635207
file(GENERATE OUTPUT share/icons/hicolor/index.theme
CONTENT "[Icon Theme]\nName=hicolor\nDirectories=")
install(DIRECTORY ${DEVLIBS_PATH}/share/icons/Adwaita
DESTINATION share/icons)
install(DIRECTORY ${DEVLIBS_PATH}/share/poppler
DESTINATION share)
install(DIRECTORY ${DEVLIBS_PATH}/share/glib-2.0/schemas
DESTINATION share/glib-2.0)
install(DIRECTORY ${DEVLIBS_PATH}/etc/fonts
DESTINATION etc)
# GTK 3.0
install(DIRECTORY ${DEVLIBS_LIB}/gtk-3.0
DESTINATION lib
FILES_MATCHING
PATTERN "*.dll"
PATTERN "*.cache")
install(DIRECTORY ${DEVLIBS_PATH}/etc/gtk-3.0
DESTINATION etc)
install(DIRECTORY ${DEVLIBS_LIB}/gdk-pixbuf-2.0
DESTINATION lib
FILES_MATCHING
PATTERN "*.dll"
PATTERN "*.cache")
# Aspell dictionaries
install(DIRECTORY ${DEVLIBS_LIB}/aspell-0.60
DESTINATION lib)
# Necessary to run extensions on windows if it is not in the path
if (HAVE_MINGW64)
install(FILES
${DEVLIBS_BIN}/gspawn-win64-helper.exe
${DEVLIBS_BIN}/gspawn-win64-helper-console.exe
DESTINATION .)
else()
install(FILES
${DEVLIBS_BIN}/gspawn-win32-helper.exe
${DEVLIBS_BIN}/gspawn-win32-helper-console.exe
DESTINATION .)
endif()
# Perl
install(FILES
${DEVLIBS_PATH}/perl/bin/perl58.dll
DESTINATION .)
# Python
install(DIRECTORY ${DEVLIBS_PATH}/python
DESTINATION .
PATTERN "python/include" EXCLUDE
PATTERN "python/libs" EXCLUDE
PATTERN "*.pyc" EXCLUDE)
elseif(WIN32)
include(CMakeScripts/InstallMSYS2.cmake)
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment