]> git.mxchange.org Git - simgear.git/commitdiff
Initial work on CMake support for SimGear.
authorJames Turner <zakalawe@mac.com>
Fri, 26 Nov 2010 10:04:54 +0000 (10:04 +0000)
committerJames Turner <zakalawe@mac.com>
Sun, 19 Dec 2010 14:16:39 +0000 (14:16 +0000)
32 files changed:
CMakeLists.txt [new file with mode: 0644]
CMakeModules/FindALUT.cmake [new file with mode: 0644]
CMakeModules/SimGearComponent.cmake [new file with mode: 0644]
simgear/CMakeLists.txt [new file with mode: 0644]
simgear/bucket/CMakeLists.txt [new file with mode: 0644]
simgear/debug/CMakeLists.txt [new file with mode: 0644]
simgear/environment/CMakeLists.txt [new file with mode: 0644]
simgear/ephemeris/CMakeLists.txt [new file with mode: 0644]
simgear/io/CMakeLists.txt [new file with mode: 0644]
simgear/io/lowlevel.cxx
simgear/magvar/CMakeLists.txt [new file with mode: 0644]
simgear/magvar/magvar.cxx
simgear/math/CMakeLists.txt [new file with mode: 0644]
simgear/misc/CMakeLists.txt [new file with mode: 0644]
simgear/nasal/CMakeLists.txt [new file with mode: 0644]
simgear/props/CMakeLists.txt [new file with mode: 0644]
simgear/route/CMakeLists.txt [new file with mode: 0644]
simgear/scene/CMakeLists.txt [new file with mode: 0644]
simgear/scene/bvh/CMakeLists.txt [new file with mode: 0644]
simgear/scene/material/CMakeLists.txt [new file with mode: 0644]
simgear/scene/model/CMakeLists.txt [new file with mode: 0644]
simgear/scene/sky/CMakeLists.txt [new file with mode: 0644]
simgear/scene/tgdb/CMakeLists.txt [new file with mode: 0644]
simgear/scene/util/CMakeLists.txt [new file with mode: 0644]
simgear/screen/CMakeLists.txt [new file with mode: 0644]
simgear/serial/CMakeLists.txt [new file with mode: 0644]
simgear/simgear_config_cmake.h.in [new file with mode: 0644]
simgear/sound/CMakeLists.txt [new file with mode: 0644]
simgear/structure/CMakeLists.txt [new file with mode: 0644]
simgear/threads/CMakeLists.txt [new file with mode: 0644]
simgear/timing/CMakeLists.txt [new file with mode: 0644]
simgear/xml/CMakeLists.txt [new file with mode: 0644]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..20c254e
--- /dev/null
@@ -0,0 +1,97 @@
+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)
+
diff --git a/CMakeModules/FindALUT.cmake b/CMakeModules/FindALUT.cmake
new file mode 100644 (file)
index 0000000..08d920b
--- /dev/null
@@ -0,0 +1,67 @@
+# 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)
+
diff --git a/CMakeModules/SimGearComponent.cmake b/CMakeModules/SimGearComponent.cmake
new file mode 100644 (file)
index 0000000..afa02a9
--- /dev/null
@@ -0,0 +1,23 @@
+
+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()
diff --git a/simgear/CMakeLists.txt b/simgear/CMakeLists.txt
new file mode 100644 (file)
index 0000000..93a4e81
--- /dev/null
@@ -0,0 +1,53 @@
+
+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
diff --git a/simgear/bucket/CMakeLists.txt b/simgear/bucket/CMakeLists.txt
new file mode 100644 (file)
index 0000000..36221c5
--- /dev/null
@@ -0,0 +1,7 @@
+
+include (SimGearComponent)
+
+set(HEADERS newbucket.hxx)
+set(SOURCES newbucket.cxx)
+
+simgear_component(bucket bucket "${SOURCES}" "${HEADERS}")
\ No newline at end of file
diff --git a/simgear/debug/CMakeLists.txt b/simgear/debug/CMakeLists.txt
new file mode 100644 (file)
index 0000000..70ede62
--- /dev/null
@@ -0,0 +1,7 @@
+
+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
diff --git a/simgear/environment/CMakeLists.txt b/simgear/environment/CMakeLists.txt
new file mode 100644 (file)
index 0000000..dda4431
--- /dev/null
@@ -0,0 +1,7 @@
+
+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}")
diff --git a/simgear/ephemeris/CMakeLists.txt b/simgear/ephemeris/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b1d2137
--- /dev/null
@@ -0,0 +1,35 @@
+
+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
diff --git a/simgear/io/CMakeLists.txt b/simgear/io/CMakeLists.txt
new file mode 100644 (file)
index 0000000..e00b694
--- /dev/null
@@ -0,0 +1,33 @@
+
+
+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
index 74b9f93b368f7230ee5a2a77f4415e2bdd29baf0..d41bc801a03f2669f9442d3eb2446f3d237bc13f 100644 (file)
 // $Id$
 
 
+#ifdef HAVE_CONFIG_H
+#  include <simgear_config.h>
+#endif
+
 #include <string.h>            // for memcpy()
 
 #include "lowlevel.hxx" 
diff --git a/simgear/magvar/CMakeLists.txt b/simgear/magvar/CMakeLists.txt
new file mode 100644 (file)
index 0000000..0059cdc
--- /dev/null
@@ -0,0 +1,7 @@
+
+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
index 2744e20e3c1c7c83ce999282ad7ed329055e8c7d..43563a71b6f2c3d919156c192e1bb1e639fb9003 100644 (file)
 // $Id$
 
 
+#ifdef HAVE_CONFIG_H
+#  include <simgear_config.h>
+#endif
+
+
 #include <math.h>
 
 #include <simgear/magvar/magvar.hxx>
diff --git a/simgear/math/CMakeLists.txt b/simgear/math/CMakeLists.txt
new file mode 100644 (file)
index 0000000..861462c
--- /dev/null
@@ -0,0 +1,47 @@
+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}")
+
diff --git a/simgear/misc/CMakeLists.txt b/simgear/misc/CMakeLists.txt
new file mode 100644 (file)
index 0000000..f6c6627
--- /dev/null
@@ -0,0 +1,35 @@
+
+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}")
diff --git a/simgear/nasal/CMakeLists.txt b/simgear/nasal/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8f900ad
--- /dev/null
@@ -0,0 +1,33 @@
+
+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
diff --git a/simgear/props/CMakeLists.txt b/simgear/props/CMakeLists.txt
new file mode 100644 (file)
index 0000000..20461af
--- /dev/null
@@ -0,0 +1,21 @@
+
+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
diff --git a/simgear/route/CMakeLists.txt b/simgear/route/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ef83bb5
--- /dev/null
@@ -0,0 +1,14 @@
+
+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
diff --git a/simgear/scene/CMakeLists.txt b/simgear/scene/CMakeLists.txt
new file mode 100644 (file)
index 0000000..73df4e8
--- /dev/null
@@ -0,0 +1,17 @@
+include (SimGearComponent)
+
+include_directories(${PROJECT_SOURCE_DIR})
+
+foreach( mylibfolder 
+        bvh
+        material
+        model
+        sky
+        tgdb
+        util
+    )
+
+    add_subdirectory(${mylibfolder})
+
+endforeach( mylibfolder )
+
diff --git a/simgear/scene/bvh/CMakeLists.txt b/simgear/scene/bvh/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ba0cfd7
--- /dev/null
@@ -0,0 +1,39 @@
+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}")
diff --git a/simgear/scene/material/CMakeLists.txt b/simgear/scene/material/CMakeLists.txt
new file mode 100644 (file)
index 0000000..787202a
--- /dev/null
@@ -0,0 +1,35 @@
+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}")
+
diff --git a/simgear/scene/model/CMakeLists.txt b/simgear/scene/model/CMakeLists.txt
new file mode 100644 (file)
index 0000000..6890fbe
--- /dev/null
@@ -0,0 +1,50 @@
+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}")
diff --git a/simgear/scene/sky/CMakeLists.txt b/simgear/scene/sky/CMakeLists.txt
new file mode 100644 (file)
index 0000000..7ed001d
--- /dev/null
@@ -0,0 +1,29 @@
+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}")
diff --git a/simgear/scene/tgdb/CMakeLists.txt b/simgear/scene/tgdb/CMakeLists.txt
new file mode 100644 (file)
index 0000000..e9fa835
--- /dev/null
@@ -0,0 +1,42 @@
+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}")
diff --git a/simgear/scene/util/CMakeLists.txt b/simgear/scene/util/CMakeLists.txt
new file mode 100644 (file)
index 0000000..84f0b55
--- /dev/null
@@ -0,0 +1,39 @@
+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}")
diff --git a/simgear/screen/CMakeLists.txt b/simgear/screen/CMakeLists.txt
new file mode 100644 (file)
index 0000000..17780af
--- /dev/null
@@ -0,0 +1,23 @@
+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
diff --git a/simgear/serial/CMakeLists.txt b/simgear/serial/CMakeLists.txt
new file mode 100644 (file)
index 0000000..84817dd
--- /dev/null
@@ -0,0 +1,7 @@
+
+include (SimGearComponent)
+
+set(HEADERS serial.hxx)
+set(SOURCES serial.cxx)
+
+simgear_component(serial serial "${SOURCES}" "${HEADERS}")
\ No newline at end of file
diff --git a/simgear/simgear_config_cmake.h.in b/simgear/simgear_config_cmake.h.in
new file mode 100644 (file)
index 0000000..1e46d1e
--- /dev/null
@@ -0,0 +1,15 @@
+
+#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
diff --git a/simgear/sound/CMakeLists.txt b/simgear/sound/CMakeLists.txt
new file mode 100644 (file)
index 0000000..c07a706
--- /dev/null
@@ -0,0 +1,19 @@
+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
diff --git a/simgear/structure/CMakeLists.txt b/simgear/structure/CMakeLists.txt
new file mode 100644 (file)
index 0000000..4bb969c
--- /dev/null
@@ -0,0 +1,39 @@
+
+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
diff --git a/simgear/threads/CMakeLists.txt b/simgear/threads/CMakeLists.txt
new file mode 100644 (file)
index 0000000..91fcdf2
--- /dev/null
@@ -0,0 +1,10 @@
+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
diff --git a/simgear/timing/CMakeLists.txt b/simgear/timing/CMakeLists.txt
new file mode 100644 (file)
index 0000000..4b1d239
--- /dev/null
@@ -0,0 +1,19 @@
+
+
+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
diff --git a/simgear/xml/CMakeLists.txt b/simgear/xml/CMakeLists.txt
new file mode 100644 (file)
index 0000000..0365e86
--- /dev/null
@@ -0,0 +1,28 @@
+
+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}")