From 6efece51f99980b824b199bbeb6452f03e6736c6 Mon Sep 17 00:00:00 2001 From: Dmitry Zhulanov Date: Tue, 27 Sep 2016 00:23:14 +0700 Subject: add x-verbs support (bzr r15136.1.1) --- CMakeScripts/Modules/Findyaml.cmake | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 CMakeScripts/Modules/Findyaml.cmake (limited to 'CMakeScripts/Modules') diff --git a/CMakeScripts/Modules/Findyaml.cmake b/CMakeScripts/Modules/Findyaml.cmake new file mode 100644 index 000000000..0324c6b83 --- /dev/null +++ b/CMakeScripts/Modules/Findyaml.cmake @@ -0,0 +1,53 @@ +# - 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 yaml123.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) -- cgit v1.2.3 From 81364db0bc98b01319dc5ecb835a4e37b906bad2 Mon Sep 17 00:00:00 2001 From: Dmitry Zhulanov Date: Sat, 1 Oct 2016 13:05:10 +0700 Subject: disable xverb feature if WITH_YAML defined (bzr r15136.1.9) --- CMakeScripts/Modules/Findyaml.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeScripts/Modules') diff --git a/CMakeScripts/Modules/Findyaml.cmake b/CMakeScripts/Modules/Findyaml.cmake index 0324c6b83..d3f00cd13 100644 --- a/CMakeScripts/Modules/Findyaml.cmake +++ b/CMakeScripts/Modules/Findyaml.cmake @@ -24,7 +24,7 @@ else (YAML_INCLUDE_DIR AND YAML_LIBRARIES) ENDIF (PKG_CONFIG_FOUND) ENDIF (NOT WIN32) - FIND_PATH(YAML_INCLUDE_DIR yaml123.h + FIND_PATH(YAML_INCLUDE_DIR yaml.h /usr/include /usr/local/include ) -- cgit v1.2.3 From f9a55c6269f20bfe98e1eeb0dd07f5bb3036b7ab Mon Sep 17 00:00:00 2001 From: Dmitry Zhulanov Date: Mon, 3 Oct 2016 22:19:23 +0700 Subject: beautify idents (bzr r15136.1.14) --- CMakeScripts/Modules/Findyaml.cmake | 74 ++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 39 deletions(-) (limited to 'CMakeScripts/Modules') diff --git a/CMakeScripts/Modules/Findyaml.cmake b/CMakeScripts/Modules/Findyaml.cmake index d3f00cd13..154f2ed43 100644 --- a/CMakeScripts/Modules/Findyaml.cmake +++ b/CMakeScripts/Modules/Findyaml.cmake @@ -9,45 +9,41 @@ # For details see the accompanying COPYING-CMAKE-SCRIPTS file. if (YAML_INCLUDE_DIR AND YAML_LIBRARIES) - - # in cache already - SET(YAML_FOUND TRUE) - + # 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) + 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) -- cgit v1.2.3 From 94011e762ba541fb9b9733a9fc00a01442e374cf Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sun, 5 Feb 2017 00:13:08 +0100 Subject: CMake: Remove duplicated check for sigc++ - It didn't make much sense to check twice anyway - The additional check for C++11 is not required anymore after r15039 as we use -std=c++11 by default now - The check broke subsequent cmake runs on Windows (i.e. compilation broke whenever a .cmake file changed and CMakeCache hat to be cleared manually) http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/15039 (bzr r15475) --- CMakeScripts/Modules/FindSigC++.cmake | 128 ---------------------------------- CMakeScripts/Modules/sigcpp_test.cpp | 15 ---- 2 files changed, 143 deletions(-) delete mode 100644 CMakeScripts/Modules/FindSigC++.cmake delete mode 100644 CMakeScripts/Modules/sigcpp_test.cpp (limited to 'CMakeScripts/Modules') 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 -# -# 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/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 -#include -#include - -int main() -{ - return 0; -} -- cgit v1.2.3