From 0ba48793ea260849afd67d57bd73104c502e1687 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 19 Feb 2012 22:12:52 +0100 Subject: [PATCH] Disable OSG dependencies to osg/Vec2 for simgear compile test. --- CMakeModules/FindSimGear.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeModules/FindSimGear.cmake b/CMakeModules/FindSimGear.cmake index 409490426..0be68ba0d 100644 --- a/CMakeModules/FindSimGear.cmake +++ b/CMakeModules/FindSimGear.cmake @@ -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 #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