diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-02-04 23:13:08 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-02-04 23:13:08 +0000 |
| commit | 94011e762ba541fb9b9733a9fc00a01442e374cf (patch) | |
| tree | 01b823f7d39d5ce6155803cdeaacd3862f7c3a72 /CMakeScripts/Modules | |
| parent | Fixes bug:1654808 along a option to fuse when paths points are coincidant (diff) | |
| download | inkscape-94011e762ba541fb9b9733a9fc00a01442e374cf.tar.gz inkscape-94011e762ba541fb9b9733a9fc00a01442e374cf.zip | |
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)
Diffstat (limited to 'CMakeScripts/Modules')
| -rw-r--r-- | CMakeScripts/Modules/FindSigC++.cmake | 128 | ||||
| -rw-r--r-- | CMakeScripts/Modules/sigcpp_test.cpp | 15 |
2 files changed, 0 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/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; -} |
