summaryrefslogtreecommitdiffstats
path: root/CMakeScripts
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@gmail.com>2016-04-14 14:58:56 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2016-04-14 14:58:56 +0000
commit2b635a500e8844e5788d8178d13887c2b5ace640 (patch)
tree58dde5d6553dfe791335a79e2c6206dfeb20e906 /CMakeScripts
parentFix for make check (diff)
downloadinkscape-2b635a500e8844e5788d8178d13887c2b5ace640.tar.gz
inkscape-2b635a500e8844e5788d8178d13887c2b5ace640.zip
Fix c++11 flag when required on non-debian-based systems
(bzr r14844)
Diffstat (limited to 'CMakeScripts')
-rw-r--r--CMakeScripts/DefineDependsandFlags.cmake3
-rw-r--r--CMakeScripts/Modules/FindSigC++.cmake6
2 files changed, 7 insertions, 2 deletions
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
index 4429758c0..00c2131e2 100644
--- a/CMakeScripts/DefineDependsandFlags.cmake
+++ b/CMakeScripts/DefineDependsandFlags.cmake
@@ -368,6 +368,9 @@ 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})
diff --git a/CMakeScripts/Modules/FindSigC++.cmake b/CMakeScripts/Modules/FindSigC++.cmake
index 8046410b5..14cbf47f7 100644
--- a/CMakeScripts/Modules/FindSigC++.cmake
+++ b/CMakeScripts/Modules/FindSigC++.cmake
@@ -106,10 +106,12 @@ endif (SIGC++_LIBRARIES AND SIGC++_INCLUDE_DIRS)
# 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})
+ LINK_LIBRARIES ${SIGC++_LIBRARIES}
+ OUTPUT_VARIABLE sigcpp_compile_output)
endmacro()
@@ -120,7 +122,7 @@ if (NOT "${SIGCPP_COMPILES_FINE}")
if ("${SIGCPP_COMPILES_FINE}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${cppflag}")
else()
- message(FATAL_ERROR "Could not compile against SIGC++")
+ message(FATAL_ERROR "Could not compile against SIGC++ - output is <<${sigcpp_compile_output}>>")
endif()
endif()