diff options
| author | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:56:11 +0000 |
|---|---|---|
| committer | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:56:11 +0000 |
| commit | 132e83fd6f6124731dc773ae2978d115ca492ef2 (patch) | |
| tree | b561a4dbbacd7eecbdbae3fa220a353375ccecf8 /CMakeScripts | |
| parent | updated to trunk (diff) | |
| parent | [Bug #1695016] Xaml export misses some radialGradients. (diff) | |
| download | inkscape-132e83fd6f6124731dc773ae2978d115ca492ef2.tar.gz inkscape-132e83fd6f6124731dc773ae2978d115ca492ef2.zip | |
merged with latest version of lpe-bool and trunk
(bzr r14862.2.3)
Diffstat (limited to 'CMakeScripts')
| -rw-r--r-- | CMakeScripts/ConfigCompileFlags.cmake | 15 | ||||
| -rw-r--r-- | CMakeScripts/ConfigEnv.cmake | 54 | ||||
| -rw-r--r-- | CMakeScripts/ConfigPaths.cmake | 39 | ||||
| -rw-r--r-- | CMakeScripts/DefineDependsandFlags.cmake | 169 | ||||
| -rw-r--r-- | CMakeScripts/HelperFunctions.cmake | 139 | ||||
| -rw-r--r-- | CMakeScripts/HelperMacros.cmake | 13 | ||||
| -rw-r--r-- | CMakeScripts/Install.cmake | 227 | ||||
| -rw-r--r-- | CMakeScripts/InstallMSYS2.cmake | 246 | ||||
| -rw-r--r-- | CMakeScripts/Modules/FindSigC++.cmake | 128 | ||||
| -rw-r--r-- | CMakeScripts/Modules/Findyaml.cmake | 49 | ||||
| -rw-r--r-- | CMakeScripts/Modules/sigcpp_test.cpp | 15 | ||||
| -rw-r--r-- | CMakeScripts/Pod2man.cmake | 5 | ||||
| -rwxr-xr-x | CMakeScripts/cmake_consistency_check.py | 212 | ||||
| -rw-r--r-- | CMakeScripts/inkscape-version.cmake | 10 |
14 files changed, 949 insertions, 372 deletions
diff --git a/CMakeScripts/ConfigCompileFlags.cmake b/CMakeScripts/ConfigCompileFlags.cmake index 453ceef21..fa2362cd2 100644 --- a/CMakeScripts/ConfigCompileFlags.cmake +++ b/CMakeScripts/ConfigCompileFlags.cmake @@ -1,26 +1,19 @@ -set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}") -add_definitions(-Wall -Wformat-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch) -add_definitions(-O2) - # Define the flags for profiling if desired: if(WITH_PROFILING) set(COMPILE_PROFILING_FLAGS "-pg") set(LINK_PROFILING_FLAGS "-pg") endif() -add_definitions(-DVERSION=\\\"${INKSCAPE_VERSION}\\\") +# add_definitions(-DVERSION=\\\"${INKSCAPE_VERSION}\\\") add_definitions(${DEFINE_FLAGS} -DHAVE_CONFIG_H -D_INTL_REDIRECT_INLINE) if(WIN32) add_definitions(-DXP_WIN) endif(WIN32) -# For Inkboard: -add_definitions(-DHAVE_SSL "-DRELAYTOOL_SSL=\"static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }\"") - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_PROFILING_FLAGS} ") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_PROFILING_FLAGS} ") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 ${COMPILE_PROFILING_FLAGS} ") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 ${COMPILE_PROFILING_FLAGS} ") set(CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM} ") -# message(STATUS "${CMAKE_CXX_FLAGS}") +message(STATUS "${CMAKE_CXX_FLAGS}") diff --git a/CMakeScripts/ConfigEnv.cmake b/CMakeScripts/ConfigEnv.cmake new file mode 100644 index 000000000..dd4e7e10c --- /dev/null +++ b/CMakeScripts/ConfigEnv.cmake @@ -0,0 +1,54 @@ +# -----------------------------------------------------------------------------
+# Set platform defaults (originally copied from darktable)
+# -----------------------------------------------------------------------------
+if(WIN32)
+ message("-- Windows build detected, setting default features")
+
+ include(mingwenv.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_C_LINK_EXECUTABLE "${MINGW_BIN}/gcc.exe")
+ set(CMAKE_CXX_COMPILER "${MINGW_BIN}/g++.exe")
+ set(CMAKE_CXX_LINK_EXECUTABLE "${MINGW_BIN}/g++.exe")
+ set(CMAKE_CXX_STANDARD 11)
+
+ # Setup Windows resource files compiler.
+ set(CMAKE_RC_COMPILER "${MINGW_BIN}/windres.exe")
+ set(CMAKE_RC_COMPILER_INIT windres)
+ enable_language(RC)
+ set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff -i <SOURCE> -o <OBJECT>")
+
+ # These options are required for having i18n support on Windows.
+ option(ENABLE_NLS "Compile with Native Language Support (using gettext)" ON)
+ option(HAVE_BIND_TEXTDOMAIN_CODESET "Compile with 'bind_textdomain_codeset' function" ON)
+
+ # Does not compile on Windows with these options.
+ option(BR_PTHREADS "Use binreloc thread support" OFF)
+ option(ENABLE_BINRELOC "Use AutoPackage" OFF)
+endif()
+
+if(APPLE)
+ message("-- Mac OS X build detected, setting default features")
+
+ # prefer macports and/or user-installed libraries over system ones
+ #LIST(APPEND CMAKE_PREFIX_PATH /opt/local /usr/local)
+ set(CMAKE_FIND_FRAMEWORK "LAST")
+
+ # test and display relevant env variables
+ if(DEFINED ENV{CMAKE_PREFIX_PATH})
+ message("CMAKE_PREFIX_PATH: $ENV{CMAKE_PREFIX_PATH}")
+ endif()
+
+ if(DEFINED ENV{GTKMM_BASEPATH})
+ message("GTKMM_BASEPATH: $ENV{GTKMM_BASEPATH}")
+ endif()
+
+ # detect current GTK+ backend
+ pkg_check_variable(gtk+-2.0 target)
+ message("GTK2 backend: ${GTK+_2.0_TARGET}")
+endif()
diff --git a/CMakeScripts/ConfigPaths.cmake b/CMakeScripts/ConfigPaths.cmake index 3b13a7734..de053c4d8 100644 --- a/CMakeScripts/ConfigPaths.cmake +++ b/CMakeScripts/ConfigPaths.cmake @@ -1,16 +1,33 @@ message(STATUS "Creating build files in: ${CMAKE_CURRENT_BINARY_DIR}") if(WIN32) - set(PACKAGE_LOCALE_DIR "locale") + if(${CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT}) + set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/inkscape" + CACHE PATH "Install path prefix, prepended onto install directories." FORCE) + endif() + + set(INKSCAPE_LIBDIR "\\\\lib") + set(INKSCAPE_DATADIR "") + + set(PACKAGE_LOCALE_DIR "\\\\share\\\\locale") + + set(SHARE_INSTALL "share" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.") + set(INKSCAPE_SHARE_INSTALL "${SHARE_INSTALL}") # share/inkscape goes directly into /share on Windows + + mark_as_advanced(SHARE_INSTALL) +else() + set(INKSCAPE_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib") + set(INKSCAPE_DATADIR "${CMAKE_INSTALL_PREFIX}/share") + + # TODO: check and change this to correct value: + if(NOT PACKAGE_LOCALE_DIR) + set(PACKAGE_LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale") # packagers might overwrite this + endif(NOT PACKAGE_LOCALE_DIR) + + if(NOT SHARE_INSTALL) set(SHARE_INSTALL "share" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.") -else(WIN32) - # TODO: check and change this to correct value: - if(NOT PACKAGE_LOCALE_DIR) - set(PACKAGE_LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale") # packagers might overwrite this - endif(NOT PACKAGE_LOCALE_DIR) + endif(NOT SHARE_INSTALL) + set(INKSCAPE_SHARE_INSTALL "${SHARE_INSTALL}/inkscape") - if(NOT SHARE_INSTALL) - set(SHARE_INSTALL "share" CACHE STRING "Data file install path. Must be a relative path (from CMAKE_INSTALL_PREFIX), with no trailing slash.") - endif(NOT SHARE_INSTALL) - mark_as_advanced(SHARE_INSTALL) -endif(WIN32) + mark_as_advanced(SHARE_INSTALL) +endif()
\ No newline at end of file diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index f2a6b5670..8cc0f0cd9 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -12,78 +12,43 @@ list(APPEND INKSCAPE_INCS ${PROJECT_SOURCE_DIR} ) # ---------------------------------------------------------------------------- +# Add C++11 standard compliance +# TODO: Add a proper check for compiler compliance here +# ---------------------------------------------------------------------------- +list(APPEND INKSCAPE_CXX_FLAGS "-std=c++11") + +# ---------------------------------------------------------------------------- # Files we include # ---------------------------------------------------------------------------- if(WIN32) -message("---------------- BEGIN: Win32 ----------------") - - # The name of the target operating system - set(CMAKE_SYSTEM_NAME Windows) - - message("CMAKE_SYSTEM_NAME: " ${CMAKE_SYSTEM_NAME}) - - set(CMAKE_C_COMPILER gcc) - set(CMAKE_CXX_COMPILER g++) - set(CMAKE_RC_COMPILER windres) - - # Adjust the command line parameters for windres to the verion of MinGW. - set(CMAKE_RC_COMPILER_INIT windres) - enable_language(RC) - set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff -i <SOURCE> -o <OBJECT>") - - # Here is the target environment located - set(CMAKE_FIND_ROOT_PATH $ENV{MINGW_PATH}/) - - message("CMAKE_FIND_ROOT_PATH: " ${CMAKE_FIND_ROOT_PATH}) - - # Tweak CMake into using Unix-style library names. - set(CMAKE_FIND_LIBRARY_PREFIXES "lib") - set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".dll") - - message("CMAKE_FIND_LIBRARY_PREFIXES: " ${CMAKE_FIND_LIBRARY_PREFIXES}) - message("CMAKE_FIND_LIBRARY_SUFFIXES: " ${CMAKE_FIND_LIBRARY_SUFFIXES}) + # Set the link and include directories + get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) - set(SDL_INCLUDE_DIR ${CMAKE_FIND_ROOT_PATH}x86_64-w64-mingw32/include/c++) + list(APPEND INKSCAPE_LIBS "-lmscms") - message("SDL_INCLUDE_DIR: " ${SDL_INCLUDE_DIR}) + list(APPEND INKSCAPE_CXX_FLAGS "-mwindows") + list(APPEND INKSCAPE_CXX_FLAGS "-mthreads") - #if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd64") - link_directories($ENV{MINGW_PATH}/lib) - link_directories($ENV{DEVLIBS_PATH}/lib) - link_directories($ENV{MINGW_PATH}/x86_64-w64-mingw32/lib) - link_directories($ENV{WINDIR}/system32) - - include_directories($ENV{MINGW_PATH}/include) - - include_directories($ENV{MINGW_PATH}/x86_64-w64-mingw32/include) - include_directories($ENV{MINGW_PATH}/x86_64-w64-mingw32/include/c++) - #endif () - - get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) - - foreach(dir ${dirs}) - message("CMAKE_INCLUDE_DIR:" ${dir}) - endforeach() - - add_definitions(-DFLT_EPSILON=1e-9) - add_definitions(-DFLT_MAX=1e+37) - add_definitions(-DFLT_MIN=1e-37) - - list(APPEND INKSCAPE_LIBS "-lgomp") - list(APPEND INKSCAPE_LIBS "-lwinpthread") - 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("---------------- END: Win32 ----------------") + list(APPEND INKSCAPE_LIBS "-lgomp") + list(APPEND INKSCAPE_LIBS "-lwinpthread") + + if(HAVE_MINGW64) + list(APPEND INKSCAPE_CXX_FLAGS "-m64") + else() + list(APPEND INKSCAPE_CXX_FLAGS "-m32") + endif() endif() -pkg_check_modules(INKSCAPE_DEP REQUIRED pangocairo pangoft2 fontconfig gthread-2.0 gsl gmodule-2.0) +find_package(PkgConfig REQUIRED) +pkg_check_modules(INKSCAPE_DEP REQUIRED + harfbuzz + 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}) @@ -116,19 +81,21 @@ if(WITH_GNOME_VFS) endif() if(ENABLE_LCMS) + unset(HAVE_LIBLCMS1) + unset(HAVE_LIBLCMS2) find_package(LCMS2) if(LCMS2_FOUND) list(APPEND INKSCAPE_INCS_SYS ${LCMS2_INCLUDE_DIRS}) list(APPEND INKSCAPE_LIBS ${LCMS2_LIBRARIES}) add_definitions(${LCMS2_DEFINITIONS}) - set (HAVE_LIBLCMS2 1) + set (HAVE_LIBLCMS2 ON) else() find_package(LCMS) if(LCMS_FOUND) list(APPEND INKSCAPE_INCS_SYS ${LCMS_INCLUDE_DIRS}) list(APPEND INKSCAPE_LIBS ${LCMS_LIBRARIES}) add_definitions(${LCMS_DEFINITIONS}) - set (HAVE_LIBLCMS1 1) + set (HAVE_LIBLCMS1 ON) else() set(ENABLE_LCMS OFF) endif() @@ -262,22 +229,25 @@ if(WITH_DBUS) endif() endif() -if(WITH_GTEST) - if(EXISTS "${GMOCK_DIR}" AND IS_DIRECTORY "${GMOCK_DIR}") - - else() - set(WITH_GTEST off) - endif() +if(WITH_SVG2) + add_definitions(-DWITH_MESH -DWITH_CSSBLEND -DWITH_CSSCOMPOSITE -DWITH_SVG2) +else() + add_definitions(-UWITH_MESH -UWITH_CSSBLEND -UWITH_CSSCOMPOSITE -UWITH_SVG2) +endif() + +if(WITH_LPETOOL) + add_definitions(-DWITH_LPETOOL -DLPE_ENABLE_TEST_EFFECTS) +else() + add_definitions(-UWITH_LPETOOL -ULPE_ENABLE_TEST_EFFECTS) endif() # ---------------------------------------------------------------------------- # CMake's builtin # ---------------------------------------------------------------------------- -set(TRY_GTKSPELL 1) +set(TRY_GTKSPELL ON) # Include dependencies: # use patched version until GTK2_CAIROMMCONFIG_INCLUDE_DIR is added -if("${WITH_GTK3_EXPERIMENTAL}") pkg_check_modules( GTK3 REQUIRED @@ -287,11 +257,7 @@ if("${WITH_GTK3_EXPERIMENTAL}") gdk-3.0>=3.8 gdl-3.0>=3.4 ) - message("Using EXPERIMENTAL Gtkmm 3 build") list(APPEND INKSCAPE_CXX_FLAGS ${GTK3_CFLAGS_OTHER}) - set(WITH_GTKMM_3_0 1) - message("Using external GDL") - set(WITH_EXT_GDL 1) # 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 @@ -302,14 +268,15 @@ if("${WITH_GTK3_EXPERIMENTAL}") if("${GTKMM_3_10_FOUND}") message("Using Gtkmm 3.10 build") - set (WITH_GTKMM_3_10 1) + set (WITH_GTKMM_3_10 ON) endif() pkg_check_modules(GDL_3_6 gdl-3.0>=3.6) if("${GDL_3_6_FOUND}") message("Using GDL 3.6 or higher") - set (WITH_GDL_3_6 1) + add_definitions(-DWITH_GDL_3_6) + set (WITH_GDL_3_6 ON) endif() set(TRY_GTKSPELL ) @@ -317,7 +284,7 @@ if("${WITH_GTK3_EXPERIMENTAL}") if("${GTKSPELL3_FOUND}") message("Using GtkSpell 3") - set (WITH_GTKSPELL 1) + set (WITH_GTKSPELL ON) else() unset(WITH_GTKSPELL) endif() @@ -331,32 +298,6 @@ if("${WITH_GTK3_EXPERIMENTAL}") ${GTK3_LIBRARIES} ${GTKSPELL3_LIBRARIES} ) -else() - pkg_check_modules(GTK REQUIRED - gtkmm-2.4>=2.24 - gdkmm-2.4 - gtk+-2.0 - gdk-2.0 - ) - list(APPEND INKSCAPE_CXX_FLAGS ${GTK_CFLAGS_OTHER}) - pkg_check_modules(GTKSPELL2 gtkspell-2.0) - if("${GTKSPELL2_FOUND}") - message("Using GtkSpell 2") - add_definitions(${GTKSPELL2_CFLAGS_OTHER}) - set (WITH_GTKSPELL 1) - else() - unset(WITH_GTKSPELL) - endif() - list(APPEND INKSCAPE_INCS_SYS - ${GTK_INCLUDE_DIRS} - ${GTKSPELL2_INCLUDE_DIRS} - ) - - list(APPEND INKSCAPE_LIBS - ${GTK_LIBRARIES} - ${GTKSPELL2_LIBRARIES} - ) -endif() find_package(Freetype REQUIRED) list(APPEND INKSCAPE_INCS_SYS ${FREETYPE_INCLUDE_DIRS}) @@ -437,14 +378,22 @@ if(WITH_NLS) endif(GETTEXT_FOUND) endif(WITH_NLS) -#sets c++11 for newer sigc++ if required when pkg-config does not detect it -find_package(SigC++ REQUIRED) - pkg_check_modules(SIGC++ REQUIRED sigc++-2.0 ) list(APPEND INKSCAPE_LIBS ${SIGC++_LDFLAGS}) list(APPEND INKSCAPE_CXX_FLAGS ${SIGC++_CFLAGS_OTHER}) +find_package(yaml) +if(YAML_FOUND) + set (WITH_YAML ON) + list(APPEND INKSCAPE_INCS_SYS ${YAML_INCLUDE_DIRS}) + list(APPEND INKSCAPE_LIBS ${YAML_LIBRARIES}) + add_definitions(-DWITH_YAML) +else(YAML_FOUND) + set(WITH_YAML OFF) + message(STATUS "Could not locate the yaml library headers: xverb feature will be disabled") +endif() + list(REMOVE_DUPLICATES INKSCAPE_CXX_FLAGS) foreach(flag ${INKSCAPE_CXX_FLAGS}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" CACHE STRING "" FORCE) diff --git a/CMakeScripts/HelperFunctions.cmake b/CMakeScripts/HelperFunctions.cmake index f4ed255d5..3cd9e2736 100644 --- a/CMakeScripts/HelperFunctions.cmake +++ b/CMakeScripts/HelperFunctions.cmake @@ -1,10 +1,8 @@ # pkg_check_variable() - a function to retrieve pkg-config variables in CMake # # source: http://bloerg.net/2015/03/06/pkg-config-variables-in-cmake.html - -find_package(PkgConfig REQUIRED) - function(pkg_check_variable _pkg _name) + find_package(PkgConfig REQUIRED) string(TOUPPER ${_pkg} _pkg_upper) string(TOUPPER ${_name} _name_upper) string(REPLACE "-" "_" _pkg_upper ${_pkg_upper}) @@ -32,3 +30,138 @@ function(join OUTPUT GLUE) endforeach() set(${OUTPUT} "${_TMP_RESULT}" PARENT_SCOPE) endfunction() + + + +# Checks if the last call to execute_process() was sucessful and throws an error otherwise. +# ${result} and ${stderr} should hold the value of RESULT_VARIABLE and ERROR_VARIABLE respectively +function(check_error result stderr) + if("${result}" STREQUAL 0) + if(NOT "${stderr}" STREQUAL "") + MESSAGE(WARNING "Process returned sucessfully but the following was output to stderr: ${stderr}") + endif() + else() + if("${stderr}" STREQUAL "") + MESSAGE(FATAL_ERROR "Process failed with error code: ${result}") + else() + MESSAGE(FATAL_ERROR "Process failed with error code: ${result} (stderr: ${stderr})") + endif() + endif() +endfunction(check_error) + + + +# Get the list of files installed by pacman for package ${package_name} and return it as ${file_list}. +# Paths are relative to the root directory of the MinGW installations (the directory returned by function "get_mingw_root()") +function(list_files_pacman package_name file_list) + set(MINGW_PACKAGE_PREFIX $ENV{MINGW_PACKAGE_PREFIX}) # e.g. "mingw-w64-x86_64" + get_filename_component(MINGW_PREFIX $ENV{MINGW_PREFIX} NAME) # e.g. "mingw64" + + # use pacman to list all files/folders installed by the package + execute_process( + COMMAND pacman -Ql ${MINGW_PACKAGE_PREFIX}-${package_name} + OUTPUT_FILE list_files_pacman_temp.txt + RESULT_VARIABLE res + ERROR_VARIABLE err + ) + check_error("${res}" "${err}") + + # clean up output + execute_process( + COMMAND grep -v '/$' # get rid of folders + COMMAND sed -e 's/^${MINGW_PACKAGE_PREFIX}-${package_name} //' # remove package name + COMMAND sed -e 's/^\\/${MINGW_PREFIX}\\///' # remove root path + COMMAND tr '\n' '\;' # finally replace newlines with semicolon + INPUT_FILE list_files_pacman_temp.txt + OUTPUT_VARIABLE out + RESULT_VARIABLE res + ERROR_VARIABLE err + ) + check_error("${res}" "${err}") + + SET(${file_list} ${out} PARENT_SCOPE) + file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/list_files_pacman_temp.txt) +endfunction(list_files_pacman) + + + +# Get the list of files installed by pip for package ${package_name} and return it as ${file_list}. +# Paths are relative to the python distributions "site-packages" folder, i.e. "${root}/lib/python2.7/site-packages" +function(list_files_pip package_name file_list) + # use pip to show package information including full list of files installed by the package + execute_process( + COMMAND pip show -f ${package_name} + OUTPUT_FILE list_files_pip_temp.txt + RESULT_VARIABLE res + ERROR_VARIABLE err + ) + check_error("${res}" "${err}") + + # clean up output + execute_process( + COMMAND sed -e '1,/Files:/d' # strip everything but the files list + COMMAND tr -d ' ' # strip spaces + COMMAND tr '\n' '\;' # finally replace newlines with semicolon + INPUT_FILE list_files_pip_temp.txt + OUTPUT_VARIABLE out + RESULT_VARIABLE res + ERROR_VARIABLE err + ) + check_error("${res}" "${err}") + + SET(${file_list} ${out} PARENT_SCOPE) + file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/list_files_pip_temp.txt) +endfunction(list_files_pip) + + + +# Install a list of files maintaining directory structure +# +# Options: +# FILES - the list of files (absolute or relative paths) +# ROOT - the root to search the files in (if file paths are relative) +# DESTINATION - the destination where to install files to +# INCLUDE - a (list of) regular expression(s) specifying which files to include +# (omit or leave empty to inlcude all files) +# EXCLUDE - a (list of) regular expression(s) specifying which files to exclude +# (takes precedence over include rules) +function(install_list) + # parse arguments + set(oneValueArgs ROOT DESTINATION) + set(multiValueArgs FILES INCLUDE EXCLUDE) + cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + #MESSAGE("ARG_FILES: ${ARG_FILES}" ) + #MESSAGE("ARG_ROOT: ${ARG_ROOT}" ) + #MESSAGE("ARG_DESTINATION: ${ARG_DESTINATION}" ) + #MESSAGE("ARG_INCLUDE: ${ARG_INCLUDE}" ) + #MESSAGE("ARG_EXCLUDE: ${ARG_EXCLUDE}" ) + #MESSAGE("ARG_UNPARSED_ARGUMENTS: ${ARG_UNPARSED_ARGUMENTS}" ) + + # install the files + foreach(file ${ARG_FILES}) + #MESSAGE("file: " ${file}) + + # check includes and excludes (excludes take precedence) + set(include_file 0) + if("${ARG_INCLUDE}" STREQUAL "") # start with the assumption to include all files by default + set(include_file 1) + endif() + foreach(include ${ARG_INCLUDE}) + if("${file}" MATCHES "${include}") + set(include_file 1) + endif() + endforeach() + foreach(exclude ${ARG_EXCLUDE}) + if("${file}" MATCHES "${exclude}") + set(include_file 0) + endif() + endforeach() + + # install if file should be included + if(${include_file}) + get_filename_component(directory ${file} DIRECTORY) + install(FILES "${ARG_ROOT}/${file}" DESTINATION "${ARG_DESTINATION}${directory}") + endif() + endforeach() +endfunction(install_list) diff --git a/CMakeScripts/HelperMacros.cmake b/CMakeScripts/HelperMacros.cmake index d5e6d8536..a0bdd9866 100644 --- a/CMakeScripts/HelperMacros.cmake +++ b/CMakeScripts/HelperMacros.cmake @@ -34,10 +34,15 @@ macro(add_inkscape_lib # works fine without having the includes # listed is helpful for IDE's (QtCreator/MSVC) inkscape_source_group("${sources}") - install(TARGETS ${name} - LIBRARY DESTINATION lib/inkscape - ARCHIVE DESTINATION lib/inkscape - ) + + # static libraries are probably not useful on Windows + # (if we ever build shared libraries those would use the RUNTIME target and we might have to revisit this) + if(NOT WIN32) + install(TARGETS ${name} + LIBRARY DESTINATION lib/inkscape + ARCHIVE DESTINATION lib/inkscape + ) + endif() endmacro() diff --git a/CMakeScripts/Install.cmake b/CMakeScripts/Install.cmake new file mode 100644 index 000000000..782161dc2 --- /dev/null +++ b/CMakeScripts/Install.cmake @@ -0,0 +1,227 @@ +if(UNIX)
+ #The install directive for the binaries and libraries are found in src/CMakeList.txt
+ install(FILES
+ ${CMAKE_BINARY_DIR}/inkscape.desktop
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/${SHARE_INSTALL}/applications)
+endif()
+
+if(WIN32)
+ install(FILES
+ AUTHORS
+ COPYING
+ NEWS
+ README
+ TRANSLATORS
+ GPL2.txt
+ GPL3.txt
+ LGPL2.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}/libpopt-0.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}/libpopt-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-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)
+endif()
\ No newline at end of file diff --git a/CMakeScripts/InstallMSYS2.cmake b/CMakeScripts/InstallMSYS2.cmake new file mode 100644 index 000000000..d3e63c3c9 --- /dev/null +++ b/CMakeScripts/InstallMSYS2.cmake @@ -0,0 +1,246 @@ +if(WIN32)
+ install(FILES
+ AUTHORS
+ COPYING
+ NEWS
+ README
+ TRANSLATORS
+ GPL2.txt
+ GPL3.txt
+ LGPL2.1.txt
+ DESTINATION .)
+
+ install(DIRECTORY doc
+ DESTINATION .)
+
+ # mingw dlls
+ install(FILES
+ ${MINGW_BIN}/LIBEAY32.dll
+ ${MINGW_BIN}/SSLEAY32.dll
+ ${MINGW_BIN}/libMagick++-6.Q16HDRI-6.dll
+ ${MINGW_BIN}/libMagickCore-6.Q16HDRI-2.dll
+ ${MINGW_BIN}/libMagickWand-6.Q16HDRI-2.dll
+ ${MINGW_BIN}/libaspell-15.dll
+ ${MINGW_BIN}/libatk-1.0-0.dll
+ ${MINGW_BIN}/libatkmm-1.6-1.dll
+ ${MINGW_BIN}/libbz2-1.dll
+ ${MINGW_BIN}/libcairo-2.dll
+ ${MINGW_BIN}/libcairo-gobject-2.dll
+ ${MINGW_BIN}/libcairomm-1.0-1.dll
+ ${MINGW_BIN}/libcdr-0.1.dll
+ ${MINGW_BIN}/libcurl-4.dll
+ ${MINGW_BIN}/libenchant.dll
+ ${MINGW_BIN}/libepoxy-0.dll
+ ${MINGW_BIN}/libexpat-1.dll
+ ${MINGW_BIN}/libffi-6.dll
+ ${MINGW_BIN}/libfftw3-3.dll
+ ${MINGW_BIN}/libfontconfig-1.dll
+ ${MINGW_BIN}/libfreetype-6.dll
+ ${MINGW_BIN}/libgc-1.dll
+ ${MINGW_BIN}/libgdk-3-0.dll
+ ${MINGW_BIN}/libgdk_pixbuf-2.0-0.dll
+ ${MINGW_BIN}/libgdkmm-3.0-1.dll
+ ${MINGW_BIN}/libgdl-3-5.dll
+ ${MINGW_BIN}/libgio-2.0-0.dll
+ ${MINGW_BIN}/libgiomm-2.4-1.dll
+ ${MINGW_BIN}/libglib-2.0-0.dll
+ ${MINGW_BIN}/libglibmm-2.4-1.dll
+ ${MINGW_BIN}/libgmodule-2.0-0.dll
+ ${MINGW_BIN}/libgmp-10.dll
+ ${MINGW_BIN}/libgnutls-30.dll
+ ${MINGW_BIN}/libgobject-2.0-0.dll
+ ${MINGW_BIN}/libgomp-1.dll
+ ${MINGW_BIN}/libgraphite2.dll
+ ${MINGW_BIN}/libgsl-19.dll
+ ${MINGW_BIN}/libgslcblas-0.dll
+ ${MINGW_BIN}/libgtk-3-0.dll
+ ${MINGW_BIN}/libgtkmm-3.0-1.dll
+ ${MINGW_BIN}/libgtkspell3-3-0.dll
+ ${MINGW_BIN}/libharfbuzz-0.dll
+ ${MINGW_BIN}/libhogweed-4.dll
+ ${MINGW_BIN}/libiconv-2.dll
+ ${MINGW_BIN}/libicudt57.dll
+ ${MINGW_BIN}/libicuin57.dll
+ ${MINGW_BIN}/libicuuc57.dll
+ ${MINGW_BIN}/libidn-11.dll
+ ${MINGW_BIN}/libintl-8.dll
+ ${MINGW_BIN}/libjpeg-8.dll
+ ${MINGW_BIN}/liblcms2-2.dll
+ ${MINGW_BIN}/liblqr-1-0.dll
+ ${MINGW_BIN}/libltdl-7.dll
+ ${MINGW_BIN}/liblzma-5.dll
+ ${MINGW_BIN}/libnettle-6.dll
+ ${MINGW_BIN}/libnghttp2-14.dll
+ ${MINGW_BIN}/libnspr4.dll
+ ${MINGW_BIN}/libopenjp2-7.dll
+ ${MINGW_BIN}/libp11-kit-0.dll
+ ${MINGW_BIN}/libpango-1.0-0.dll
+ ${MINGW_BIN}/libpangocairo-1.0-0.dll
+ ${MINGW_BIN}/libpangoft2-1.0-0.dll
+ ${MINGW_BIN}/libpangomm-1.4-1.dll
+ ${MINGW_BIN}/libpangowin32-1.0-0.dll
+ ${MINGW_BIN}/libpcre-1.dll
+ ${MINGW_BIN}/libpixman-1-0.dll
+ ${MINGW_BIN}/libplc4.dll
+ ${MINGW_BIN}/libplds4.dll
+ ${MINGW_BIN}/libpng16-16.dll
+ ${MINGW_BIN}/libpoppler-66.dll
+ ${MINGW_BIN}/libpoppler-glib-8.dll
+ ${MINGW_BIN}/libpopt-0.dll
+ ${MINGW_BIN}/libpotrace-0.dll
+ ${MINGW_BIN}/librevenge-0.0.dll
+ ${MINGW_BIN}/librevenge-stream-0.0.dll
+ ${MINGW_BIN}/librtmp-1.dll
+ ${MINGW_BIN}/libsigc-2.0-0.dll
+ ${MINGW_BIN}/libssh2-1.dll
+ ${MINGW_BIN}/libstdc++-6.dll
+ ${MINGW_BIN}/libtasn1-6.dll
+ ${MINGW_BIN}/libtiff-5.dll
+ ${MINGW_BIN}/libunistring-2.dll
+ ${MINGW_BIN}/libvisio-0.1.dll
+ ${MINGW_BIN}/libwinpthread-1.dll
+ ${MINGW_BIN}/libwpd-0.10.dll
+ ${MINGW_BIN}/libwpg-0.3.dll
+ ${MINGW_BIN}/libxml2-2.dll
+ ${MINGW_BIN}/libxslt-1.dll
+ ${MINGW_BIN}/libyaml-0-2.dll
+ ${MINGW_BIN}/nss3.dll
+ ${MINGW_BIN}/nssutil3.dll
+ ${MINGW_BIN}/smime3.dll
+ ${MINGW_BIN}/zlib1.dll
+ # these are not picked up by 'ldd' but are required for SVG support in gdk-pixbuf-2.0
+ ${MINGW_BIN}/libcroco-0.6-3.dll
+ ${MINGW_BIN}/librsvg-2-2.dll
+ # required by python2-lxml
+ ${MINGW_BIN}/libexslt-0.dll
+ # required by python2-numpy
+ ${MINGW_BIN}/libgfortran-3.dll
+ ${MINGW_BIN}/libopenblas.dll
+ ${MINGW_BIN}/libquadmath-0.dll
+ DESTINATION .)
+ # There are differences for 64-Bit and 32-Bit build environments.
+ if(HAVE_MINGW64)
+ install(FILES
+ ${MINGW_BIN}/libgcc_s_seh-1.dll
+ DESTINATION .)
+ else()
+ install(FILES
+ ${MINGW_BIN}/libgcc_s_dw2-1.dll
+ DESTINATION .)
+ endif()
+
+ # Install hicolor/index.theme to avoid bug 1635207
+ install(FILES
+ ${MINGW_PATH}/share/icons/hicolor/index.theme
+ DESTINATION share/icons/hicolor)
+
+ install(DIRECTORY ${MINGW_PATH}/share/icons/Adwaita
+ DESTINATION share/icons)
+
+ # translations for libraries (we usually shouldn't need many)
+ install(DIRECTORY ${MINGW_PATH}/share/locale
+ DESTINATION share
+ FILES_MATCHING
+ PATTERN "*glib20.mo"
+ PATTERN "*gtk30.mo"
+ PATTERN "*gtkspell3.mo")
+
+ install(DIRECTORY ${MINGW_PATH}/share/poppler
+ DESTINATION share)
+
+ install(DIRECTORY ${MINGW_PATH}/share/glib-2.0/schemas
+ DESTINATION share/glib-2.0)
+
+ # fontconfig
+ install(DIRECTORY ${MINGW_PATH}/etc/fonts
+ DESTINATION etc
+ FILES_MATCHING PATTERN "fonts.conf" EXCLUDE)
+ # adjust fonts.conf to store font cache in AppData
+ set(cachedir_default "\\t^<cachedir^>/var/cache/fontconfig^</cachedir^>") # the '^' are needed to escape angle brackets on Windows command shell
+ set(cachedir_appdata "\\t^<cachedir^>LOCAL_APPDATA_FONTCONFIG_CACHE^</cachedir^>")
+ add_custom_command(
+ OUTPUT ${CMAKE_BINARY_DIR}/etc/fonts/fonts.conf
+ COMMAND sed 's!${cachedir_default}!${cachedir_appdata}\\n${cachedir_default}!' ${MINGW_PATH}/etc/fonts/fonts.conf > ${CMAKE_BINARY_DIR}/etc/fonts/fonts.conf
+ MAIN_DEPENDENCY ${MINGW_PATH}/etc/fonts/fonts.conf
+ )
+ add_custom_target(fonts_conf ALL DEPENDS ${CMAKE_BINARY_DIR}/etc/fonts/fonts.conf)
+ install(DIRECTORY ${CMAKE_BINARY_DIR}/etc/fonts
+ DESTINATION etc)
+
+ # GTK 3.0
+ install(DIRECTORY ${MINGW_LIB}/gtk-3.0
+ DESTINATION lib
+ FILES_MATCHING
+ PATTERN "*.dll"
+ PATTERN "*.cache")
+
+ install(DIRECTORY ${MINGW_PATH}/etc/gtk-3.0
+ DESTINATION etc)
+
+ install(DIRECTORY ${MINGW_LIB}/gdk-pixbuf-2.0
+ DESTINATION lib
+ FILES_MATCHING
+ PATTERN "*.dll"
+ PATTERN "*.cache")
+
+ # Aspell dictionaries
+ install(DIRECTORY ${MINGW_LIB}/aspell-0.60
+ DESTINATION lib)
+
+ # Aspell backend for Enchant (gtkspell uses Enchant to access Aspell dictionaries)
+ install(FILES
+ ${MINGW_LIB}/enchant/libenchant_aspell.dll
+ DESTINATION lib/enchant)
+
+ # Necessary to run extensions on windows if it is not in the path
+ if (HAVE_MINGW64)
+ install(FILES
+ ${MINGW_BIN}/gspawn-win64-helper.exe
+ ${MINGW_BIN}/gspawn-win64-helper-console.exe
+ DESTINATION .)
+ else()
+ install(FILES
+ ${MINGW_BIN}/gspawn-win32-helper.exe
+ ${MINGW_BIN}/gspawn-win32-helper-console.exe
+ DESTINATION .)
+ endif()
+
+ # Python (a bit hacky for backwards compatibility with devlibs at this point)
+ install(FILES
+ ${MINGW_BIN}/python2.exe
+ RENAME python.exe
+ DESTINATION .)
+ install(FILES
+ ${MINGW_BIN}/python2w.exe
+ RENAME pythonw.exe
+ DESTINATION .)
+ install(FILES
+ ${MINGW_BIN}/libpython2.7.dll
+ DESTINATION .)
+ install(DIRECTORY ${MINGW_LIB}/python2.7
+ DESTINATION lib
+ PATTERN "python2.7/site-packages" EXCLUDE # specify individual packages to install below
+ PATTERN "python2.7/test" EXCLUDE # we don't need the Python testsuite
+ )
+
+ set(site_packages "lib/python2.7/site-packages")
+ # Python packages installed via pacman
+ set(packages "python2-lxml" "python2-numpy" "python2-pillow")
+ foreach(package ${packages})
+ list_files_pacman(${package} paths)
+ install_list(FILES ${paths}
+ ROOT ${MINGW_PATH}
+ INCLUDE ${site_packages} # only include content from "site-packages" (we might consider to install everything)
+ )
+ endforeach()
+ # Python packages installed via pip
+ set(packages "coverage" "pyserial" "scour" "six")
+ foreach(package ${packages})
+ list_files_pip(${package} paths)
+ install_list(FILES ${paths}
+ ROOT ${MINGW_PATH}/${site_packages}
+ DESTINATION ${site_packages}/
+ EXCLUDE "^\\.\\.\\/" # exclude content in parent directories (notably scripts installed to /bin)
+ )
+ endforeach()
+endif()
\ No newline at end of file diff --git a/CMakeScripts/Modules/FindSigC++.cmake b/CMakeScripts/Modules/FindSigC++.cmake deleted file mode 100644 index 14cbf47f7..000000000 --- a/CMakeScripts/Modules/FindSigC++.cmake +++ /dev/null @@ -1,128 +0,0 @@ -# - Try to find SIGC++ -# Once done this will define -# -# SIGC++_FOUND - system has SIGC++ -# SIGC++_INCLUDE_DIRS - the SIGC++ include directory -# SIGC++_LIBRARIES - Link these to use SIGC++ -# SIGC++_DEFINITIONS - Compiler switches required for using SIGC++ -# -# Copyright (c) 2008 Andreas Schneider <mail@cynapses.org> -# -# Redistribution and use is allowed according to the terms of the New -# BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - -if (SIGC++_LIBRARIES AND SIGC++_INCLUDE_DIRS) - # in cache already - set(SIGC++_FOUND TRUE) -else (SIGC++_LIBRARIES AND SIGC++_INCLUDE_DIRS) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - include(UsePkgConfig) - pkgconfig(sigc++-2.0 _SIGC++_INCLUDEDIR _SIGC++_LIBDIR _SIGC++_LDFLAGS _SIGC++_CFLAGS) - else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(_SIGC++ sigc++-2.0) - endif (PKG_CONFIG_FOUND) - endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - - find_path(SIGC++_INCLUDE_DIR - NAMES - sigc++/sigc++.h - PATHS - ${_SIGC++_INCLUDEDIR} - /usr/include - /usr/local/include - /opt/local/include - /sw/include - PATH_SUFFIXES - sigc++-2.0 - ) - - find_path(SIGC++_CONFIG_INCLUDE_DIR - NAMES - sigc++config.h - PATHS - ${_SIGC++_INCLUDEDIR} - /usr/include - /usr/local/include - /opt/local/include - /opt/local/lib/sigc++-2.0/include - /sw/include - /usr/lib/sigc++-2.0/include - /usr/lib64/sigc++-2.0/include - ) - - find_library(SIGC-2.0_LIBRARY - NAMES - sigc-2.0 - PATHS - ${_SIGC++_LIBDIR} - /usr/lib - /usr/local/lib - /opt/local/lib - /sw/lib - ) - - if (SIGC-2.0_LIBRARY) - set(SIGC-2.0_FOUND TRUE) - endif (SIGC-2.0_LIBRARY) - - set(SIGC++_INCLUDE_DIRS - ${SIGC++_INCLUDE_DIR} - ${SIGC++_CONFIG_INCLUDE_DIR} - ) - - if (SIGC-2.0_FOUND) - set(SIGC++_LIBRARIES - ${SIGC++_LIBRARIES} - ${SIGC-2.0_LIBRARY} - ) - endif (SIGC-2.0_FOUND) - - if (SIGC++_INCLUDE_DIRS AND SIGC++_LIBRARIES) - set(SIGC++_FOUND TRUE) - endif (SIGC++_INCLUDE_DIRS AND SIGC++_LIBRARIES) - - if (SIGC++_FOUND) - if (NOT SIGC++_FIND_QUIETLY) - message(STATUS "Found SIGC++: ${SIGC++_LIBRARIES}") - endif (NOT SIGC++_FIND_QUIETLY) - else (SIGC++_FOUND) - if (SIGC++_FIND_REQUIRED) - message(FATAL_ERROR "Could not find SIGC++") - endif (SIGC++_FIND_REQUIRED) - endif (SIGC++_FOUND) - - # show the SIGC++_INCLUDE_DIRS and SIGC++_LIBRARIES variables only in the advanced view - mark_as_advanced(SIGC++_INCLUDE_DIRS SIGC++_LIBRARIES) - -endif (SIGC++_LIBRARIES AND SIGC++_INCLUDE_DIRS) - -# Try to add -std=c++11 if needed - see: -# https://bugs.launchpad.net/inkscape/+bug/1488079 - -macro (sigcpp_compile extra_cppflags) - set(sigcpp_compile_output "") - try_compile(SIGCPP_COMPILES_FINE "${CMAKE_BINARY_DIR}/sigcpp-bindir" - SOURCES "${CMAKE_SOURCE_DIR}/CMakeScripts/Modules/sigcpp_test.cpp" - COMPILE_DEFINITIONS ${_SIGC++_CFLAGS} ${extra_cppflags} - LINK_LIBRARIES ${SIGC++_LIBRARIES} - OUTPUT_VARIABLE sigcpp_compile_output) -endmacro() - - -sigcpp_compile("") -if (NOT "${SIGCPP_COMPILES_FINE}") - set (cppflag "-std=c++11") - sigcpp_compile("${cppflag}") - if ("${SIGCPP_COMPILES_FINE}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${cppflag}") - else() - message(FATAL_ERROR "Could not compile against SIGC++ - output is <<${sigcpp_compile_output}>>") - endif() -endif() - diff --git a/CMakeScripts/Modules/Findyaml.cmake b/CMakeScripts/Modules/Findyaml.cmake new file mode 100644 index 000000000..154f2ed43 --- /dev/null +++ b/CMakeScripts/Modules/Findyaml.cmake @@ -0,0 +1,49 @@ +# - Try to find the YAML library +# Once done this will define +# +# YAML_FOUND - system has yaml +# YAML_INCLUDE_DIR - the yaml include directory +# YAML_LIBRARIES - the libraries needed to use yaml + +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if (YAML_INCLUDE_DIR AND YAML_LIBRARIES) + # in cache already + SET(YAML_FOUND TRUE) +else (YAML_INCLUDE_DIR AND YAML_LIBRARIES) + IF (NOT WIN32) + FIND_PACKAGE(PkgConfig) + IF (PKG_CONFIG_FOUND) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + pkg_check_modules(_YAML_PC QUIET yaml-1) + ENDIF (PKG_CONFIG_FOUND) + ENDIF (NOT WIN32) + + FIND_PATH(YAML_INCLUDE_DIR yaml.h + /usr/include + /usr/local/include + ) + + FIND_LIBRARY(YAML_LIBRARIES NAMES yaml + PATHS) + + if (YAML_INCLUDE_DIR AND YAML_LIBRARIES) + set(YAML_FOUND TRUE) + endif (YAML_INCLUDE_DIR AND YAML_LIBRARIES) + + + if (YAML_FOUND) + if (NOT YAML_FIND_QUIETLY) + message(STATUS "Found YAML: ${YAML_LIBRARIES}") + endif (NOT YAML_FIND_QUIETLY) + else (YAML_FOUND) + if (YAML_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find YAML") + endif (YAML_FIND_REQUIRED) + endif (YAML_FOUND) + + MARK_AS_ADVANCED(YAML_INCLUDE_DIR YAML_LIBRARIES) + +endif (YAML_INCLUDE_DIR AND YAML_LIBRARIES) diff --git a/CMakeScripts/Modules/sigcpp_test.cpp b/CMakeScripts/Modules/sigcpp_test.cpp deleted file mode 100644 index b4cf2c773..000000000 --- a/CMakeScripts/Modules/sigcpp_test.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Building this using: - - g++ `pkg-config --cflags sigc++-2.0` sigcpp_test.cpp - - Results in an error. - * */ -#include <stddef.h> -#include <string> -#include <sigc++/signal.h> - -int main() -{ - return 0; -} diff --git a/CMakeScripts/Pod2man.cmake b/CMakeScripts/Pod2man.cmake index 3189192de..21010fb33 100644 --- a/CMakeScripts/Pod2man.cmake +++ b/CMakeScripts/Pod2man.cmake @@ -28,10 +28,12 @@ macro(pod2man PODFILE_FULL RELEASE SECTION CENTER) set(MANPAGE_TARGET "man-${NAME}-${LANG}") set(MANFILE_TEMP "${CMAKE_CURRENT_BINARY_DIR}/man/${NAME}.${LANG}.tmp") set(MANFILE_FULL "${CMAKE_CURRENT_BINARY_DIR}/man/${NAME}.${LANG}.${SECTION}") + set(MANFILE_DEST "${CMAKE_INSTALL_PREFIX}/${SHARE_INSTALL}/man/${LANG}/man${SECTION}") else() set(MANPAGE_TARGET "man-${NAME}") set(MANFILE_TEMP "${CMAKE_CURRENT_BINARY_DIR}/man/${NAME}.tmp") set(MANFILE_FULL "${CMAKE_CURRENT_BINARY_DIR}/man/${NAME}.${SECTION}") + set(MANFILE_DEST "${CMAKE_INSTALL_PREFIX}/${SHARE_INSTALL}/man/man${SECTION}") endif() add_custom_command( OUTPUT ${MANFILE_TEMP} @@ -48,7 +50,8 @@ macro(pod2man PODFILE_FULL RELEASE SECTION CENTER) ) install( FILES ${MANFILE_FULL} - DESTINATION ${CMAKE_INSTALL_PREFIX}/${SHARE_INSTALL}/man/man${SECTION} + RENAME ${NAME}.${SECTION} + DESTINATION ${MANFILE_DEST} ) endif() endmacro(pod2man PODFILE NAME SECTION CENTER) diff --git a/CMakeScripts/cmake_consistency_check.py b/CMakeScripts/cmake_consistency_check.py index 53026910e..64419936b 100755 --- a/CMakeScripts/cmake_consistency_check.py +++ b/CMakeScripts/cmake_consistency_check.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # $Id: cmake_consistency_check.py 38869 2011-07-31 03:15:37Z campbellbarton $ # ***** BEGIN GPL LICENSE BLOCK ***** @@ -23,13 +23,22 @@ # <pep8 compliant> -from cmake_consistency_check_config import IGNORE, UTF8_CHECK, SOURCE_DIR +import sys +if not sys.version.startswith("3"): + print("\nPython3.x needed, found %s.\nAborting!\n" % + sys.version.partition(" ")[0]) + sys.exit(1) + +from cmake_consistency_check_config import ( + IGNORE, + UTF8_CHECK, + SOURCE_DIR, +) + import os from os.path import join, dirname, normpath, splitext -print("Scanning:", SOURCE_DIR) - global_h = set() global_c = set() global_refs = {} @@ -53,7 +62,7 @@ def replace_line(f, i, text, keep_indent=True): def source_list(path, filename_check=None): for dirpath, dirnames, filenames in os.walk(path): - # skip '.svn' + # skip '.bzr' if dirpath.startswith("."): continue @@ -70,12 +79,12 @@ def is_cmake(filename): def is_c_header(filename): ext = splitext(filename)[1] - return (ext in (".h", ".hpp", ".hxx")) + return (ext in {".h", ".hpp", ".hxx", ".hh"}) def is_c(filename): ext = splitext(filename)[1] - return (ext in (".c", ".cpp", ".cxx", ".m", ".mm", ".rc")) + return (ext in {".c", ".cpp", ".cxx", ".m", ".mm", ".rc", ".cc", ".inl"}) def is_c_any(filename): @@ -87,13 +96,16 @@ def cmake_get_src(f): sources_h = [] sources_c = [] - filen = open(f, "r") + filen = open(f, "r", encoding="utf8") it = iter(filen) found = False i = 0 # print(f) def is_definition(l, f, i, name): + if l.startswith("unset("): + return False + if ('set(%s' % name) in l or ('set(' in l and l.endswith(name)): if len(l.split()) > 1: raise Exception("strict formatting not kept 'set(%s*' %s:%d" % (name, f, i)) @@ -146,6 +158,7 @@ def cmake_get_src(f): # replace dirs l = l.replace("${CMAKE_CURRENT_SOURCE_DIR}", cmake_base) + l = l.strip('"') if not l: pass @@ -166,13 +179,21 @@ def cmake_get_src(f): elif is_c(new_file): sources_c.append(new_file) global_refs.setdefault(new_file, []).append((f, i)) - elif l in ("PARENT_SCOPE", ): + elif l in {"PARENT_SCOPE", }: # cmake var, ignore pass elif new_file.endswith(".list"): pass elif new_file.endswith(".def"): pass + elif new_file.endswith(".cl"): # opencl + pass + elif new_file.endswith(".cu"): # cuda + pass + elif new_file.endswith(".osl"): # open shading language + pass + elif new_file.endswith(".glsl"): + pass else: raise Exception("unknown file type - not c or h %s -> %s" % (f, new_file)) @@ -183,11 +204,11 @@ def cmake_get_src(f): if new_path_rel != l: print("overly relative path:\n %s:%d\n %s\n %s" % (f, i, l, new_path_rel)) - ## Save time. just replace the line + # # Save time. just replace the line # replace_line(f, i - 1, new_path_rel) else: - raise Exception("non existant include %s:%d -> %s" % (f, i, new_file)) + raise Exception("non existent include %s:%d -> %s" % (f, i, new_file)) # print(new_file) @@ -208,90 +229,103 @@ def cmake_get_src(f): ''' # reset - sources_h[:] = [] - sources_c[:] = [] + del sources_h[:] + del sources_c[:] filen.close() -for cmake in source_list(SOURCE_DIR, is_cmake): - cmake_get_src(cmake) - - -def is_ignore(f): - for ig in IGNORE: +def is_ignore(f, ignore_used): + for index, ig in enumerate(IGNORE): if ig in f: + ignore_used[index] = True return True return False -# First do stupid check, do these files exist? -print("\nChecking for missing references:") -is_err = False -errs = [] -for f in (global_h | global_c): - if f.endswith("dna.c"): - continue - - if not os.path.exists(f): - refs = global_refs[f] - if refs: - for cf, i in refs: - errs.append((cf, i)) - else: - raise Exception("CMake referenecs missing, internal error, aborting!") - is_err = True - -errs.sort() -errs.reverse() -for cf, i in errs: - print("%s:%d" % (cf, i)) - # Write a 'sed' script, useful if we get a lot of these - # print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf)) - - -if is_err: - raise Exception("CMake referenecs missing files, aborting!") -del is_err -del errs - -# now check on files not accounted for. -print("\nC/C++ Files CMake doesnt know about...") -for cf in sorted(source_list(SOURCE_DIR, is_c)): - if not is_ignore(cf): - if cf not in global_c: - print("missing_c: ", cf) - - # check if automake builds a corrasponding .o file. - ''' - if cf in global_c: - out1 = os.path.splitext(cf)[0] + ".o" - out2 = os.path.splitext(cf)[0] + ".Po" - out2_dir, out2_file = out2 = os.path.split(out2) - out2 = os.path.join(out2_dir, ".deps", out2_file) - if not os.path.exists(out1) and not os.path.exists(out2): - print("bad_c: ", cf) - ''' - -print("\nC/C++ Headers CMake doesnt know about...") -for hf in sorted(source_list(SOURCE_DIR, is_c_header)): - if not is_ignore(hf): - if hf not in global_h: - print("missing_h: ", hf) - -if UTF8_CHECK: - # test encoding - import traceback - for files in (global_c, global_h): - for f in sorted(files): - if os.path.exists(f): - # ignore outside of our source tree - if "extern" not in f: - i = 1 - try: - for l in open(f, "r", encoding="utf8"): - i += 1 - except: - print("Non utf8: %s:%d" % (f, i)) - if i > 1: - traceback.print_exc() +def main(): + + print("Scanning:", SOURCE_DIR) + + for cmake in source_list(SOURCE_DIR, is_cmake): + cmake_get_src(cmake) + + # First do stupid check, do these files exist? + print("\nChecking for missing references:") + is_err = False + errs = [] + for f in (global_h | global_c): + + if not os.path.exists(f): + refs = global_refs[f] + if refs: + for cf, i in refs: + errs.append((cf, i)) + else: + raise Exception("CMake referenecs missing, internal error, aborting!") + is_err = True + + errs.sort() + errs.reverse() + for cf, i in errs: + print("%s:%d" % (cf, i)) + # Write a 'sed' script, useful if we get a lot of these + # print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf)) + + if is_err: + raise Exception("CMake referenecs missing files, aborting!") + del is_err + del errs + + ignore_used = [False] * len(IGNORE) + + # now check on files not accounted for. + print("\nC/C++ Files CMake doesnt know about...") + for cf in sorted(source_list(SOURCE_DIR, is_c)): + if not is_ignore(cf, ignore_used): + if cf not in global_c: + print("missing_c: ", cf) + + # check if automake builds a corrasponding .o file. + ''' + if cf in global_c: + out1 = os.path.splitext(cf)[0] + ".o" + out2 = os.path.splitext(cf)[0] + ".Po" + out2_dir, out2_file = out2 = os.path.split(out2) + out2 = os.path.join(out2_dir, ".deps", out2_file) + if not os.path.exists(out1) and not os.path.exists(out2): + print("bad_c: ", cf) + ''' + + print("\nC/C++ Headers CMake doesnt know about...") + for hf in sorted(source_list(SOURCE_DIR, is_c_header)): + if not is_ignore(hf, ignore_used): + if hf not in global_h: + print("missing_h: ", hf) + + if UTF8_CHECK: + # test encoding + import traceback + for files in (global_c, global_h): + for f in sorted(files): + if os.path.exists(f): + # ignore outside of our source tree + if "extern" not in f: + i = 1 + try: + for l in open(f, "r", encoding="utf8"): + i += 1 + except UnicodeDecodeError: + print("Non utf8: %s:%d" % (f, i)) + if i > 1: + traceback.print_exc() + + # Check ignores aren't stale + print("\nCheck for unused 'IGNORE' paths...") + for index, ig in enumerate(IGNORE): + if not ignore_used[index]: + print("unused ignore: %r" % ig) + + +if __name__ == "__main__": + main() diff --git a/CMakeScripts/inkscape-version.cmake b/CMakeScripts/inkscape-version.cmake index 2155e0013..2e23925c4 100644 --- a/CMakeScripts/inkscape-version.cmake +++ b/CMakeScripts/inkscape-version.cmake @@ -7,13 +7,23 @@ # We should extract the version from build.xml # but for now just hard code + set(INKSCAPE_REVISION "unknown") +set(INKSCAPE_CUSTOM "custom") if(EXISTS ${INKSCAPE_SOURCE_DIR}/.bzr/) execute_process(COMMAND bzr revno --tree ${INKSCAPE_SOURCE_DIR} OUTPUT_VARIABLE INKSCAPE_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE) + + execute_process(COMMAND + bzr status -S -V ${INKSCAPE_SOURCE_DIR}/src + OUTPUT_VARIABLE INKSCAPE_SOURCE_MODIFIED + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT INKSCAPE_SOURCE_MODIFIED STREQUAL "") + set(INKSCAPE_REVISION "${INKSCAPE_REVISION} ${INKSCAPE_CUSTOM}") + endif() endif() message("revision is " ${INKSCAPE_REVISION}) |
