--- /dev/null
+cmake_minimum_required (VERSION 2.6)
+include (CheckFunctionExists)
+include (CheckCXXSourceCompiles)
+include (CPack)
+
+project(SimGear)
+
+set(SIMGEAR_VERSION "2.2.0")
+
+#packaging
+SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/COPYING")
+SET(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/README")
+
+# We have some custom .cmake scripts not in the official distribution.
+set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
+
+option(SIMGEAR_SHARED "Set to ON to build SimGear as a shared library/framework" OFF)
+option(SIMGEAR_HEADLESS "Set to ON to build SimGear with GUI/graphics support" OFF)
+option(JPEG_FACTORY "Enable JPEG-factory support" OFF)
+
+# check required dependencies
+find_package(Boost REQUIRED)
+find_package(ZLIB REQUIRED)
+find_package(Threads REQUIRED)
+
+if (${SIMGEAR_HEADLESS})
+ message(STATUS "headlesss mode")
+ set(NO_OPENSCENEGRAPH_INTERFACE 1)
+else()
+ find_package(OpenGL REQUIRED)
+ find_package(OpenAL REQUIRED)
+ find_package(ALUT REQUIRED)
+ find_package(OpenSceneGraph 2.8.2 REQUIRED osgText osgSim osgDB osgParticle osgUtil)
+endif()
+
+if(JPEG_FACTORY)
+ message(STATUS "JPEG-factory enabled")
+ find_package(JPEG REQUIRED)
+ include_directories(${JPEG_INCLUDE_DIR})
+endif()
+
+find_path (HAVE_SYS_TIME_H sys/time.h )
+find_path (HAVE_SYS_TIMEB_H sys/timeb.h )
+find_path (HAVE_UNISTD_H unistd.h )
+
+check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
+check_function_exists(ftime HAVE_FTIME)
+check_function_exists(timegm HAVE_TIMEGM)
+check_function_exists(rint HAVE_RINT)
+
+# isnan might not be real symbol, so can't check using function_exists
+check_cxx_source_compiles(
+ "#include <cmath> void f() { isnan(0.0);} "
+ HAVE_ISNAN)
+
+if(CMAKE_COMPILER_IS_GNUCXX)
+ set(WARNING_FLAGS -Wall)
+endif(CMAKE_COMPILER_IS_GNUCXX)
+
+if(WIN32)
+
+ if(MSVC)
+ # turn off various warnings
+ # foreach(warning 4244 4251 4267 4275 4290 4786 4305 4996)
+ # SET(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}")
+ # endforeach(warning)
+
+ set(MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS")
+ endif(MSVC)
+
+ # assumed on Windows
+ set(HAVE_GETLOCALTIME 1)
+endif(WIN32)
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS}")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS}")
+
+include_directories(${PROJECT_SOURCE_DIR})
+include_directories(${PROJECT_BINARY_DIR}/simgear)
+
+include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR}
+ ${ALUT_INCLUDE_DIR} ${OPENAL_INCLUDE_DIR} )
+
+
+add_definitions(-DHAVE_CONFIG_H)
+
+# configure a header file to pass some of the CMake settings
+# to the source code
+configure_file (
+ "${PROJECT_SOURCE_DIR}/simgear/simgear_config_cmake.h.in"
+ "${PROJECT_BINARY_DIR}/simgear/simgear_config.h"
+ )
+
+install (FILES ${PROJECT_BINARY_DIR}/simgear/simgear_config.h DESTINATION include/simgear/)
+add_subdirectory(simgear)
+
--- /dev/null
+# Locate ALUT
+# This module defines
+# ALUT_LIBRARY
+# ALUT_FOUND, if false, do not try to link to ALUT
+# ALUT_INCLUDE_DIR, where to find the headers
+#
+# $ALUTDIR is an environment variable that would
+# correspond to the ./configure --prefix=$ALUTDIR
+# used in building ALUT.
+#
+# Created by James Turner. This was influenced by the FindOpenAL.cmake module.
+
+#=============================================================================
+# Copyright 2005-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# Per my request, CMake should search for frameworks first in
+# the following order:
+# ~/Library/Frameworks/OpenAL.framework/Headers
+# /Library/Frameworks/OpenAL.framework/Headers
+# /System/Library/Frameworks/OpenAL.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
+# OPENAL_LIBRARY to override this selection or set the CMake environment
+# CMAKE_INCLUDE_PATH to modify the search paths.
+
+FIND_PATH(ALUT_INCLUDE_DIR alut.h
+ HINTS
+ $ENV{ALUTDIR}
+ PATH_SUFFIXES include/AL include/ALUT include
+ PATHS
+ ~/Library/Frameworks
+ /Library/Frameworks
+ /usr/local
+ /usr
+ /opt
+)
+
+FIND_LIBRARY(ALUT_LIBRARY
+ NAMES ALUT alut
+ HINTS
+ $ENV{ALUTDIR}
+ PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
+ PATHS
+ ~/Library/Frameworks
+ /Library/Frameworks
+ /usr/local
+ /usr
+ /opt
+)
+
+
+SET(ALUT_FOUND "NO")
+IF(ALUT_LIBRARY AND ALUT_INCLUDE_DIR)
+ SET(ALUT_FOUND "YES")
+ENDIF(ALUT_LIBRARY AND ALUT_INCLUDE_DIR)
+
--- /dev/null
+
+macro(simgear_component name includePath sources headers)
+
+ if (${SIMGEAR_SHARED})
+ foreach(s ${sources})
+ set_property(GLOBAL
+ APPEND PROPERTY ALL_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${s}")
+ endforeach()
+
+ foreach(h ${headers})
+ set_property(GLOBAL
+ APPEND PROPERTY PUBLIC_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/${h}")
+ endforeach()
+
+ else()
+ set(libName "sg${name}")
+ add_library(${libName} STATIC ${sources} )
+
+ install (TARGETS ${libName} ARCHIVE DESTINATION lib)
+ install (FILES ${headers} DESTINATION include/simgear/${includePath})
+ endif()
+
+endmacro()
--- /dev/null
+
+foreach( mylibfolder
+ bucket
+ debug
+ ephemeris
+ io
+ magvar
+ math
+ misc
+ nasal
+ props
+ route
+ serial
+ structure
+ threads
+ timing
+ xml
+ )
+
+ add_subdirectory(${mylibfolder})
+
+endforeach( mylibfolder )
+
+if (NOT SIMGEAR_HEADLESS)
+ add_subdirectory(environment)
+ add_subdirectory(screen)
+ add_subdirectory(scene)
+ add_subdirectory(sound)
+endif()
+
+
+
+set(HEADERS compiler.h constants.h sg_inlines.h version.h)
+install (FILES ${HEADERS} DESTINATION include/simgear/)
+
+if(SIMGEAR_SHARED)
+ message(STATUS "building shared library")
+ get_property(allSources GLOBAL PROPERTY ALL_SOURCES)
+ get_property(publicHeaders GLOBAL PROPERTY PUBLIC_HEADERS)
+
+ add_library(SimGear SHARED ${allSources})
+ set_property(TARGET SimGear PROPERTY FRAMEWORK 1)
+ message(STATUS "public header: ${publicHeaders}")
+ set_property(TARGET SimGear PROPERTY PUBLIC_HEADER "${publicHeaders}")
+
+ target_link_libraries(SimGear ${ZLIB_LIBRARY}
+ ${OPENSCENEGRAPH_LIBRARIES}
+ ${OPENAL_LIBRARY} ${ALUT_LIBRARY}
+ ${OPENGL_LIBRARY})
+
+ install()
+endif(SIMGEAR_SHARED)
+
\ No newline at end of file
--- /dev/null
+
+include (SimGearComponent)
+
+set(HEADERS newbucket.hxx)
+set(SOURCES newbucket.cxx)
+
+simgear_component(bucket bucket "${SOURCES}" "${HEADERS}")
\ No newline at end of file
--- /dev/null
+
+include (SimGearComponent)
+
+set(HEADERS debug_types.h logstream.hxx)
+set(SOURCES logstream.cxx)
+
+simgear_component(debug debug "${SOURCES}" "${HEADERS}")
\ No newline at end of file
--- /dev/null
+
+include (SimGearComponent)
+
+set(HEADERS metar.hxx visual_enviro.hxx precipitation.hxx)
+set(SOURCES metar.cxx visual_enviro.cxx precipitation.cxx)
+
+simgear_component(environment environment "${SOURCES}" "${HEADERS}")
--- /dev/null
+
+include (SimGearComponent)
+
+set(HEADERS
+ celestialBody.hxx
+ ephemeris.hxx
+ jupiter.hxx
+ mars.hxx
+ mercury.hxx
+ moonpos.hxx
+ neptune.hxx
+ pluto.hxx
+ saturn.hxx
+ star.hxx
+ stardata.hxx
+ uranus.hxx
+ venus.hxx
+ )
+
+set(SOURCES
+ celestialBody.cxx
+ ephemeris.cxx
+ jupiter.cxx
+ mars.cxx
+ mercury.cxx
+ moonpos.cxx
+ neptune.cxx
+ saturn.cxx
+ star.cxx
+ stardata.cxx
+ uranus.cxx
+ venus.cxx
+ )
+
+simgear_component(ephemeris ephemeris "${SOURCES}" "${HEADERS}")
\ No newline at end of file
--- /dev/null
+
+
+include (SimGearComponent)
+
+set(HEADERS
+ iochannel.hxx
+ lowlevel.hxx
+ raw_socket.hxx
+ sg_binobj.hxx
+ sg_file.hxx
+ sg_netBuffer.hxx
+ sg_netChannel.hxx
+ sg_netChat.hxx
+ sg_serial.hxx
+ sg_socket.hxx
+ sg_socket_udp.hxx
+ )
+
+set(SOURCES
+ iochannel.cxx
+ lowlevel.cxx
+ raw_socket.cxx
+ sg_binobj.cxx
+ sg_file.cxx
+ sg_netBuffer.cxx
+ sg_netChannel.cxx
+ sg_netChat.cxx
+ sg_serial.cxx
+ sg_socket.cxx
+ sg_socket_udp.cxx
+ )
+
+simgear_component(io io "${SOURCES}" "${HEADERS}")
\ No newline at end of file
// $Id$
+#ifdef HAVE_CONFIG_H
+# include <simgear_config.h>
+#endif
+
#include <string.h> // for memcpy()
#include "lowlevel.hxx"
--- /dev/null
+
+include (SimGearComponent)
+
+set(HEADERS magvar.hxx coremag.hxx)
+set(SOURCES magvar.cxx coremag.cxx)
+
+simgear_component(magvar magvar "${SOURCES}" "${HEADERS}")
\ No newline at end of file
// $Id$
+#ifdef HAVE_CONFIG_H
+# include <simgear_config.h>
+#endif
+
+
#include <math.h>
#include <simgear/magvar/magvar.hxx>
--- /dev/null
+include (SimGearComponent)
+
+
+set(HEADERS
+ Math.hxx
+ SGBox.hxx
+ SGCMath.hxx
+ SGGeoc.hxx
+ SGGeod.hxx
+ SGGeodesy.hxx
+ SGGeometry.hxx
+ SGGeometryFwd.hxx
+ SGIntersect.hxx
+ SGLimits.hxx
+ SGLineSegment.hxx
+ SGMath.hxx
+ SGMathFwd.hxx
+ SGMatrix.hxx
+ SGMisc.hxx
+ SGPlane.hxx
+ SGQuat.hxx
+ SGRay.hxx
+ SGSphere.hxx
+ SGTriangle.hxx
+ SGVec2.hxx
+ SGVec3.hxx
+ SGVec4.hxx
+ beziercurve.hxx
+ interpolater.hxx
+ leastsqs.hxx
+ project.hxx
+ sg_geodesy.hxx
+ sg_types.hxx
+ sg_random.h
+ )
+
+set(SOURCES
+ SGGeod.cxx
+ SGGeodesy.cxx
+ interpolater.cxx
+ leastsqs.cxx
+ project.cxx
+ sg_random.c
+ )
+
+simgear_component(math math "${SOURCES}" "${HEADERS}")
+
--- /dev/null
+
+include (SimGearComponent)
+
+set(HEADERS
+ PathOptions.hxx
+ ResourceManager.hxx
+ interpolator.hxx
+ sg_dir.hxx
+ sg_path.hxx
+ sg_sleep.hxx
+ sgstream.hxx
+ stdint.hxx
+ stopwatch.hxx
+ strutils.hxx
+ tabbed_values.hxx
+ texcoord.hxx
+ zfstream.hxx
+
+ )
+
+set(SOURCES
+ PathOptions.cxx
+ ResourceManager.cxx
+ interpolator.cxx
+ sg_dir.cxx
+ sg_path.cxx
+ sg_sleep.cxx
+ sgstream.cxx
+ strutils.cxx
+ tabbed_values.cxx
+ texcoord.cxx
+ zfstream.cxx
+ )
+
+simgear_component(misc misc "${SOURCES}" "${HEADERS}")
--- /dev/null
+
+include (SimGearComponent)
+
+set(HEADERS
+ naref.h
+ nasal.h
+ )
+
+set(SOURCES
+ bitslib.c
+ code.c
+ codegen.c
+ gc.c
+ hash.c
+ iolib.c
+ lex.c
+ lib.c
+ mathlib.c
+ misc.c
+ parse.c
+ string.c
+ thread-posix.c
+ thread-win32.c
+ threadlib.c
+ utf8lib.c
+ vector.c
+ code.h
+ data.h
+ iolib.h
+ parse.h
+ )
+
+simgear_component(nasal nasal "${SOURCES}" "${HEADERS}")
\ No newline at end of file
--- /dev/null
+
+include (SimGearComponent)
+
+set(HEADERS
+ AtomicChangeListener.hxx
+ ExtendedPropertyAdapter.hxx
+ condition.hxx
+ propertyObject.hxx
+ props.hxx
+ props_io.hxx
+ )
+
+set(SOURCES
+ AtomicChangeListener.cxx
+ condition.cxx
+ propertyObject.cxx
+ props.cxx
+ props_io.cxx
+ )
+
+simgear_component(props props "${SOURCES}" "${HEADERS}")
\ No newline at end of file
--- /dev/null
+
+include (SimGearComponent)
+
+set(HEADERS
+ route.hxx
+ waypoint.hxx
+ )
+
+set(SOURCES
+ route.cxx
+ waypoint.cxx
+ )
+
+simgear_component(route route "${SOURCES}" "${HEADERS}")
\ No newline at end of file
--- /dev/null
+include (SimGearComponent)
+
+include_directories(${PROJECT_SOURCE_DIR})
+
+foreach( mylibfolder
+ bvh
+ material
+ model
+ sky
+ tgdb
+ util
+ )
+
+ add_subdirectory(${mylibfolder})
+
+endforeach( mylibfolder )
+
--- /dev/null
+include (SimGearComponent)
+
+set(HEADERS
+ BVHBoundingBoxVisitor.hxx
+ BVHDebugCollectVisitor.hxx
+ BVHGroup.hxx
+ BVHLineGeometry.hxx
+ BVHLineSegmentVisitor.hxx
+ BVHMotionTransform.hxx
+ BVHNearestPointVisitor.hxx
+ BVHNode.hxx
+ BVHStaticBinary.hxx
+ BVHStaticData.hxx
+ BVHStaticGeometry.hxx
+ BVHStaticGeometryBuilder.hxx
+ BVHStaticLeaf.hxx
+ BVHStaticNode.hxx
+ BVHStaticTriangle.hxx
+ BVHSubTreeCollector.hxx
+ BVHTransform.hxx
+ BVHVisitor.hxx
+ )
+
+set(SOURCES
+ BVHGroup.cxx
+ BVHLineGeometry.cxx
+ BVHLineSegmentVisitor.cxx
+ BVHMotionTransform.cxx
+ BVHNode.cxx
+ BVHStaticBinary.cxx
+ BVHStaticGeometry.cxx
+ BVHStaticLeaf.cxx
+ BVHStaticNode.cxx
+ BVHStaticTriangle.cxx
+ BVHSubTreeCollector.cxx
+ BVHTransform.cxx
+ )
+
+simgear_component(bvh scene/bvh "${SOURCES}" "${HEADERS}")
--- /dev/null
+set(HEADERS
+ Effect.hxx
+ EffectBuilder.hxx
+ EffectCullVisitor.hxx
+ EffectGeode.hxx
+ GLPredicate.hxx
+ Noise.hxx
+ Pass.hxx
+ Technique.hxx
+ TextureBuilder.hxx
+ mat.hxx
+ matlib.hxx
+ matmodel.hxx
+ mipmap.hxx
+ )
+
+set(SOURCES
+ Effect.cxx
+ EffectBuilder.cxx
+ EffectCullVisitor.cxx
+ EffectGeode.cxx
+ GLPredicate.cxx
+ Noise.cxx
+ Pass.cxx
+ Technique.cxx
+ TextureBuilder.cxx
+ makeEffect.cxx
+ mat.cxx
+ matlib.cxx
+ matmodel.cxx
+ mipmap.cxx
+ )
+
+simgear_component(material scene/material "${SOURCES}" "${HEADERS}")
+
--- /dev/null
+include (SimGearComponent)
+
+set(HEADERS
+ BoundingVolumeBuildVisitor.hxx
+ CheckSceneryVisitor.hxx
+ ConditionNode.hxx
+ ModelRegistry.hxx
+ SGClipGroup.hxx
+ SGInteractionAnimation.hxx
+ SGMaterialAnimation.hxx
+ SGOffsetTransform.hxx
+ SGPagedLOD.hxx
+ SGReaderWriterXML.hxx
+ SGReaderWriterXMLOptions.hxx
+ SGRotateTransform.hxx
+ SGScaleTransform.hxx
+ SGText.hxx
+ SGTranslateTransform.hxx
+ animation.hxx
+ model.hxx
+ modellib.hxx
+ particles.hxx
+ persparam.hxx
+ placement.hxx
+ )
+
+set(SOURCES
+ CheckSceneryVisitor.cxx
+ ConditionNode.cxx
+ ModelRegistry.cxx
+ SGClipGroup.cxx
+ SGInteractionAnimation.cxx
+ SGMaterialAnimation.cxx
+ SGOffsetTransform.cxx
+ SGPagedLOD.cxx
+ SGReaderWriterXML.cxx
+ SGRotateTransform.cxx
+ SGScaleTransform.cxx
+ SGText.cxx
+ SGTranslateTransform.cxx
+ animation.cxx
+ model.cxx
+ modellib.cxx
+ particles.cxx
+ persparam.cxx
+ placement.cxx
+ shadanim.cxx
+ )
+
+simgear_component(model scene/model "${SOURCES}" "${HEADERS}")
--- /dev/null
+include (SimGearComponent)
+
+set(HEADERS
+ CloudShaderGeometry.hxx
+ cloud.hxx
+ cloudfield.hxx
+ dome.hxx
+ moon.hxx
+ newcloud.hxx
+ oursun.hxx
+ sky.hxx
+ sphere.hxx
+ stars.hxx
+ )
+
+set(SOURCES
+ CloudShaderGeometry.cxx
+ cloud.cxx
+ cloudfield.cxx
+ dome.cxx
+ moon.cxx
+ newcloud.cxx
+ oursun.cxx
+ sky.cxx
+ sphere.cxx
+ stars.cxx
+ )
+
+simgear_component(sky scene/sky "${SOURCES}" "${HEADERS}")
--- /dev/null
+include (SimGearComponent)
+
+set(HEADERS
+ GroundLightManager.hxx
+ ReaderWriterSTG.hxx
+ SGDirectionalLightBin.hxx
+ SGLightBin.hxx
+ SGModelBin.hxx
+ SGOceanTile.hxx
+ SGReaderWriterBTG.hxx
+ SGReaderWriterBTGOptions.hxx
+ SGTexturedTriangleBin.hxx
+ SGTriangleBin.hxx
+ SGVasiDrawable.hxx
+ SGVertexArrayBin.hxx
+ ShaderGeometry.hxx
+ TileCache.hxx
+ TileEntry.hxx
+ TreeBin.hxx
+ apt_signs.hxx
+ obj.hxx
+ pt_lights.hxx
+ userdata.hxx
+ )
+
+set(SOURCES
+ GroundLightManager.cxx
+ ReaderWriterSTG.cxx
+ SGOceanTile.cxx
+ SGReaderWriterBTG.cxx
+ SGVasiDrawable.cxx
+ ShaderGeometry.cxx
+ TileCache.cxx
+ TileEntry.cxx
+ TreeBin.cxx
+ apt_signs.cxx
+ obj.cxx
+ pt_lights.cxx
+ userdata.cxx
+ )
+
+simgear_component(tgdb scene/tgdb "${SOURCES}" "${HEADERS}")
--- /dev/null
+include (SimGearComponent)
+
+set(HEADERS
+ CopyOp.hxx
+ NodeAndDrawableVisitor.hxx
+ PrimitiveUtils.hxx
+ QuadTreeBuilder.hxx
+ RenderConstants.hxx
+ SGDebugDrawCallback.hxx
+ SGEnlargeBoundingBox.hxx
+ SGNodeMasks.hxx
+ SGPickCallback.hxx
+ SGSceneFeatures.hxx
+ SGSceneUserData.hxx
+ SGStateAttributeVisitor.hxx
+ SGTextureStateAttributeVisitor.hxx
+ SGUpdateVisitor.hxx
+ SplicingVisitor.hxx
+ StateAttributeFactory.hxx
+ UpdateOnceCallback.hxx
+ VectorArrayAdapter.hxx
+ )
+
+set(SOURCES
+ CopyOp.cxx
+ NodeAndDrawableVisitor.cxx
+ PrimitiveUtils.cxx
+ QuadTreeBuilder.cxx
+ SGEnlargeBoundingBox.cxx
+ SGSceneFeatures.cxx
+ SGSceneUserData.cxx
+ SGStateAttributeVisitor.cxx
+ SGTextureStateAttributeVisitor.cxx
+ SplicingVisitor.cxx
+ StateAttributeFactory.cxx
+ UpdateOnceCallback.cxx
+ )
+
+simgear_component(util scene/util "${SOURCES}" "${HEADERS}")
--- /dev/null
+include (SimGearComponent)
+
+set(HEADERS
+ colors.hxx
+ extensions.hxx
+ screen-dump.hxx
+ tr.h
+ )
+
+
+set(SOURCES
+ extensions.cxx
+ screen-dump.cxx
+ tr.cxx
+ )
+
+if(JPEG_FACTORY)
+ list(APPEND HEADERS jpgfactory.hxx)
+ list(APPEND SOURCES jpgfactory.cxx)
+endif()
+
+
+simgear_component(screen screen "${SOURCES}" "${HEADERS}")
\ No newline at end of file
--- /dev/null
+
+include (SimGearComponent)
+
+set(HEADERS serial.hxx)
+set(SOURCES serial.cxx)
+
+simgear_component(serial serial "${SOURCES}" "${HEADERS}")
\ No newline at end of file
--- /dev/null
+
+#cmakedefine HAVE_SYS_TIME_H
+#cmakedefine HAVE_SYS_TIMEB_H
+#cmakedefine HAVE_UNISTD_H
+
+
+#cmakedefine HAVE_GETTIMEOFDAY
+#cmakedefine HAVE_GETLOCALTIME
+#cmakedefine HAVE_FTIME
+#cmakedefine HAVE_RINT
+#cmakedefine HAVE_TIMEGM
+#cmakedefine HAVE_ISNAN
+
+// set if building headless (no OSG or OpenGL libs)
+#cmakedefine NO_OPENSCENEGRAPH_INTERFACE
--- /dev/null
+include (SimGearComponent)
+
+set(HEADERS
+ sample_group.hxx
+ sample_openal.hxx
+ sample_queue.hxx
+ soundmgr_openal.hxx
+ xmlsound.hxx
+ )
+
+set(SOURCES
+ sample_group.cxx
+ sample_openal.cxx
+ sample_queue.cxx
+ soundmgr_openal.cxx
+ xmlsound.cxx
+ )
+
+simgear_component(sound sound "${SOURCES}" "${HEADERS}")
\ No newline at end of file
--- /dev/null
+
+include (SimGearComponent)
+
+set(HEADERS
+ OSGUtils.hxx
+ OSGVersion.hxx
+ SGAtomic.hxx
+ SGBinding.hxx
+ SGExpression.hxx
+ SGReferenced.hxx
+ SGSharedPtr.hxx
+ SGSmplhist.hxx
+ SGSmplstat.hxx
+ SGWeakPtr.hxx
+ SGWeakReferenced.hxx
+ Singleton.hxx
+ StringTable.hxx
+ callback.hxx
+ commands.hxx
+ event_mgr.hxx
+ exception.hxx
+ intern.hxx
+ subsystem_mgr.hxx
+ )
+
+set(SOURCES
+ SGAtomic.cxx
+ SGBinding.cxx
+ SGExpression.cxx
+ SGSmplhist.cxx
+ SGSmplstat.cxx
+ StringTable.cxx
+ commands.cxx
+ event_mgr.cxx
+ exception.cxx
+ subsystem_mgr.cxx
+ )
+
+simgear_component(structure structure "${SOURCES}" "${HEADERS}")
\ No newline at end of file
--- /dev/null
+include (SimGearComponent)
+
+set(HEADERS
+ SGGuard.hxx
+ SGQueue.hxx
+ SGThread.hxx)
+
+set(SOURCES SGThread.cxx)
+
+simgear_component(threads threads "${SOURCES}" "${HEADERS}")
\ No newline at end of file
--- /dev/null
+
+
+include (SimGearComponent)
+
+set(HEADERS
+ sg_time.hxx
+ timestamp.hxx
+ timezone.h
+ lowleveltime.h
+ )
+
+set(SOURCES
+ lowleveltime.cxx
+ sg_time.cxx
+ timestamp.cxx
+ timezone.cxx
+ )
+
+simgear_component(timing timing "${SOURCES}" "${HEADERS}")
\ No newline at end of file
--- /dev/null
+
+include (SimGearComponent)
+
+
+set(HEADERS
+ easyxml.hxx
+ )
+
+set(SOURCES
+ asciitab.h
+ hashtable.h
+ iasciitab.h
+ latin1tab.h
+ nametab.h
+ utf8tab.h
+ xmldef.h
+ xmlparse.h
+ xmlrole.h
+ xmltok.h
+ xmltok_impl.h
+ hashtable.c
+ xmlparse.c
+ xmlrole.c
+ xmltok.c
+ easyxml.cxx
+ )
+
+simgear_component(xml xml "${SOURCES}" "${HEADERS}")