1
0
Fork 0

Revert to simgears thread support. Flightgear side.

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.
This commit is contained in:
Mathias Froehlich 2011-09-01 21:05:50 +02:00
parent c158619e3c
commit 6b6238293f
5 changed files with 31 additions and 31 deletions

View 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)

View 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}

View 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()

View 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)

View 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)