]> git.mxchange.org Git - flightgear.git/commitdiff
Revert to simgears thread support. Flightgear side.
authorMathias Froehlich <Mathias.Froehlich@web.de>
Thu, 1 Sep 2011 19:05:50 +0000 (21:05 +0200)
committerMathias Froehlich <Mathias.Froehlich@web.de>
Tue, 6 Sep 2011 05:31:12 +0000 (07:31 +0200)
For all source directories outside of simgear/scene,
which really depends very hard on osg, avoid using osg
classes. This should reenable the use of some basic and
scenegraph independent parts of simgear without the
the need for osg.

CMakeModules/FindSimGear.cmake
utils/GPSsmooth/CMakeLists.txt
utils/TerraSync/CMakeLists.txt
utils/fgpanel/CMakeLists.txt
utils/fgviewer/CMakeLists.txt

index b8c446bba34a02d276102a69304ebd67619f5c56..c7dc1b3e2668b976ab24b9190f641d546d35389c 100644 (file)
@@ -1,7 +1,7 @@
 # Locate SimGear
 # This module defines
 # SIMGEAR_LIBRARIES
-# SIMGEAR_FOUND, if false, do not try to link to SimGear 
+# SIMGEAR_FOUND, if false, do not try to link to SimGear
 # SIMGEAR_INCLUDE_DIR, where to find the headers
 #
 # $SIMGEAR_DIR is an environment variable that would
@@ -30,7 +30,7 @@
 # /System/Library/Frameworks/SimGear.framework/Headers
 #
 # On OS X, this will prefer the Framework version (if found) over others.
-# People will have to manually change the cache values of 
+# People will have to manually change the cache values of
 # SimGear_LIBRARIES to override this selection or set the CMake environment
 # CMAKE_INCLUDE_PATH to modify the search paths.
 
@@ -38,7 +38,7 @@ include(SelectLibraryConfigurations)
 
 FIND_PATH(SIMGEAR_INCLUDE_DIR simgear/math/SGMath.hxx
   HINTS $ENV{SIMGEAR_DIR}
-  PATH_SUFFIXES include 
+  PATH_SUFFIXES include
   PATHS
   ~/Library/Frameworks
   /Library/Frameworks
@@ -103,9 +103,9 @@ macro(find_sg_component comp libs)
 endmacro()
 
 
-if(${SIMGEAR_LIBRARIES} STREQUAL "SIMGEAR_LIBRARIES-NOTFOUND")  
+if(${SIMGEAR_LIBRARIES} STREQUAL "SIMGEAR_LIBRARIES-NOTFOUND")
     set(SIMGEAR_LIBRARIES "") # clear value
-    
+
     if(NOT MSVC)
         # Olaf indicates that linking the threads libs causes failures
         # on MSVC builds
@@ -115,7 +115,7 @@ if(${SIMGEAR_LIBRARIES} STREQUAL "SIMGEAR_LIBRARIES-NOTFOUND")
   # note the order here affects the order Simgear libraries are
   # linked in, and hence ability to link when using a traditional
   # linker such as GNU ld on Linux
-    set(comps 
+    set(comps
         ephem
         tsync
         environment
@@ -123,13 +123,12 @@ if(${SIMGEAR_LIBRARIES} STREQUAL "SIMGEAR_LIBRARIES-NOTFOUND")
         sky
         material
         tgdb
-        model    
+        model
         screen
         bucket
         bvh
         util route
         timing
-        ${thread_lib}
         io
         serial
         sound
@@ -137,10 +136,11 @@ if(${SIMGEAR_LIBRARIES} STREQUAL "SIMGEAR_LIBRARIES-NOTFOUND")
         props
         xml
         misc
-        debug 
+        ${thread_lib}
+        debug
         magvar
         math)
-    
+
     foreach(component ${comps})
         find_sg_component(${component} SIMGEAR_LIBRARIES)
     endforeach()
@@ -157,14 +157,14 @@ SET(CMAKE_REQUIRED_INCLUDES ${SIMGEAR_INCLUDE_DIR})
 check_cxx_source_runs(
     "#include <cstdio>
     #include \"simgear/version.h\"
-    
+
     #define xstr(s) str(s)
     #define str(s) #s
-     
+
     #define MIN_MAJOR ${SimGear_FIND_VERSION_MAJOR}
     #define MIN_MINOR ${SimGear_FIND_VERSION_MINOR}
     #define MIN_MICRO ${SimGear_FIND_VERSION_PATCH}
-    
+
     int main() {
         int major, minor, micro;
 
@@ -185,6 +185,6 @@ check_cxx_source_runs(
     SIMGEAR_VERSION_OK)
 
 include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(SimGear DEFAULT_MSG 
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(SimGear DEFAULT_MSG
      SIMGEAR_LIBRARIES SIMGEAR_INCLUDE_DIR SIMGEAR_VERSION_OK)
 
index 453e2369ce7922e8c4c04bdf96ebc96608b5f2aa..5a586d0c4a5a9a9b9dcc54d9337bac31de470972 100644 (file)
@@ -3,10 +3,11 @@ add_executable(GPSsmooth gps.cxx gps_main.cxx)
 add_executable(MIDGsmooth MIDG-II.cxx MIDG_main.cxx)
 add_executable(UGsmooth UGear.cxx UGear_command.cxx UGear_main.cxx UGear_telnet.cxx)
 
-target_link_libraries(GPSsmooth 
+target_link_libraries(GPSsmooth
        ${SIMGEAR_IO_LIBRARY}
        ${SIMGEAR_MISC_LIBRARY}
        ${SIMGEAR_STRUCTURE_LIBRARY}
+       ${SIMGEAR_THREADS_LIBRARY}
        ${SIMGEAR_TIMING_LIBRARY}
        ${SIMGEAR_DEBUG_LIBRARY}
        ${PLIB_SG_LIBRARY}
@@ -15,18 +16,17 @@ target_link_libraries(GPSsmooth
        ${WINMM_LIBRARY}
        ${WINSOCK_LIBRARY}
        ${ZLIB_LIBRARIES}
-  ${OPENTHREADS_LIBRARIES}
        ${RT_LIBRARY}
 )
 
-target_link_libraries(MIDGsmooth 
+target_link_libraries(MIDGsmooth
        ${SIMGEAR_IO_LIBRARY}
        ${SIMGEAR_MATH_LIBRARY}
        ${SIMGEAR_SERIAL_LIBRARY}
        ${SIMGEAR_STRUCTURE_LIBRARY}
+       ${SIMGEAR_THREADS_LIBRARY}
        ${SIMGEAR_TIMING_LIBRARY}
        ${SIMGEAR_DEBUG_LIBRARY}
-  ${OPENTHREADS_LIBRARIES}
        ${PLIB_SG_LIBRARY}
        ${PLIB_UL_LIBRARY}
        ${WINMM_LIBRARY}
@@ -34,15 +34,15 @@ target_link_libraries(MIDGsmooth
        ${RT_LIBRARY}
 )
 
-target_link_libraries(UGsmooth 
+target_link_libraries(UGsmooth
        ${SIMGEAR_DEBUG_LIBRARY}
        ${SIMGEAR_IO_LIBRARY}
        ${SIMGEAR_MATH_LIBRARY}
        ${SIMGEAR_MISC_LIBRARY}
        ${SIMGEAR_SERIAL_LIBRARY}
        ${SIMGEAR_STRUCTURE_LIBRARY}
+       ${SIMGEAR_THREADS_LIBRARY}
        ${SIMGEAR_TIMING_LIBRARY}
-  ${OPENTHREADS_LIBRARIES}
        ${PLIB_SG_LIBRARY}
        ${PLIB_UL_LIBRARY}
        ${WINMM_LIBRARY}
index 25c01f08419803f218f1c40c471f5614f30a18bf..0fc13133e4d38cb9b7c7577abd0b11e37bd38229 100644 (file)
@@ -1,17 +1,17 @@
 
-       
+
 add_executable(terrasync terrasync.cxx)
 
-target_link_libraries(terrasync 
+target_link_libraries(terrasync
        ${SIMGEAR_LIBRARIES}
-  ${OPENTHREADS_LIBRARIES}
        ${ZLIB_LIBRARIES}
-    ${WINSOCK_LIBRARY})
+    ${WINSOCK_LIBRARY}
+    ${RT_LIBRARY})
 
 if(LIBSVN_FOUND)
        target_link_libraries(terrasync ${LIBSVN_LIBRARIES})
        set_property(TARGET terrasync APPEND PROPERTY COMPILE_FLAGS "${APR_CFLAGS}")
-       
+
        IF(APPLE)
            set_property(SOURCE terrasync.cxx PROPERTY COMPILE_FLAGS "-iwithsysroot ${LIBSVN_INCLUDE_DIR}")
        ELSE()
index 3595bf1642093facca27b585584d206afa3028e9..9feca02e64ebb5d5f7e87f5f571b69bcebb77c5b 100644 (file)
@@ -16,14 +16,13 @@ if(GLUT_FOUND)
                panel_io.cxx)
 
        target_link_libraries(fgpanel 
-               ${RT_LIBRARY}
                ${PNG_LIBRARIES}
                ${GLUT_LIBRARIES}
                ${SIMGEAR_LIBRARIES}
-    ${OPENTHREADS_LIBRARIES}
                ${OPENGL_LIBRARIES}
                ${ZLIB_LIBRARIES}
                ${PLIB_LIBRARIES}
+               ${RT_LIBRARY}
                )
 
        install(TARGETS fgpanel RUNTIME DESTINATION bin)
index f6654788b39b26374b858d806d6d9f8c44322038..5872d8a80e2c4d70064c85204e3ad7a663317883 100644 (file)
@@ -1,11 +1,12 @@
 
 add_executable(fgviewer fgviewer.cxx)
 
-target_link_libraries(fgviewer 
+target_link_libraries(fgviewer
        ${SIMGEAR_LIBRARIES}
-       ${OPENSCENEGRAPH_LIBRARIES} 
+       ${OPENSCENEGRAPH_LIBRARIES}
        ${OPENGL_LIBRARIES}
        ${ZLIB_LIBRARIES}
-       ${PLIB_LIBRARIES})
-       
+       ${PLIB_LIBRARIES}
+        ${RT_LIBRARY})
+
 install(TARGETS fgviewer RUNTIME DESTINATION bin)