summaryrefslogtreecommitdiffstats
path: root/CMakeScripts/Modules
diff options
context:
space:
mode:
authorMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:56:11 +0000
committerMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:56:11 +0000
commit132e83fd6f6124731dc773ae2978d115ca492ef2 (patch)
treeb561a4dbbacd7eecbdbae3fa220a353375ccecf8 /CMakeScripts/Modules
parentupdated to trunk (diff)
parent[Bug #1695016] Xaml export misses some radialGradients. (diff)
downloadinkscape-132e83fd6f6124731dc773ae2978d115ca492ef2.tar.gz
inkscape-132e83fd6f6124731dc773ae2978d115ca492ef2.zip
merged with latest version of lpe-bool and trunk
(bzr r14862.2.3)
Diffstat (limited to 'CMakeScripts/Modules')
-rw-r--r--CMakeScripts/Modules/FindSigC++.cmake128
-rw-r--r--CMakeScripts/Modules/Findyaml.cmake49
-rw-r--r--CMakeScripts/Modules/sigcpp_test.cpp15
3 files changed, 49 insertions, 143 deletions
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;
-}