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 # Locate SimGear
# This module defines # This module defines
# SIMGEAR_LIBRARIES # 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_INCLUDE_DIR, where to find the headers
# #
# $SIMGEAR_DIR is an environment variable that would # $SIMGEAR_DIR is an environment variable that would
@ -30,7 +30,7 @@
# /System/Library/Frameworks/SimGear.framework/Headers # /System/Library/Frameworks/SimGear.framework/Headers
# #
# On OS X, this will prefer the Framework version (if found) over others. # 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 # SimGear_LIBRARIES to override this selection or set the CMake environment
# CMAKE_INCLUDE_PATH to modify the search paths. # CMAKE_INCLUDE_PATH to modify the search paths.
@ -38,7 +38,7 @@ include(SelectLibraryConfigurations)
FIND_PATH(SIMGEAR_INCLUDE_DIR simgear/math/SGMath.hxx FIND_PATH(SIMGEAR_INCLUDE_DIR simgear/math/SGMath.hxx
HINTS $ENV{SIMGEAR_DIR} HINTS $ENV{SIMGEAR_DIR}
PATH_SUFFIXES include PATH_SUFFIXES include
PATHS PATHS
~/Library/Frameworks ~/Library/Frameworks
/Library/Frameworks /Library/Frameworks
@ -103,9 +103,9 @@ macro(find_sg_component comp libs)
endmacro() endmacro()
if(${SIMGEAR_LIBRARIES} STREQUAL "SIMGEAR_LIBRARIES-NOTFOUND") if(${SIMGEAR_LIBRARIES} STREQUAL "SIMGEAR_LIBRARIES-NOTFOUND")
set(SIMGEAR_LIBRARIES "") # clear value set(SIMGEAR_LIBRARIES "") # clear value
if(NOT MSVC) if(NOT MSVC)
# Olaf indicates that linking the threads libs causes failures # Olaf indicates that linking the threads libs causes failures
# on MSVC builds # on MSVC builds
@ -115,7 +115,7 @@ if(${SIMGEAR_LIBRARIES} STREQUAL "SIMGEAR_LIBRARIES-NOTFOUND")
# note the order here affects the order Simgear libraries are # note the order here affects the order Simgear libraries are
# linked in, and hence ability to link when using a traditional # linked in, and hence ability to link when using a traditional
# linker such as GNU ld on Linux # linker such as GNU ld on Linux
set(comps set(comps
ephem ephem
tsync tsync
environment environment
@ -123,13 +123,12 @@ if(${SIMGEAR_LIBRARIES} STREQUAL "SIMGEAR_LIBRARIES-NOTFOUND")
sky sky
material material
tgdb tgdb
model model
screen screen
bucket bucket
bvh bvh
util route util route
timing timing
${thread_lib}
io io
serial serial
sound sound
@ -137,10 +136,11 @@ if(${SIMGEAR_LIBRARIES} STREQUAL "SIMGEAR_LIBRARIES-NOTFOUND")
props props
xml xml
misc misc
debug ${thread_lib}
debug
magvar magvar
math) math)
foreach(component ${comps}) foreach(component ${comps})
find_sg_component(${component} SIMGEAR_LIBRARIES) find_sg_component(${component} SIMGEAR_LIBRARIES)
endforeach() endforeach()
@ -157,14 +157,14 @@ SET(CMAKE_REQUIRED_INCLUDES ${SIMGEAR_INCLUDE_DIR})
check_cxx_source_runs( check_cxx_source_runs(
"#include <cstdio> "#include <cstdio>
#include \"simgear/version.h\" #include \"simgear/version.h\"
#define xstr(s) str(s) #define xstr(s) str(s)
#define str(s) #s #define str(s) #s
#define MIN_MAJOR ${SimGear_FIND_VERSION_MAJOR} #define MIN_MAJOR ${SimGear_FIND_VERSION_MAJOR}
#define MIN_MINOR ${SimGear_FIND_VERSION_MINOR} #define MIN_MINOR ${SimGear_FIND_VERSION_MINOR}
#define MIN_MICRO ${SimGear_FIND_VERSION_PATCH} #define MIN_MICRO ${SimGear_FIND_VERSION_PATCH}
int main() { int main() {
int major, minor, micro; int major, minor, micro;
@ -185,6 +185,6 @@ check_cxx_source_runs(
SIMGEAR_VERSION_OK) SIMGEAR_VERSION_OK)
include(FindPackageHandleStandardArgs) 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) 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(MIDGsmooth MIDG-II.cxx MIDG_main.cxx)
add_executable(UGsmooth UGear.cxx UGear_command.cxx UGear_main.cxx UGear_telnet.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_IO_LIBRARY}
${SIMGEAR_MISC_LIBRARY} ${SIMGEAR_MISC_LIBRARY}
${SIMGEAR_STRUCTURE_LIBRARY} ${SIMGEAR_STRUCTURE_LIBRARY}
${SIMGEAR_THREADS_LIBRARY}
${SIMGEAR_TIMING_LIBRARY} ${SIMGEAR_TIMING_LIBRARY}
${SIMGEAR_DEBUG_LIBRARY} ${SIMGEAR_DEBUG_LIBRARY}
${PLIB_SG_LIBRARY} ${PLIB_SG_LIBRARY}
@ -15,18 +16,17 @@ target_link_libraries(GPSsmooth
${WINMM_LIBRARY} ${WINMM_LIBRARY}
${WINSOCK_LIBRARY} ${WINSOCK_LIBRARY}
${ZLIB_LIBRARIES} ${ZLIB_LIBRARIES}
${OPENTHREADS_LIBRARIES}
${RT_LIBRARY} ${RT_LIBRARY}
) )
target_link_libraries(MIDGsmooth target_link_libraries(MIDGsmooth
${SIMGEAR_IO_LIBRARY} ${SIMGEAR_IO_LIBRARY}
${SIMGEAR_MATH_LIBRARY} ${SIMGEAR_MATH_LIBRARY}
${SIMGEAR_SERIAL_LIBRARY} ${SIMGEAR_SERIAL_LIBRARY}
${SIMGEAR_STRUCTURE_LIBRARY} ${SIMGEAR_STRUCTURE_LIBRARY}
${SIMGEAR_THREADS_LIBRARY}
${SIMGEAR_TIMING_LIBRARY} ${SIMGEAR_TIMING_LIBRARY}
${SIMGEAR_DEBUG_LIBRARY} ${SIMGEAR_DEBUG_LIBRARY}
${OPENTHREADS_LIBRARIES}
${PLIB_SG_LIBRARY} ${PLIB_SG_LIBRARY}
${PLIB_UL_LIBRARY} ${PLIB_UL_LIBRARY}
${WINMM_LIBRARY} ${WINMM_LIBRARY}
@ -34,15 +34,15 @@ target_link_libraries(MIDGsmooth
${RT_LIBRARY} ${RT_LIBRARY}
) )
target_link_libraries(UGsmooth target_link_libraries(UGsmooth
${SIMGEAR_DEBUG_LIBRARY} ${SIMGEAR_DEBUG_LIBRARY}
${SIMGEAR_IO_LIBRARY} ${SIMGEAR_IO_LIBRARY}
${SIMGEAR_MATH_LIBRARY} ${SIMGEAR_MATH_LIBRARY}
${SIMGEAR_MISC_LIBRARY} ${SIMGEAR_MISC_LIBRARY}
${SIMGEAR_SERIAL_LIBRARY} ${SIMGEAR_SERIAL_LIBRARY}
${SIMGEAR_STRUCTURE_LIBRARY} ${SIMGEAR_STRUCTURE_LIBRARY}
${SIMGEAR_THREADS_LIBRARY}
${SIMGEAR_TIMING_LIBRARY} ${SIMGEAR_TIMING_LIBRARY}
${OPENTHREADS_LIBRARIES}
${PLIB_SG_LIBRARY} ${PLIB_SG_LIBRARY}
${PLIB_UL_LIBRARY} ${PLIB_UL_LIBRARY}
${WINMM_LIBRARY} ${WINMM_LIBRARY}

View file

@ -1,17 +1,17 @@
add_executable(terrasync terrasync.cxx) add_executable(terrasync terrasync.cxx)
target_link_libraries(terrasync target_link_libraries(terrasync
${SIMGEAR_LIBRARIES} ${SIMGEAR_LIBRARIES}
${OPENTHREADS_LIBRARIES}
${ZLIB_LIBRARIES} ${ZLIB_LIBRARIES}
${WINSOCK_LIBRARY}) ${WINSOCK_LIBRARY}
${RT_LIBRARY})
if(LIBSVN_FOUND) if(LIBSVN_FOUND)
target_link_libraries(terrasync ${LIBSVN_LIBRARIES}) target_link_libraries(terrasync ${LIBSVN_LIBRARIES})
set_property(TARGET terrasync APPEND PROPERTY COMPILE_FLAGS "${APR_CFLAGS}") set_property(TARGET terrasync APPEND PROPERTY COMPILE_FLAGS "${APR_CFLAGS}")
IF(APPLE) IF(APPLE)
set_property(SOURCE terrasync.cxx PROPERTY COMPILE_FLAGS "-iwithsysroot ${LIBSVN_INCLUDE_DIR}") set_property(SOURCE terrasync.cxx PROPERTY COMPILE_FLAGS "-iwithsysroot ${LIBSVN_INCLUDE_DIR}")
ELSE() ELSE()

View file

@ -16,14 +16,13 @@ if(GLUT_FOUND)
panel_io.cxx) panel_io.cxx)
target_link_libraries(fgpanel target_link_libraries(fgpanel
${RT_LIBRARY}
${PNG_LIBRARIES} ${PNG_LIBRARIES}
${GLUT_LIBRARIES} ${GLUT_LIBRARIES}
${SIMGEAR_LIBRARIES} ${SIMGEAR_LIBRARIES}
${OPENTHREADS_LIBRARIES}
${OPENGL_LIBRARIES} ${OPENGL_LIBRARIES}
${ZLIB_LIBRARIES} ${ZLIB_LIBRARIES}
${PLIB_LIBRARIES} ${PLIB_LIBRARIES}
${RT_LIBRARY}
) )
install(TARGETS fgpanel RUNTIME DESTINATION bin) install(TARGETS fgpanel RUNTIME DESTINATION bin)

View file

@ -1,11 +1,12 @@
add_executable(fgviewer fgviewer.cxx) add_executable(fgviewer fgviewer.cxx)
target_link_libraries(fgviewer target_link_libraries(fgviewer
${SIMGEAR_LIBRARIES} ${SIMGEAR_LIBRARIES}
${OPENSCENEGRAPH_LIBRARIES} ${OPENSCENEGRAPH_LIBRARIES}
${OPENGL_LIBRARIES} ${OPENGL_LIBRARIES}
${ZLIB_LIBRARIES} ${ZLIB_LIBRARIES}
${PLIB_LIBRARIES}) ${PLIB_LIBRARIES}
${RT_LIBRARY})
install(TARGETS fgviewer RUNTIME DESTINATION bin) install(TARGETS fgviewer RUNTIME DESTINATION bin)