]> git.mxchange.org Git - flightgear.git/commitdiff
Disable OSG dependencies to osg/Vec2 for simgear compile test.
authorThorstenB <brehmt@gmail.com>
Sun, 19 Feb 2012 21:12:52 +0000 (22:12 +0100)
committerThorstenB <brehmt@gmail.com>
Sun, 19 Feb 2012 21:12:52 +0000 (22:12 +0100)
CMakeModules/FindSimGear.cmake

index 4094904265c9682693a46645eef18c9e3a85f00e..0be68ba0d0c6c7dd9e473078c94b8924d89d6179 100644 (file)
@@ -231,6 +231,8 @@ SET(CMAKE_REQUIRED_INCLUDES ${SIMGEAR_INCLUDE_DIR})
 # clear cache, run a fresh compile test every time
 unset(SIMGEAR_COMPILE_TEST CACHE)
 
+# disable OSG dependencies for test-compiling
+set(CMAKE_REQUIRED_DEFINITIONS "-DNO_OPENSCENEGRAPH_INTERFACE")
 check_cxx_source_runs(
     "#include <cstdio>
     #include \"simgear/version.h\"
@@ -266,6 +268,7 @@ if(NOT SIMGEAR_COMPILE_TEST)
     message(FATAL_ERROR "Oops, you have installed SimGear includes, however test compiling failed. "
             "Try removing 'CMakeCache.txt' and reconfigure with 'cmake'.")
 endif()
+unset(CMAKE_REQUIRED_DEFINITIONS)
 
 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(SimGear DEFAULT_MSG