Source: openscenegraph
Version: 3.6.5+dfsg1-8
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs
openscenegraph fails to cross build from source, because it uses
CHECK_CXX_SOURCE_RUNS. The invocation around atomics is difficult to
avoid, but the one for poppler-glib is quite easy to avoid. Hence I'm
sending a patch for the latter to incrementally move things forward. We
may use CHECK_SYMBOL_EXISTS there instead.
Helmut
--- openscenegraph-3.6.5+dfsg1.orig/CMakeModules/FindPoppler-glib.cmake
+++ openscenegraph-3.6.5+dfsg1/CMakeModules/FindPoppler-glib.cmake
@@ -10,23 +10,12 @@
IF (POPPLER_FOUND)
- INCLUDE(CheckCXXSourceRuns)
+ INCLUDE(CheckSymbolExists)
SET(CMAKE_REQUIRED_INCLUDES ${POPPLER_INCLUDE_DIRS})
# Do step by step checking,
- CHECK_CXX_SOURCE_RUNS("
- #include <cstdlib>
- #include <poppler.h>
- int main()
- {
- #ifdef POPPLER_HAS_CAIRO
- return EXIT_SUCCESS;
- #else
- return EXIT_FAILURE
- #endif
- }
- " POPPLER_HAS_CAIRO)
+ CHECK_SYMBOL_EXISTS(POPPLER_HAS_CAIRO "poppler.h" POPPLER_HAS_CAIRO)
IF (NOT POPPLER_HAS_CAIRO)
SET(POPPLER_FOUND FALSE)