From: <he...@us...> - 2008-12-01 15:04:12
|
Revision: 17 http://simspark.svn.sourceforge.net/simspark/?rev=17&view=rev Author: hedayat Date: 2008-12-01 15:04:08 +0000 (Mon, 01 Dec 2008) Log Message: ----------- Added CPACK support Added FMOD checking support Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/plugin/soundsystemfmod/CMakeLists.txt Added Paths: ----------- trunk/spark/cmake/FindFMOD.cmake Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) +++ trunk/spark/CMakeLists.txt 2008-12-01 15:04:08 UTC (rev 17) @@ -32,6 +32,7 @@ find_package(ODE REQUIRED) find_package(OpenGL REQUIRED) find_package(SDL REQUIRED) +find_package(FMOD) set(HAVE_IL_IL_H 1) set(HAVE_KEROSIN_KEROSIN_H 1) @@ -55,6 +56,8 @@ "The directory to install includes into.") set(CMAKE_SHARED_MODULE_PREFIX "") +mark_as_advanced(BINDIR LIBDIR DATADIR INCLUDEDIR) + ########## library version numbers ########## set(SALT_SO_VERSION 3) set(SALT_VERSION ${SALT_SO_VERSION}.1.3) @@ -106,7 +109,15 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sparkconfig.h DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}) +########### CPack section ############# +set(CPACK_SOURCE_GENERATOR TGZ) +set(CPACK_SOURCE_IGNORE_FILES + /CVS/ /[.]svn/ /.*[.]o /autom4te[.]cache/ /[.].*) +set(CPACK_PACKAGE_VERSION "0.1") +set(CPACK_SOURCE_PACKAGE_FILE_NAME + ${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}) +include(CPack) #original Makefile.am contents follow: Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2008-11-30 21:56:52 UTC (rev 16) +++ trunk/spark/ChangeLog 2008-12-01 15:04:08 UTC (rev 17) @@ -1,3 +1,15 @@ +2008-12-01 Hedayat Vatankhah <he...@gr...> + + * plugin/soundsystemfmod/CMakeLists.txt: + - fixed FMOD support + + * cmake/FindFMOD.cmake: + - added to the project + + * CMakeLists.txt: + - added initial cpack support + - added check for FMOD + 2008-11-25 Hedayat Vatankhah <he...@gr...> * lib/oxygen/Makefile.am: Added: trunk/spark/cmake/FindFMOD.cmake =================================================================== --- trunk/spark/cmake/FindFMOD.cmake (rev 0) +++ trunk/spark/cmake/FindFMOD.cmake 2008-12-01 15:04:08 UTC (rev 17) @@ -0,0 +1,94 @@ +# - Find FMOD includes and library +# +# This module defines +# FMOD_INCLUDE_DIRS +# FMOD_LIBRARIES, the libraries to link against to use FMOD. +# FMOD_LIBRARY_DIRS, the location of the libraries +# FMOD_FOUND, If false, do not try to use FMOD +# +# Copyright © 2007-2008, Matt Williams +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +IF (FMOD_LIBRARIES AND FMOD_INCLUDE_DIRS) + SET(FMOD_FIND_QUIETLY TRUE) +ENDIF (FMOD_LIBRARIES AND FMOD_INCLUDE_DIRS) + +SET(FMOD_INCLUDE_SEARCH_DIRS + ${INCLUDE_SEARCH_DIRS} + ${CMAKE_INCLUDE_PATH} + /usr/include + /usr/local/include + /usr/include/fmodex + /usr/local/include/fmodex + /opt/include/fmodex + /opt/fmodex/include + CACHE STRING "" +) + +SET(FMOD_LIBRARY_SEARCH_DIRS + ${LIBRARY_SEARCH_DIRS} + ${CMAKE_LIBRARY_PATH} + /usr/lib + /usr/lib64 + /usr/local/lib + /usr/local/lib64 + /opt/lib + /opt/lib64 + /opt/fmodex/lib + /opt/fmodex/lib64 + CACHE STRING "" +) + +IF (WIN32) #Windows + MESSAGE(STATUS "Looking for FMOD") + FIND_PATH(FMOD_INCLUDE_DIRS fmod.h ${FMOD_INCLUDE_SEARCH_DIRS}) + FIND_LIBRARY(FMOD_LIBRARIES debug fmodexp optimized fmodex PATHS ${FMOD_LIBRARY_SEARCH_DIRS}) + +ELSE (WIN32) #Unix + CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR) + FIND_PACKAGE(PkgConfig) + IF(PKG_CONFIG_FOUND) + # TODO i don't know how this would be registered in pkg-config + PKG_SEARCH_MODULE(FMOD FMOD) + SET(FMOD_INCLUDE_DIRS ${FMOD_INCLUDE_DIRS}) + SET(FMOD_LIBRARY_DIRS ${FMOD_LIBDIR}) + SET(FMOD_LIBRARIES ${FMOD_LIBRARIES} CACHE STRING "") + ENDIF(PKG_CONFIG_FOUND) + IF(NOT FMOD_FOUND) #If PkgConfig couldn't find OGRE... + IF (NOT FMOD_FIND_QUIETLY) + MESSAGE(STATUS " Manually searching for FMOD") + ENDIF (NOT FMOD_FIND_QUIETLY) + FIND_PATH(FMOD_INCLUDE_DIRS fmod.h ${FMOD_INCLUDE_SEARCH_DIRS}) + MESSAGE(STATUS "FMOD_INCLUDE_DIRS: " ${FMOD_INCLUDE_DIRS}) + FIND_LIBRARY(FMOD_LIBRARY fmodex ${FMOD_LIBRARY_SEARCH_DIRS}) + SET(FMOD_LIBRARIES ${FMOD_LIBRARY}) + ENDIF(NOT FMOD_FOUND) +ENDIF (WIN32) + +#Do some preparation +SEPARATE_ARGUMENTS(FMOD_INCLUDE_DIRS) +SEPARATE_ARGUMENTS(FMOD_LIBRARIES) + +SET(FMOD_INCLUDE_DIRS ${FMOD_INCLUDE_DIRS}) +SET(FMOD_LIBRARIES ${FMOD_LIBRARIES}) +SET(FMOD_LIBRARY_DIRS ${FMOD_LIBRARY_DIRS}) + +MARK_AS_ADVANCED(FMOD_INCLUDE_DIRS FMOD_LIBRARIES FMOD_LIBRARY_DIRS) + +IF (FMOD_INCLUDE_DIRS AND FMOD_LIBRARIES) + SET(FMOD_FOUND TRUE) +ENDIF (FMOD_INCLUDE_DIRS AND FMOD_LIBRARIES) + +IF (FMOD_FOUND) + IF (NOT FMOD_FIND_QUIETLY) + MESSAGE(STATUS " libraries : ${FMOD_LIBRARIES} from ${FMOD_LIBRARY_DIRS}") + MESSAGE(STATUS " includes : ${FMOD_INCLUDE_DIRS}") + ENDIF (NOT FMOD_FIND_QUIETLY) +ELSE (FMOD_FOUND) + MESSAGE(STATUS "fmod not found!") + IF (FMOD_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find FMOD. Make sure you have the FMOD development headers are installed. Otherwise, try setting LIBRARY_SEARCH_DIRS and INCLUDE_SEARCH_DIRS to the place FMOD was installed with -DLIBRARY_SEARCH_DIRS=<path/to/lib> -DINCLUDE_SEARCH_DIRS=<path/to/include>") + ENDIF (FMOD_FIND_REQUIRED) +ENDIF (FMOD_FOUND) Modified: trunk/spark/plugin/soundsystemfmod/CMakeLists.txt =================================================================== --- trunk/spark/plugin/soundsystemfmod/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) +++ trunk/spark/plugin/soundsystemfmod/CMakeLists.txt 2008-12-01 15:04:08 UTC (rev 17) @@ -15,9 +15,12 @@ ) if (FMOD_FOUND) + include_directories(${FMOD_INCLUDE_DIRS}) + link_directories(${FMOD_LIBRARY_DIRS}) + add_library(soundsystemfmod MODULE ${soundsystemfmod_LIB_SRCS}) - target_link_libraries(soundsystemfmod fmod) + target_link_libraries(soundsystemfmod ${FMOD_LIBRARIES}) set_target_properties(soundsystemfmod PROPERTIES VERSION 0.0.0 SOVERSION 0) install(TARGETS soundsystemfmod DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2008-12-01 20:57:28
|
Revision: 18 http://simspark.svn.sourceforge.net/simspark/?rev=18&view=rev Author: hedayat Date: 2008-12-01 20:57:25 +0000 (Mon, 01 Dec 2008) Log Message: ----------- Some cleanups Checking for networking libraries Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/configure.ac trunk/spark/lib/kerosin/CMakeLists.txt trunk/spark/lib/oxygen/CMakeLists.txt trunk/spark/lib/salt/CMakeLists.txt trunk/spark/lib/zeitgeist/CMakeLists.txt trunk/spark/spark/CMakeLists.txt trunk/spark/utility/libobj/CMakeLists.txt trunk/spark/utility/rcssnet/CMakeLists.txt Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2008-12-01 15:04:08 UTC (rev 17) +++ trunk/spark/CMakeLists.txt 2008-12-01 20:57:25 UTC (rev 18) @@ -38,14 +38,49 @@ ########## check types/functions ########## include(CheckFunctionExists) +include(CheckTypeSize) check_function_exists(strupr HAVE_STRUPR) -include(CheckTypeSize) set(CMAKE_REQUIRED_FLAGS "-include sys/socket.h") check_type_size(socklen_t SOCKLEN_T) +set(CMAKE_REQUIRED_FLAGS "") +########## check for required libraries ########## +include(CheckLibraryExists) +check_function_exists(socket FUNC_SOCKET_EXISTS) +if (NOT FUNC_SOCKET_EXISTS) + check_library_exists(socket socket "" SOCKET_LIB_REQ) + if (SOCKET_LIB_REQ) + set(NET_LIBS ${NET_LIBS} socket) + endif (SOCKET_LIB_REQ) +endif (NOT FUNC_SOCKET_EXISTS) + +check_function_exists(gethostbyname FUNC_GETHOSTBYNAME_EXISTS) +if (NOT FUNC_GETHOSTBYNAME_EXISTS) + check_library_exists(nsl gethostbyname "" NSL_LIB_REQ) + if (NSL_LIB_REQ) + set(NET_LIBS ${NET_LIBS} nsl) + endif (NSL_LIB_REQ) +endif (NOT FUNC_GETHOSTBYNAME_EXISTS) + +check_function_exists(hstrerror FUNC_HSTRERROR_EXISTS) +if (NOT FUNC_HSTRERROR_EXISTS) + check_library_exists(resolv hstrerror "" RESOLV_LIB_REQ) + if (RESOLV_LIB_REQ) + set(NET_LIBS ${NET_LIBS} resolv) + endif (RESOLV_LIB_REQ) +endif (NOT FUNC_HSTRERROR_EXISTS) + + ########## add extra flags ########## +set(CMAKE_BUILD_TYPE Debug) add_definitions(-DHAVE_CONFIG_H) include_directories(${CMAKE_BINARY_DIR}) +if (UNIX) + set(CMAKE_CXX_FLAGS "-Wno-deprecated") + set(CMAKE_CXX_FLAGS_DEBUG "-g -W -Wall -Woverloaded-virtual") + set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG") +endif (UNIX) + set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "The directory to install binaries into.") set(LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH @@ -98,7 +133,7 @@ add_subdirectory(lib) add_subdirectory(plugin) add_subdirectory(test) -#add_subdirectory(doc) +add_subdirectory(doc) add_subdirectory(spark) add_subdirectory(data) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2008-12-01 15:04:08 UTC (rev 17) +++ trunk/spark/ChangeLog 2008-12-01 20:57:25 UTC (rev 18) @@ -1,3 +1,18 @@ +2008-12-02 Hedayat Vatankhah <he...@gr...> + + * utility/libobj/CMakeLists.txt: + * spark/CMakeLists.txt: + * lib/zeitgeist/CMakeLists.txt: + * lib/salt/CMakeLists.txt: + * lib/kerosin/CMakeLists.txt: + * lib/oxygen/CMakeLists.txt: + * utility/rcssnet/CMakeLists.txt: + - some cleanup + - added header files to target's sources (will be added to VS projects) + + * configure.ac: + - removed wxutil makefile generation + 2008-12-01 Hedayat Vatankhah <he...@gr...> * plugin/soundsystemfmod/CMakeLists.txt: Modified: trunk/spark/configure.ac =================================================================== --- trunk/spark/configure.ac 2008-12-01 15:04:08 UTC (rev 17) +++ trunk/spark/configure.ac 2008-12-01 20:57:25 UTC (rev 18) @@ -140,7 +140,6 @@ utility/sfsexp/Makefile \ utility/rcssnet/Makefile \ utility/tinyxml/Makefile \ - utility/wxutil/Makefile \ lib/Makefile \ lib/salt/Makefile \ lib/salt/salt-config \ Modified: trunk/spark/lib/kerosin/CMakeLists.txt =================================================================== --- trunk/spark/lib/kerosin/CMakeLists.txt 2008-12-01 15:04:08 UTC (rev 17) +++ trunk/spark/lib/kerosin/CMakeLists.txt 2008-12-01 20:57:25 UTC (rev 18) @@ -1,3 +1,52 @@ +########### target ############### +set(kerosin_LIB_HDRS + fontserver/font.h + fontserver/fontserver.h + fontserver/glyph.h + imageserver/image.h + imageserver/imageserver.h + inputserver/inputdevice.h + inputserver/inputserver.h + inputserver/inputsystem.h + inputserver/scancodemap.h + inputserver/inputcontrol.h + inputserver/inputitem.h + inputserver/input.h + kerosin.h + materialserver/material.h + materialserver/materialserver.h + sceneserver/axis.h + materialserver/material2dtexture.h + materialserver/materialexternal.h + materialserver/materialsolid.h + materialserver/materialexporter.h + sceneserver/singlematnode.h + sceneserver/light.h + sceneserver/sphere.h + sceneserver/box.h + sceneserver/ccylinder.h + sceneserver/cylinder.h + sceneserver/staticmesh.h + soundserver/soundeffect.h + soundserver/soundmodule.h + soundserver/soundobject.h + soundserver/soundserver.h + soundserver/soundstream.h + soundserver/soundsystem.h + textureserver/texture.h + textureserver/texture2d.h + textureserver/textureserver.h + openglserver/openglwrapper.h + openglserver/openglsystem.h + openglserver/openglserver.h + openglserver/glbase.h + renderserver/baserenderserver.h + renderserver/renderserver.h + renderserver/rendernode.h + renderserver/rendercontrol.h + renderserver/customrender.h +) + set(kerosin_LIB_SRCS fontserver/font.cpp fontserver/fontserver.cpp @@ -70,10 +119,8 @@ include_directories(${CMAKE_SOURCE_DIR}/lib ${FREETYPE_INCLUDE_DIRS} ${DevIL_INCLUDE_DIR} ${SDL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) -########### target ############### +add_library(kerosin SHARED ${kerosin_LIB_SRCS} ${kerosin_LIB_HDRS}) -add_library(kerosin SHARED ${kerosin_LIB_SRCS}) - target_link_libraries(kerosin ${FREETYPE_LIBRARIES} ${DevIL_LIBRARIES} ${SDL_LIBRARY} ${OPENGL_LIBRARIES}) @@ -93,53 +140,3 @@ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) install(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/kerosin FILES_MATCHING PATTERN "*.h") - -#original Makefile.am contents follow: - -#nobase_libpkginclude_HEADERS = \ -#fontserver/font.h \ -#fontserver/fontserver.h \ -#fontserver/glyph.h \ -#imageserver/image.h \ -#imageserver/imageserver.h \ -#inputserver/inputdevice.h \ -#inputserver/inputserver.h \ -#inputserver/inputsystem.h \ -#inputserver/scancodemap.h \ -#inputserver/inputcontrol.h \ -#inputserver/inputitem.h \ -#inputserver/input.h \ -#kerosin.h \ -#materialserver/material.h \ -#materialserver/materialserver.h \ -#sceneserver/axis.h \ -#materialserver/material2dtexture.h \ -#materialserver/materialexternal.h \ -#materialserver/materialsolid.h \ -#materialserver/materialexporter.h \ -#sceneserver/singlematnode.h \ -#sceneserver/light.h \ -#sceneserver/sphere.h \ -#sceneserver/box.h \ -#sceneserver/ccylinder.h \ -#sceneserver/cylinder.h \ -#sceneserver/staticmesh.h \ -#soundserver/soundeffect.h \ -#soundserver/soundmodule.h \ -#soundserver/soundobject.h \ -#soundserver/soundserver.h \ -#soundserver/soundstream.h \ -#soundserver/soundsystem.h \ -#textureserver/texture.h \ -#textureserver/texture2d.h \ -#textureserver/textureserver.h \ -#openglserver/openglwrapper.h \ -#openglserver/openglsystem.h \ -#openglserver/openglserver.h \ -#openglserver/glbase.h \ -#renderserver/baserenderserver.h \ -#renderserver/renderserver.h \ -#renderserver/rendernode.h \ -#renderserver/rendercontrol.h \ -#renderserver/customrender.h -# Modified: trunk/spark/lib/oxygen/CMakeLists.txt =================================================================== --- trunk/spark/lib/oxygen/CMakeLists.txt 2008-12-01 15:04:08 UTC (rev 17) +++ trunk/spark/lib/oxygen/CMakeLists.txt 2008-12-01 20:57:25 UTC (rev 18) @@ -1,3 +1,87 @@ +########### next target ############### +set(oxygen_LIB_HDRS + agentaspect/agentaspect.h + agentaspect/effector.h + agentaspect/jointeffector.h + agentaspect/jointperceptor.h + agentaspect/perceptor.h + agentaspect/createaction.h + controlaspect/controlaspect.h + gamecontrolserver/predicate.h + gamecontrolserver/gamecontrolserver.h + gamecontrolserver/baseparser.h + gamecontrolserver/actionobject.h + gamecontrolserver/behavior.h + oxygen.h + physicsserver/body.h + physicsserver/bodycontroller.h + physicsserver/boxcollider.h + physicsserver/ccylindercollider.h + physicsserver/collider.h + physicsserver/collisionhandler.h + physicsserver/contactjointhandler.h + physicsserver/odeobject.h + physicsserver/odewrapper.h + physicsserver/physicsserver.h + physicsserver/planecollider.h + physicsserver/raycollider.h + physicsserver/recorderhandler.h + physicsserver/space.h + physicsserver/spherecollider.h + physicsserver/transformcollider.h + physicsserver/world.h + physicsserver/dragcontroller.h + physicsserver/velocitycontroller.h + physicsserver/joint.h + physicsserver/balljoint.h + physicsserver/hingejoint.h + physicsserver/fixedjoint.h + physicsserver/sliderjoint.h + physicsserver/universaljoint.h + physicsserver/hinge2joint.h + physicsserver/angularmotor.h + sceneserver/sceneimporter.h + sceneserver/basenode.h + sceneserver/fpscontroller.h + sceneserver/scene.h + sceneserver/sceneserver.h + sceneserver/sceneimporter.h + sceneserver/transform.h + sceneserver/camera.h + sceneserver/scenedict.h + simulationserver/simulationserver.h + simulationserver/simcontrolnode.h + simulationserver/agentcontrol.h + simulationserver/monitorcontrol.h + simulationserver/monitorlogger.h + simulationserver/netcontrol.h + simulationserver/netclient.h + simulationserver/netmessage.h + simulationserver/netbuffer.h + simulationserver/traincontrol.h + geometryserver/geometryserver.h + geometryserver/meshexporter.h + geometryserver/meshimporter.h + geometryserver/stdmeshimporter.h + geometryserver/trimesh.h + geometryserver/indexbuffer.h + monitorserver/monitorserver.h + monitorserver/monitorsystem.h + monitorserver/monitoritem.h + monitorserver/custommonitor.h + monitorserver/monitorcmdparser.h +) +if(SPADES_FOUND) + set(oxygen_LIB_HDRS + ${oxygen_LIB_HDRS} + spadesserver/spadesserver.h + spadesserver/paramreader.h + spadesserver/paramstorer.h + spadesserver/spadescreatesenseevent.h + spadesserver/spadesactevent.h + ) +endif(SPADES_FOUND) + set(oxygen_LIB_SRCS agentaspect/agentaspect.cpp agentaspect/agentaspect_c.cpp @@ -135,10 +219,8 @@ include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility/) -########### next target ############### +add_library(oxygen SHARED ${oxygen_LIB_SRCS} ${oxygen_LIB_HDRS}) -add_library(oxygen SHARED ${oxygen_LIB_SRCS}) - target_link_libraries(oxygen rcssnet3D ${Boost_LIBRARIES} ${ODE_LIBRARY}) set_target_properties(oxygen PROPERTIES VERSION ${OXYGEN_VERSION} @@ -157,86 +239,3 @@ install(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/oxygen FILES_MATCHING PATTERN "*.h") - -#original Makefile.am contents follow: - -#if DEBUG -#liboxygen_debug_la_CXXFLAGS = -O -g -W -Wall -Woverloaded-virtual -Wno-deprecated -#else -#liboxygen_la_CXXFLAGS = -O2 -Wno-deprecated -#liboxygen_la_LIBADD = -lode $(spades_libs) @BOOST_THREADS_LIB@ -# - -#nobase_libpkginclude_HEADERS = \ -#agentaspect/agentaspect.h \ -#agentaspect/effector.h \ -#agentaspect/jointeffector.h \ -#agentaspect/jointperceptor.h \ -#agentaspect/perceptor.h \ -#agentaspect/createaction.h \ -#controlaspect/controlaspect.h \ -#gamecontrolserver/predicate.h \ -#gamecontrolserver/gamecontrolserver.h \ -#gamecontrolserver/baseparser.h \ -#gamecontrolserver/actionobject.h \ -#gamecontrolserver/behavior.h \ -#oxygen.h \ -#physicsserver/body.h \ -#physicsserver/bodycontroller.h \ -#physicsserver/boxcollider.h \ -#physicsserver/ccylindercollider.h \ -#physicsserver/collider.h \ -#physicsserver/collisionhandler.h \ -#physicsserver/contactjointhandler.h \ -#physicsserver/odeobject.h \ -#physicsserver/odewrapper.h \ -#physicsserver/physicsserver.h \ -#physicsserver/planecollider.h \ -#physicsserver/raycollider.h \ -#physicsserver/recorderhandler.h \ -#physicsserver/space.h \ -#physicsserver/spherecollider.h \ -#physicsserver/transformcollider.h \ -#physicsserver/world.h \ -#physicsserver/dragcontroller.h \ -#physicsserver/velocitycontroller.h \ -#physicsserver/joint.h \ -#physicsserver/balljoint.h \ -#physicsserver/hingejoint.h \ -#physicsserver/fixedjoint.h \ -#physicsserver/sliderjoint.h \ -#physicsserver/universaljoint.h \ -#physicsserver/hinge2joint.h \ -#physicsserver/angularmotor.h \ -#sceneserver/sceneimporter.h \ -#sceneserver/basenode.h \ -#sceneserver/fpscontroller.h \ -#sceneserver/scene.h \ -#sceneserver/sceneserver.h \ -#sceneserver/sceneimporter.h \ -#sceneserver/transform.h \ -#sceneserver/camera.h \ -#sceneserver/scenedict.h \ -#simulationserver/simulationserver.h \ -#simulationserver/simcontrolnode.h \ -#simulationserver/agentcontrol.h \ -#simulationserver/monitorcontrol.h \ -#simulationserver/monitorlogger.h \ -#simulationserver/netcontrol.h \ -#simulationserver/netclient.h \ -#simulationserver/netmessage.h \ -#simulationserver/netbuffer.h \ -#simulationserver/traincontrol.h \ -#geometryserver/geometryserver.h \ -#geometryserver/meshexporter.h \ -#geometryserver/meshimporter.h \ -#geometryserver/stdmeshimporter.h \ -#geometryserver/trimesh.h \ -#geometryserver/indexbuffer.h \ -#monitorserver/monitorserver.h \ -#monitorserver/monitorsystem.h \ -#monitorserver/monitoritem.h \ -#monitorserver/custommonitor.h \ -#monitorserver/monitorcmdparser.h \ -#$(spades_headers) -# Modified: trunk/spark/lib/salt/CMakeLists.txt =================================================================== --- trunk/spark/lib/salt/CMakeLists.txt 2008-12-01 15:04:08 UTC (rev 17) +++ trunk/spark/lib/salt/CMakeLists.txt 2008-12-01 20:57:25 UTC (rev 18) @@ -1,17 +1,33 @@ +########### target ############### +set(salt_LIB_HDRS + bounds.h + fileclasses.h + gmath.h + path.h + random.h + salt.h + tvector.h + defines.h + frustum.h + matrix.h + plane.h + rect.h + sharedlibrary.h + vector.h +) + set(salt_LIB_SRCS - bounds.cpp - fileclasses.cpp - frustum.cpp - matrix.cpp - path.cpp - plane.cpp - sharedlibrary.cpp + bounds.cpp + fileclasses.cpp + frustum.cpp + matrix.cpp + path.cpp + plane.cpp + sharedlibrary.cpp ) -########### target ############### +add_library(salt SHARED ${salt_LIB_SRCS} ${salt_LIB_HDRS}) -add_library(salt SHARED ${salt_LIB_SRCS}) - target_link_libraries(salt libobject) set_target_properties(salt PROPERTIES VERSION ${SALT_VERSION} @@ -29,24 +45,3 @@ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) -#original Makefile.am contents follow: - -#if DEBUG -#libsalt_debug_la_CXXFLAGS = -O -g -W -Wall -#libsalt_la_CXXFLAGS = -O2 -# -#libpkginclude_HEADERS = \ -#bounds.h \ -#fileclasses.h \ -#gmath.h \ -#path.h \ -#random.h \ -#salt.h \ -#tvector.h \ -#defines.h \ -#frustum.h \ -#matrix.h \ -#plane.h \ -#rect.h \ -#sharedlibrary.h \ -#vector.h Modified: trunk/spark/lib/zeitgeist/CMakeLists.txt =================================================================== --- trunk/spark/lib/zeitgeist/CMakeLists.txt 2008-12-01 15:04:08 UTC (rev 17) +++ trunk/spark/lib/zeitgeist/CMakeLists.txt 2008-12-01 20:57:25 UTC (rev 18) @@ -1,3 +1,28 @@ +########### target ############### +set(zeitgeist_LIB_HDRS + class.h + core.h + corecontext.h + leaf.h + parameterlist.h + node.h + object.h + object_c.h + zeitgeist.h + fileserver/fileserver.h + fileserver/filesystem.h + logserver/logserver.h + logserver/logserverstreambuf.h + randomserver/randomserver.h + scriptserver/gcvalue.h + scriptserver/scriptserver.h + scriptserver/rubywrapper.h + + #telnetserver/telnetdaemon.h + #telnetserver/telnetserver.h + #telnetserver/telnetsession.h +) + set(zeitgeist_LIB_SRCS class.cpp class_c.cpp @@ -31,8 +56,7 @@ include_directories(${CMAKE_SOURCE_DIR}/lib ${RUBY_INCLUDE_PATH}) -########### target ############### -add_library(zeitgeist SHARED ${zeitgeist_LIB_SRCS}) +add_library(zeitgeist SHARED ${zeitgeist_LIB_SRCS} ${zeitgeist_LIB_HDRS}) target_link_libraries(zeitgeist ${RUBY_LIBRARY}) @@ -53,27 +77,3 @@ FILES_MATCHING PATTERN "*.h") -#original Makefile.am contents follow: - -#nobase_libpkginclude_HEADERS = \ -#class.h \ -#core.h \ -#corecontext.h \ -#leaf.h \ -#parameterlist.h \ -#node.h \ -#object.h \ -#object_c.h \ -#zeitgeist.h \ -#fileserver/fileserver.h \ -#fileserver/filesystem.h \ -#logserver/logserver.h \ -#logserver/logserverstreambuf.h \ -#randomserver/randomserver.h \ -#scriptserver/gcvalue.h \ -#scriptserver/scriptserver.h \ -#scriptserver/rubywrapper.h -# -##telnetserver/telnetdaemon.h \ -##telnetserver/telnetserver.h \ -##telnetserver/telnetsession.h Modified: trunk/spark/spark/CMakeLists.txt =================================================================== --- trunk/spark/spark/CMakeLists.txt 2008-12-01 15:04:08 UTC (rev 17) +++ trunk/spark/spark/CMakeLists.txt 2008-12-01 20:57:25 UTC (rev 18) @@ -2,6 +2,7 @@ set(spark_LIB_SRCS spark.cpp + spark.h ) include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility @@ -25,18 +26,3 @@ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) install(FILES spark.h DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/spark) - - - -#original Makefile.am contents follow: - -#libspark_debug_la_CXXFLAGS = -O -g -W -Wall -#libspark_la_LIBADD = @FREETYPE_LIBADD@ @SDL_LIBADD@ @IL_LIBADD@ @GL_LIBADD@ -#bin_SCRIPTS = spark-config -# -#AM_CPPFLAGS = -I${top_srcdir}/lib -I${top_srcdir}/utility \ -# @FREETYPE_CPPFLAGS@ @RUBY_CPPFLAGS@ @SDL_CPPFLAGS@ -# -# -#nobase_libpkginclude_HEADERS = \ -#spark.h Modified: trunk/spark/utility/libobj/CMakeLists.txt =================================================================== --- trunk/spark/utility/libobj/CMakeLists.txt 2008-12-01 15:04:08 UTC (rev 17) +++ trunk/spark/utility/libobj/CMakeLists.txt 2008-12-01 20:57:25 UTC (rev 18) @@ -8,17 +8,5 @@ add_library(libobject STATIC ${libobject_STAT_SRCS}) -########### install files ############### - - - - -#original Makefile.am contents follow: - -#noinst_LTLIBRARIES = liblibobject.la # -#liblibobject_la_SOURCES = libobj.c -# -#liblibobject_la_LIBADD = @LTLIBOBJS@ -# #EXTRA_DIST = memcmp.c _vsnprintf.c Modified: trunk/spark/utility/rcssnet/CMakeLists.txt =================================================================== --- trunk/spark/utility/rcssnet/CMakeLists.txt 2008-12-01 15:04:08 UTC (rev 17) +++ trunk/spark/utility/rcssnet/CMakeLists.txt 2008-12-01 20:57:25 UTC (rev 18) @@ -1,18 +1,29 @@ +########### target ############### +set(rcssnet3D_LIB_HDRS + addr.hpp + exception.hpp + handler.hpp + iosocketstream.hpp + isocketstream.hpp + osocketstream.hpp + socket.hpp + socketstreambuf.hpp + tcpsocket.hpp + udpsocket.hpp +) -########### next target ############### - set(rcssnet3D_LIB_SRCS - addr.cpp - exception.cpp - handler.cpp - socket.cpp - tcpsocket.cpp - udpsocket.cpp + addr.cpp + exception.cpp + handler.cpp + socket.cpp + tcpsocket.cpp + udpsocket.cpp ) -add_library(rcssnet3D SHARED ${rcssnet3D_LIB_SRCS}) +add_library(rcssnet3D SHARED ${rcssnet3D_LIB_SRCS} ${rcssnet3D_LIB_HDRS}) -target_link_libraries(rcssnet3D) +target_link_libraries(rcssnet3D ${NET_LIBS}) set_target_properties(rcssnet3D PROPERTIES VERSION ${RCSSNET_VERSION} SOVERSION ${RCSSNET_SO_VERSION}) @@ -23,23 +34,3 @@ install(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/rcssnet FILES_MATCHING PATTERN "*.hpp") - - - -#original Makefile.am contents follow: - -#libpkginclude_HEADERS = \ -#addr.hpp \ -#exception.hpp \ -#handler.hpp \ -#iosocketstream.hpp \ -#isocketstream.hpp \ -#osocketstream.hpp \ -#socket.hpp \ -#socketstreambuf.hpp \ -#tcpsocket.hpp \ -#udpsocket.hpp -# -#librcssnet3D_la_LIBADD = @NET_LIBS@ -### define include directory local to the pkgincludedir -#EXTRA_DIST = README This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2008-11-30 21:56:59
|
Revision: 16 http://simspark.svn.sourceforge.net/simspark/?rev=16&view=rev Author: hedayat Date: 2008-11-30 21:56:52 +0000 (Sun, 30 Nov 2008) Log Message: ----------- Added experimental CMake support Added Paths: ----------- trunk/spark/CMakeLists.txt trunk/spark/cmake/ trunk/spark/cmake/FindDevIL.cmake trunk/spark/cmake/FindODE.cmake trunk/spark/data/CMakeLists.txt trunk/spark/doc/CMakeLists.txt trunk/spark/doc/devel/CMakeLists.txt trunk/spark/doc/devel/howtos/CMakeLists.txt trunk/spark/doc/papers/proposal/CMakeLists.txt trunk/spark/lib/CMakeLists.txt trunk/spark/lib/kerosin/CMakeLists.txt trunk/spark/lib/oxygen/CMakeLists.txt trunk/spark/lib/salt/CMakeLists.txt trunk/spark/lib/zeitgeist/CMakeLists.txt trunk/spark/plugin/CMakeLists.txt trunk/spark/plugin/collisionperceptor/CMakeLists.txt trunk/spark/plugin/filesystemrar/CMakeLists.txt trunk/spark/plugin/filesystemstd/CMakeLists.txt trunk/spark/plugin/filesystemzip/CMakeLists.txt trunk/spark/plugin/forceeffector/CMakeLists.txt trunk/spark/plugin/gyrorateperceptor/CMakeLists.txt trunk/spark/plugin/inputsdl/CMakeLists.txt trunk/spark/plugin/inputwx/CMakeLists.txt trunk/spark/plugin/objimporter/CMakeLists.txt trunk/spark/plugin/openglsyssdl/CMakeLists.txt trunk/spark/plugin/openglsyswx/CMakeLists.txt trunk/spark/plugin/perfectvisionperceptor/CMakeLists.txt trunk/spark/plugin/rosimporter/CMakeLists.txt trunk/spark/plugin/rubysceneimporter/CMakeLists.txt trunk/spark/plugin/sceneeffector/CMakeLists.txt trunk/spark/plugin/sexpparser/CMakeLists.txt trunk/spark/plugin/soundsystembass/CMakeLists.txt trunk/spark/plugin/soundsystemfmod/CMakeLists.txt trunk/spark/plugin/sparkagent/CMakeLists.txt trunk/spark/plugin/sparkmonitor/CMakeLists.txt trunk/spark/spark/CMakeLists.txt trunk/spark/sparkconfig.h.cmake trunk/spark/test/CMakeLists.txt trunk/spark/test/coretest/CMakeLists.txt trunk/spark/test/fonttest/CMakeLists.txt trunk/spark/test/inputtest/CMakeLists.txt trunk/spark/test/scenetest/CMakeLists.txt trunk/spark/test/zeitgeisttest/CMakeLists.txt trunk/spark/utility/CMakeLists.txt trunk/spark/utility/libobj/CMakeLists.txt trunk/spark/utility/rcssnet/CMakeLists.txt trunk/spark/utility/sfsexp/CMakeLists.txt trunk/spark/utility/tinyxml/CMakeLists.txt Added: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt (rev 0) +++ trunk/spark/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,149 @@ +cmake_minimum_required(VERSION 2.6) + +project(simspark CXX C) + +########## check for headerfiles/libraries ########## +include(CheckIncludeFile) +check_include_file("netdb.h" HAVE_NETDB_H) +check_include_file("resolv.h" HAVE_RESOLV_H) +check_include_file("sys/socket.h" HAVE_SYS_SOCKET_H) +check_include_file("netinet/in.h" HAVE_NETINET_IN_H) +check_include_file("Winsock2.h" HAVE_WINSOCK2_H) +check_include_file("arpa/nameser.h" HAVE_ARPA_NAMESER_H) +check_include_file("arpa/inet.h" HAVE_ARPA_INET_H) +check_include_file("string.h" HAVE_STRING_H) +check_include_file("float.h" HAVE_FLOAT_H) +check_include_file("limits.h" HAVE_LIMITS_H) +check_include_file("malloc.h" HAVE_MALLOC_H) +check_include_file("memory.h" HAVE_MEMORY_H) +check_include_file("stdlib.h" HAVE_STDLIB_H) +check_include_file("execinfo.h" HAVE_EXECINFO_H) +check_include_file("unistd.h" HAVE_UNISTD_H) +check_include_file("poll.h" HAVE_POLL_H) +check_include_file("CoreFoundation/CoreFoundation.h" + HAVE_COREFOUNDATION_COREFOUNDATION_H) + +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) +find_package(Ruby REQUIRED) +find_package(Freetype REQUIRED) +find_package(DevIL REQUIRED) +find_package(Boost REQUIRED thread COMPONENTS regex) +find_package(wxWidgets COMPONENTS gl base core) +find_package(ODE REQUIRED) +find_package(OpenGL REQUIRED) +find_package(SDL REQUIRED) +set(HAVE_IL_IL_H 1) +set(HAVE_KEROSIN_KEROSIN_H 1) + +########## check types/functions ########## +include(CheckFunctionExists) +check_function_exists(strupr HAVE_STRUPR) +include(CheckTypeSize) +set(CMAKE_REQUIRED_FLAGS "-include sys/socket.h") +check_type_size(socklen_t SOCKLEN_T) + +########## add extra flags ########## +add_definitions(-DHAVE_CONFIG_H) +include_directories(${CMAKE_BINARY_DIR}) +set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH + "The directory to install binaries into.") +set(LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH + "The directory to install libraries into.") +set(DATADIR "${CMAKE_INSTALL_PREFIX}/share" CACHE PATH + "The directory to install data files into.") +set(INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH + "The directory to install includes into.") +set(CMAKE_SHARED_MODULE_PREFIX "") + +########## library version numbers ########## +set(SALT_SO_VERSION 3) +set(SALT_VERSION ${SALT_SO_VERSION}.1.3) +set(ZEITGEIST_SO_VERSION 3) +set(ZEITGEIST_VERSION ${ZEITGEIST_SO_VERSION}.1.0) +set(OXYGEN_SO_VERSION 5) +set(OXYGEN_VERSION ${OXYGEN_SO_VERSION}.3.2) +set(KEROSIN_SO_VERSION 1) +set(KEROSIN_VERSION ${KEROSIN_SO_VERSION}.1.0) +set(SPARK_SO_VERSION 0) +set(SPARK_VERSION ${SPARK_SO_VERSION}.0.0) +set(RCSSNET_SO_VERSION 0) +set(RCSSNET_VERSION ${RCSSNET_SO_VERSION}.0.0) + +########## additional variables for -config scripts ########## +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix ${CMAKE_INSTALL_PREFIX}) +set(spark_version ${SPARK_VERSION}) +set(salt_version ${SALT_VERSION}) +set(zeitgeist_version ${ZEITGEIST_VERSION}) +set(oxygen_version ${OXYGEN_VERSION}) +set(kerosin_version ${KEROSIN_VERSION}) +set(includedir ${INCLUDEDIR}) +set(libdir ${LIBDIR}) +if (CMAKE_BUILD_TYPE STREQUAL "Debug") + set(debug "true") +else (CMAKE_BUILD_TYPE STREQUAL "Debug") + set(debug "false") +endif (CMAKE_BUILD_TYPE STREQUAL "Debug") + + +########## generate configuration file ########## +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sparkconfig.h.cmake +${CMAKE_CURRENT_BINARY_DIR}/sparkconfig.h) + +########## add subdirectories ############ +add_subdirectory(utility) +add_subdirectory(lib) +add_subdirectory(plugin) +add_subdirectory(test) +#add_subdirectory(doc) +add_subdirectory(spark) +add_subdirectory(data) + + +########### install files ############### +install(FILES AUTHORS ChangeLog COPYING NEWS README THANKS DESTINATION + ${DATADIR}/doc/${CMAKE_PROJECT_NAME}) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sparkconfig.h DESTINATION + ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}) + + + +#original Makefile.am contents follow: + +#### utility subdir has to be made first +#SUBDIRS = utility lib plugin test doc spark data +# +#pkginclude_HEADERS = \ +#sparkconfig.h +# +#doc: doc-recursive +#doc-recursive: +# cd doc && $(MAKE) $(AM_MAKEFLAGS) doc +# +#CLEANFILES = +# +#DISTCLEANFILES = $(top_builddir)/macosX/SDLMain.o $(top_builddir)/macosX/libSDLmain.a +#EXTRA_DIST = macosX \ +# windows/sparkconfig.h windows/simspark.iss windows/spark.ico +#dist_doc_DATA = AUTHORS ChangeLog COPYING NEWS README THANKS +# +#EXTRA_SRC_DISTS = +#EXTRA_BIN_DISTS = +#include $(top_srcdir)/config.aux/dist.am +# +#UPLOAD_BIN = +#UPLOAD_SRC = upload-gzip upload-bzip2 upload-zip +#UPLOAD_TARGETS = \ +#{gzip=>@PACKAGE@-@VERSION@.tar.gz} \ +#{bzip2=>@PACKAGE@-@VERSION@.tar.bz2} \ +#{zip=>@PACKAGE@-@VERSION@.zip} +#include $(top_srcdir)/config.aux/sf.am +# +# +#include $(top_srcdir)/config.aux/cvs.am +# +##MSI_SETUP_FILE=Setup/Release/@PAC...@Se...i +##include $(top_srcdir)/config.aux/msi.am +# +##include $(top_srcdir)/config.aux/rpm.am +# Property changes on: trunk/spark/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/cmake/FindDevIL.cmake =================================================================== --- trunk/spark/cmake/FindDevIL.cmake (rev 0) +++ trunk/spark/cmake/FindDevIL.cmake 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,120 @@ +# -Try to find DevIL (developer image) library +# formerly known as OpenIL, see +# http://openil.sourceforge.net +# +# Once run this will define: +# +# DevIL_FOUND +# DevIL_INCLUDE_DIR +# DevIL_LIBRARIES +# +# Jan Woetzel 12/2005. +# +# www.mip.informatik.uni-kiel.de/~jw +# -------------------------------- + +# base dirs: +SET(DevIL_POSSIBLE_ROOT_PATHS + ${DevIL_ROOT_DIR} + $ENV{DevIL_ROOT_DIR} + ${DevIL_DIR} + $ENV{DevIL_DIR} + ${DEVIL_DIR} + $ENV{DEVIL_DIR} + ${DEVIL_HOME} + $ENV{DEVIL_HOME} + "$ENV{EXTERN_LIBS_DIR}/DevIL" + $ENV{EXTRA_DIR} + $ENV{EXTRA} + $ENV{ProgramFiles}/DevIL + /usr/local/ + /usr/ + /opt/net/gcc41/DevIL + /opt/net/gcc33/DevIL + ) + +# appended +SET(DevIL_POSSIBLE_INCDIR_SUFFIXES + include + DevIL/include ) +SET(DevIL_POSSIBLE_LIBDIR_SUFFIXES + lib + lib64 + DevIL/lib ) + + + +FIND_PATH(DevIL_INCLUDE_DIR + NAMES IL/il.h + PATHS ${DevIL_POSSIBLE_ROOT_PATHS} + PATH_SUFFIXES ${DevIL_POSSIBLE_INCDIR_SUFFIXES} ) +#MESSAGE("DBG DevIL_INCLUDE_DIR=${DevIL_INCLUDE_DIR}") + + +FIND_LIBRARY(DevIL_LIBRARY_IL + NAMES DevIL devil DevIL IL + PATHS ${DevIL_POSSIBLE_ROOT_PATHS} + PATH_SUFFIXES ${DevIL_POSSIBLE_LIBDIR_SUFFIXES} ) +#MESSAGE("DBG DevIL_LIBRARY_IL=${DevIL_LIBRARY_IL}") + +FIND_LIBRARY(DevIL_LIBRARY_ILU + NAMES ILU ilu Ilu + PATHS ${DevIL_POSSIBLE_ROOT_PATHS} + PATH_SUFFIXES ${DevIL_POSSIBLE_LIBDIR_SUFFIXES} ) +#MESSAGE("DBG DevIL_LIBRARY_ILU=${DevIL_LIBRARY_ILU}") + +FIND_LIBRARY(DevIL_LIBRARY_ILUT + NAMES ILUT ilu Ilut + PATHS ${DevIL_POSSIBLE_ROOT_PATHS} + PATH_SUFFIXES ${DevIL_POSSIBLE_LIBDIR_SUFFIXES} ) +#MESSAGE("DBG DevIL_LIBRARY_ILUT=${DevIL_LIBRARY_ILUT}") + + + +# -------------------------------- + +IF (DevIL_INCLUDE_DIR) + IF (DevIL_LIBRARY_IL) + IF (DevIL_LIBRARY_ILU)# AND DevIL_LIBRARY_ILUT) + + SET(DevIL_FOUND TRUE) + SET(DevIL_LIBRARIES + ${DevIL_LIBRARY_IL} + ${DevIL_LIBRARY_ILU}) + IF (DevIL_LIBRARY_ILUT) + SET(DevIL_LIBRARIES ${DevIL_LIBRARIES} ${DevIL_LIBRARY_ILUT}) + ENDIF (DevIL_LIBRARY_ILUT) + + # get the link directory for rpath to be used with LINK_DIRECTORIES: + GET_FILENAME_COMPONENT(DevIL_LINK_DIRECTORIES ${DevIL_LIBRARY_IL} PATH) + + ENDIF(DevIL_LIBRARY_ILU)# AND DevIL_LIBRARY_ILUT) + ENDIF(DevIL_LIBRARY_IL) +ENDIF (DevIL_INCLUDE_DIR) + + +MARK_AS_ADVANCED( + DevIL_INCLUDE_DIR + DevIL_LIBRARY_IL + DevIL_LIBRARY_ILU + DevIL_LIBRARY_ILUT + DevIL_LIBRARIES + ) + + +# ========================================== +IF(NOT DevIL_FOUND) + # make FIND_PACKAGE friendly + IF(NOT DevIL_FIND_QUIETLY) + IF(DevIL_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "DevIL required, please specify it's location.") + ELSE(DevIL_FIND_REQUIRED) + MESSAGE(STATUS "ERROR: DevIL was not found.") + ENDIF(DevIL_FIND_REQUIRED) + ENDIF(NOT DevIL_FIND_QUIETLY) +ENDIF(NOT DevIL_FOUND) + +# backward compatibility +SET(DEVIL_FOUND ${DevIL_FOUND}) +SET(DEVIL_LIBRARIES ${DevIL_LIBRARIES}) +SET(DEVIL_INCLUDE_DIR ${DevIL_INCLUDE_DIR}) Added: trunk/spark/cmake/FindODE.cmake =================================================================== --- trunk/spark/cmake/FindODE.cmake (rev 0) +++ trunk/spark/cmake/FindODE.cmake 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,46 @@ +# find ODE (Open Dynamics Engine) includes and library +# +# ODE_INCLUDE_DIR - where the directory containing the ODE headers can be +# found +# ODE_LIBRARY - full path to the ODE library +# ODE_FOUND - TRUE if ODE was found + +IF (NOT ODE_FOUND) + + FIND_PATH(ODE_INCLUDE_DIR ode/ode.h + /usr/include + /usr/local/include + $ENV{OGRE_HOME}/include # OGRE SDK on WIN32 + $ENV{INCLUDE} + ) + FIND_LIBRARY(ODE_LIBRARY + NAMES ode + PATHS + /usr/lib + /usr/lib64 + /usr/local/lib + $ENV{OGRE_HOME}/lib # OGRE SDK on WIN32 + ) + + IF(ODE_INCLUDE_DIR) + MESSAGE(STATUS "Found ODE include dir: ${ODE_INCLUDE_DIR}") + ELSE(ODE_INCLUDE_DIR) + MESSAGE(STATUS "Could NOT find ODE headers.") + ENDIF(ODE_INCLUDE_DIR) + + IF(ODE_LIBRARY) + MESSAGE(STATUS "Found ODE library: ${ODE_LIBRARY}") + ELSE(ODE_LIBRARY) + MESSAGE(STATUS "Could NOT find ODE library.") + ENDIF(ODE_LIBRARY) + + IF(ODE_INCLUDE_DIR AND ODE_LIBRARY) + SET(ODE_FOUND TRUE CACHE STRING "Whether ODE was found or not") + ELSE(ODE_INCLUDE_DIR AND ODE_LIBRARY) + SET(ODE_FOUND FALSE) + IF(ODE_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find ODE. Please install ODE (http://www.ode.org)") + ENDIF(ODE_FIND_REQUIRED) + ENDIF(ODE_INCLUDE_DIR AND ODE_LIBRARY) +ENDIF (NOT ODE_FOUND) + Added: trunk/spark/data/CMakeLists.txt =================================================================== --- trunk/spark/data/CMakeLists.txt (rev 0) +++ trunk/spark/data/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,6 @@ + +########### install files ############### + +install(DIRECTORY fonts ros rsg scripts + DESTINATION ${DATADIR}/${CMAKE_PROJECT_NAME} + PATTERN ".svn" EXCLUDE) Property changes on: trunk/spark/data/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/doc/CMakeLists.txt =================================================================== --- trunk/spark/doc/CMakeLists.txt (rev 0) +++ trunk/spark/doc/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,32 @@ +add_subdirectory(devel) + + +########### install files ############### + + + + +#original Makefile.am contents follow: + +#SUBDIRS = devel +# +#all-local: +#if DOXYGEN +# @echo "***" +# @echo "*** To (re-)build the Doxygen API documentation, use 'make doc'" +# @echo "***" +#endif +# +#doc: Doxyfile +# rm -rf $(srcdir)/api/developers +# mkdir -p $(srcdir)/api/developers +# cp $(srcdir)/devel/howtos/*.* $(srcdir)/api/developers/ +#if DOXYGEN +# doxygen Doxyfile +#else +# touch $(srcdir)/api/index.html +#endif +# +#maintainer-clean-local: +# rm -rf api +# rm -rf *~ Property changes on: trunk/spark/doc/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/doc/devel/CMakeLists.txt =================================================================== --- trunk/spark/doc/devel/CMakeLists.txt (rev 0) +++ trunk/spark/doc/devel/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,32 @@ +add_subdirectory(howtos) + + +########### install files ############### + + + + +#original Makefile.am contents follow: + +#SUBDIRS = howtos +# +#if COND_PDFLATEX +#%.toc: %.tex +# touch $@ +# pdflatex $< +# +#%.pdf: %.tex %.toc +# pdflatex $< +# +#all-local: +# @if test -f manual.tex; then \ +# $(MAKE) $(AM_MAKEFLAGS) manual.pdf ; \ +# else \ +# echo "***" ;\ +# echo "*** There is no developers manual yet. Please consider contributing to it." ; \ +# echo "***" ; \ +# fi +# +#EXTRA_DIST = manual.pdf +#CLEANFILES = manual.log manual.pdf manual.aux manual.toc +#endif Property changes on: trunk/spark/doc/devel/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/doc/devel/howtos/CMakeLists.txt =================================================================== --- trunk/spark/doc/devel/howtos/CMakeLists.txt (rev 0) +++ trunk/spark/doc/devel/howtos/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,28 @@ + +########### install files ############### + + + + +#original Makefile.am contents follow: + +#EXTRA_DIST = README \ +#fileserver.html \ +#highlight.css \ +#howto_agent.html \ +#howto_class.html \ +#howto_control.html \ +#howto_effector.html \ +#howto_export.html \ +#howto_function.html \ +#howto_perceptor.html \ +#howto_register.html \ +#howto_script.html \ +#howto_simulation.html \ +#howtos.html \ +#implementation.html \ +#logserver.html \ +#menu.html \ +#scriptserver.html \ +#welcome.html \ +#examplesrc/survivalcontrolaspect.cpp.html Property changes on: trunk/spark/doc/devel/howtos/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/doc/papers/proposal/CMakeLists.txt =================================================================== --- trunk/spark/doc/papers/proposal/CMakeLists.txt (rev 0) +++ trunk/spark/doc/papers/proposal/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,9 @@ + +########### install files ############### + + + + +#original Makefile.am contents follow: + +# Property changes on: trunk/spark/doc/papers/proposal/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/lib/CMakeLists.txt =================================================================== --- trunk/spark/lib/CMakeLists.txt (rev 0) +++ trunk/spark/lib/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,4 @@ +add_subdirectory(salt) +add_subdirectory(zeitgeist) +add_subdirectory(oxygen) +add_subdirectory(kerosin) Property changes on: trunk/spark/lib/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/lib/kerosin/CMakeLists.txt =================================================================== --- trunk/spark/lib/kerosin/CMakeLists.txt (rev 0) +++ trunk/spark/lib/kerosin/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,145 @@ +set(kerosin_LIB_SRCS + fontserver/font.cpp + fontserver/fontserver.cpp + fontserver/fontserver_c.cpp + fontserver/glyph.cpp + imageserver/image.cpp + imageserver/imageserver.cpp + imageserver/imageserver_c.cpp + inputserver/input.cpp + inputserver/inputdevice.cpp + inputserver/inputdevice_c.cpp + inputserver/inputserver.cpp + inputserver/inputserver_c.cpp + inputserver/inputsystem.cpp + inputserver/inputsystem_c.cpp + inputserver/scancodemap.cpp + inputserver/inputcontrol.cpp + inputserver/inputcontrol_c.cpp + inputserver/inputitem.cpp + inputserver/inputitem_c.cpp + kerosin.cpp + materialserver/material.cpp + materialserver/material_c.cpp + materialserver/material2dtexture.cpp + materialserver/material2dtexture_c.cpp + materialserver/materialexternal.cpp + materialserver/materialexternal_c.cpp + materialserver/materialsolid.cpp + materialserver/materialsolid_c.cpp + materialserver/materialserver.cpp + materialserver/materialserver_c.cpp + materialserver/materialexporter_c.cpp + sceneserver/axis.cpp + sceneserver/axis_c.cpp + sceneserver/light.cpp + sceneserver/light_c.cpp + sceneserver/singlematnode.cpp + sceneserver/singlematnode_c.cpp + sceneserver/box.cpp + sceneserver/box_c.cpp + sceneserver/sphere.cpp + sceneserver/sphere_c.cpp + sceneserver/ccylinder.cpp + sceneserver/ccylinder_c.cpp + sceneserver/cylinder.cpp + sceneserver/cylinder_c.cpp + sceneserver/staticmesh.cpp + sceneserver/staticmesh_c.cpp + soundserver/soundserver.cpp + soundserver/soundserver_c.cpp + textureserver/texture.cpp + textureserver/texture2d.cpp + textureserver/textureserver.cpp + textureserver/textureserver_c.cpp + openglserver/openglserver.cpp + openglserver/openglserver_c.cpp + openglserver/openglsystem_c.cpp + renderserver/baserenderserver.cpp + renderserver/baserenderserver_c.cpp + renderserver/renderserver.cpp + renderserver/renderserver_c.cpp + renderserver/rendernode.cpp + renderserver/rendernode_c.cpp + renderserver/rendercontrol.cpp + renderserver/rendercontrol_c.cpp + renderserver/customrender.cpp + renderserver/customrender_c.cpp +) + +include_directories(${CMAKE_SOURCE_DIR}/lib ${FREETYPE_INCLUDE_DIRS} + ${DevIL_INCLUDE_DIR} ${SDL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) + +########### target ############### + +add_library(kerosin SHARED ${kerosin_LIB_SRCS}) + +target_link_libraries(kerosin ${FREETYPE_LIBRARIES} ${DevIL_LIBRARIES} + ${SDL_LIBRARY} ${OPENGL_LIBRARIES}) + +set_target_properties(kerosin PROPERTIES VERSION ${KEROSIN_VERSION} + SOVERSION ${KEROSIN_SO_VERSION} DEBUG_POSTFIX _debug) +install(TARGETS kerosin DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kerosin-config.in + ${CMAKE_CURRENT_BINARY_DIR}/kerosin-config) + +########### install files ############### + +install(FILES kerosin.rb inputserver/german.scan.rb + openglserver/glbase.h DESTINATION ${DATADIR}/${CMAKE_PROJECT_NAME}) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kerosin-config DESTINATION + ${BINDIR} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) +install(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/kerosin + FILES_MATCHING PATTERN "*.h") + +#original Makefile.am contents follow: + +#nobase_libpkginclude_HEADERS = \ +#fontserver/font.h \ +#fontserver/fontserver.h \ +#fontserver/glyph.h \ +#imageserver/image.h \ +#imageserver/imageserver.h \ +#inputserver/inputdevice.h \ +#inputserver/inputserver.h \ +#inputserver/inputsystem.h \ +#inputserver/scancodemap.h \ +#inputserver/inputcontrol.h \ +#inputserver/inputitem.h \ +#inputserver/input.h \ +#kerosin.h \ +#materialserver/material.h \ +#materialserver/materialserver.h \ +#sceneserver/axis.h \ +#materialserver/material2dtexture.h \ +#materialserver/materialexternal.h \ +#materialserver/materialsolid.h \ +#materialserver/materialexporter.h \ +#sceneserver/singlematnode.h \ +#sceneserver/light.h \ +#sceneserver/sphere.h \ +#sceneserver/box.h \ +#sceneserver/ccylinder.h \ +#sceneserver/cylinder.h \ +#sceneserver/staticmesh.h \ +#soundserver/soundeffect.h \ +#soundserver/soundmodule.h \ +#soundserver/soundobject.h \ +#soundserver/soundserver.h \ +#soundserver/soundstream.h \ +#soundserver/soundsystem.h \ +#textureserver/texture.h \ +#textureserver/texture2d.h \ +#textureserver/textureserver.h \ +#openglserver/openglwrapper.h \ +#openglserver/openglsystem.h \ +#openglserver/openglserver.h \ +#openglserver/glbase.h \ +#renderserver/baserenderserver.h \ +#renderserver/renderserver.h \ +#renderserver/rendernode.h \ +#renderserver/rendercontrol.h \ +#renderserver/customrender.h +# Property changes on: trunk/spark/lib/kerosin/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/lib/oxygen/CMakeLists.txt =================================================================== --- trunk/spark/lib/oxygen/CMakeLists.txt (rev 0) +++ trunk/spark/lib/oxygen/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,242 @@ +set(oxygen_LIB_SRCS + agentaspect/agentaspect.cpp + agentaspect/agentaspect_c.cpp + agentaspect/effector.cpp + agentaspect/effector_c.cpp + agentaspect/perceptor.cpp + agentaspect/perceptor_c.cpp + controlaspect/controlaspect.cpp + controlaspect/controlaspect_c.cpp + gamecontrolserver/actionobject_c.cpp + gamecontrolserver/baseparser_c.cpp + gamecontrolserver/gamecontrolserver.cpp + gamecontrolserver/gamecontrolserver_c.cpp + gamecontrolserver/predicate.cpp + gamecontrolserver/behavior.cpp + gamecontrolserver/behavior_c.cpp + oxygen.cpp + physicsserver/body.cpp + physicsserver/body_c.cpp + physicsserver/bodycontroller.cpp + physicsserver/bodycontroller_c.cpp + physicsserver/transformcollider.cpp + physicsserver/transformcollider_c.cpp + physicsserver/boxcollider.cpp + physicsserver/boxcollider_c.cpp + physicsserver/ccylindercollider.cpp + physicsserver/ccylindercollider_c.cpp + physicsserver/collider.cpp + physicsserver/collider_c.cpp + physicsserver/collisionhandler.cpp + physicsserver/collisionhandler_c.cpp + physicsserver/contactjointhandler.cpp + physicsserver/contactjointhandler_c.cpp + physicsserver/odeobject.cpp + physicsserver/odeobject_c.cpp + physicsserver/physicsserver.cpp + physicsserver/physicsserver_c.cpp + physicsserver/planecollider.cpp + physicsserver/planecollider_c.cpp + physicsserver/raycollider.cpp + physicsserver/raycollider_c.cpp + physicsserver/recorderhandler.cpp + physicsserver/recorderhandler_c.cpp + physicsserver/space.cpp + physicsserver/space_c.cpp + physicsserver/spherecollider.cpp + physicsserver/spherecollider_c.cpp + physicsserver/world.cpp + physicsserver/world_c.cpp + physicsserver/dragcontroller.cpp + physicsserver/dragcontroller_c.cpp + physicsserver/velocitycontroller.cpp + physicsserver/velocitycontroller_c.cpp + physicsserver/joint.cpp + physicsserver/joint_c.cpp + physicsserver/balljoint.cpp + physicsserver/balljoint_c.cpp + physicsserver/hingejoint.cpp + physicsserver/hingejoint_c.cpp + physicsserver/fixedjoint.cpp + physicsserver/fixedjoint_c.cpp + physicsserver/sliderjoint.cpp + physicsserver/sliderjoint_c.cpp + physicsserver/universaljoint.cpp + physicsserver/universaljoint_c.cpp + physicsserver/hinge2joint.cpp + physicsserver/hinge2joint_c.cpp + physicsserver/angularmotor.cpp + physicsserver/angularmotor_c.cpp + sceneserver/basenode.cpp + sceneserver/basenode_c.cpp + sceneserver/fpscontroller.cpp + sceneserver/fpscontroller_c.cpp + sceneserver/scene.cpp + sceneserver/scene_c.cpp + sceneserver/sceneserver.cpp + sceneserver/sceneserver_c.cpp + sceneserver/sceneimporter_c.cpp + sceneserver/transform.cpp + sceneserver/transform_c.cpp + sceneserver/camera.cpp + sceneserver/camera_c.cpp + sceneserver/scenedict.cpp + simulationserver/simulationserver.cpp + simulationserver/simulationserver_c.cpp + simulationserver/simcontrolnode.cpp + simulationserver/simcontrolnode_c.cpp + simulationserver/agentcontrol.cpp + simulationserver/agentcontrol_c.cpp + simulationserver/monitorcontrol.cpp + simulationserver/monitorcontrol_c.cpp + simulationserver/monitorlogger.cpp + simulationserver/monitorlogger_c.cpp + simulationserver/netcontrol.cpp + simulationserver/netcontrol_c.cpp + simulationserver/netclient.cpp + simulationserver/netclient_c.cpp + simulationserver/netmessage.cpp + simulationserver/netmessage_c.cpp + simulationserver/netbuffer.cpp + simulationserver/traincontrol.cpp + simulationserver/traincontrol_c.cpp + geometryserver/geometryserver.h + geometryserver/geometryserver.cpp + geometryserver/geometryserver_c.cpp + geometryserver/meshexporter_c.cpp + geometryserver/meshimporter.cpp + geometryserver/meshimporter_c.cpp + geometryserver/stdmeshimporter.cpp + geometryserver/stdmeshimporter_c.cpp + geometryserver/trimesh.cpp + geometryserver/indexbuffer.cpp + monitorserver/monitorserver.cpp + monitorserver/monitorserver_c.cpp + monitorserver/monitorsystem.cpp + monitorserver/monitorsystem_c.cpp + monitorserver/monitoritem_c.cpp + monitorserver/custommonitor.cpp + monitorserver/custommonitor_c.cpp + monitorserver/monitorcmdparser.cpp + monitorserver/monitorcmdparser_c.cpp +) +if(SPADES_FOUND) + set(oxygen_LIB_SRCS + ${oxygen_LIB_SRCS} + spadesserver/spadesserver.cpp + spadesserver/spadesserver_c.cpp + spadesserver/paramreader.cpp + spadesserver/paramreader_c.cpp + spadesserver/paramstorer.cpp + spadesserver/spadescreatesenseevent.cpp + spadesserver/spadesactevent.c + ) +endif(SPADES_FOUND) + +include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility/) + +########### next target ############### + +add_library(oxygen SHARED ${oxygen_LIB_SRCS}) + +target_link_libraries(oxygen rcssnet3D ${Boost_LIBRARIES} ${ODE_LIBRARY}) + +set_target_properties(oxygen PROPERTIES VERSION ${OXYGEN_VERSION} + SOVERSION ${OXYGEN_SO_VERSION} DEBUG_POSTFIX _debug) +install(TARGETS oxygen DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/oxygen-config.in + ${CMAKE_CURRENT_BINARY_DIR}/oxygen-config) + +########### install files ############### + +install(FILES oxygen.rb DESTINATION ${DATADIR}/${CMAKE_PROJECT_NAME}) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/oxygen-config DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) +install(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/oxygen + FILES_MATCHING PATTERN "*.h") + + +#original Makefile.am contents follow: + +#if DEBUG +#liboxygen_debug_la_CXXFLAGS = -O -g -W -Wall -Woverloaded-virtual -Wno-deprecated +#else +#liboxygen_la_CXXFLAGS = -O2 -Wno-deprecated +#liboxygen_la_LIBADD = -lode $(spades_libs) @BOOST_THREADS_LIB@ +# + +#nobase_libpkginclude_HEADERS = \ +#agentaspect/agentaspect.h \ +#agentaspect/effector.h \ +#agentaspect/jointeffector.h \ +#agentaspect/jointperceptor.h \ +#agentaspect/perceptor.h \ +#agentaspect/createaction.h \ +#controlaspect/controlaspect.h \ +#gamecontrolserver/predicate.h \ +#gamecontrolserver/gamecontrolserver.h \ +#gamecontrolserver/baseparser.h \ +#gamecontrolserver/actionobject.h \ +#gamecontrolserver/behavior.h \ +#oxygen.h \ +#physicsserver/body.h \ +#physicsserver/bodycontroller.h \ +#physicsserver/boxcollider.h \ +#physicsserver/ccylindercollider.h \ +#physicsserver/collider.h \ +#physicsserver/collisionhandler.h \ +#physicsserver/contactjointhandler.h \ +#physicsserver/odeobject.h \ +#physicsserver/odewrapper.h \ +#physicsserver/physicsserver.h \ +#physicsserver/planecollider.h \ +#physicsserver/raycollider.h \ +#physicsserver/recorderhandler.h \ +#physicsserver/space.h \ +#physicsserver/spherecollider.h \ +#physicsserver/transformcollider.h \ +#physicsserver/world.h \ +#physicsserver/dragcontroller.h \ +#physicsserver/velocitycontroller.h \ +#physicsserver/joint.h \ +#physicsserver/balljoint.h \ +#physicsserver/hingejoint.h \ +#physicsserver/fixedjoint.h \ +#physicsserver/sliderjoint.h \ +#physicsserver/universaljoint.h \ +#physicsserver/hinge2joint.h \ +#physicsserver/angularmotor.h \ +#sceneserver/sceneimporter.h \ +#sceneserver/basenode.h \ +#sceneserver/fpscontroller.h \ +#sceneserver/scene.h \ +#sceneserver/sceneserver.h \ +#sceneserver/sceneimporter.h \ +#sceneserver/transform.h \ +#sceneserver/camera.h \ +#sceneserver/scenedict.h \ +#simulationserver/simulationserver.h \ +#simulationserver/simcontrolnode.h \ +#simulationserver/agentcontrol.h \ +#simulationserver/monitorcontrol.h \ +#simulationserver/monitorlogger.h \ +#simulationserver/netcontrol.h \ +#simulationserver/netclient.h \ +#simulationserver/netmessage.h \ +#simulationserver/netbuffer.h \ +#simulationserver/traincontrol.h \ +#geometryserver/geometryserver.h \ +#geometryserver/meshexporter.h \ +#geometryserver/meshimporter.h \ +#geometryserver/stdmeshimporter.h \ +#geometryserver/trimesh.h \ +#geometryserver/indexbuffer.h \ +#monitorserver/monitorserver.h \ +#monitorserver/monitorsystem.h \ +#monitorserver/monitoritem.h \ +#monitorserver/custommonitor.h \ +#monitorserver/monitorcmdparser.h \ +#$(spades_headers) +# Property changes on: trunk/spark/lib/oxygen/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/lib/salt/CMakeLists.txt =================================================================== --- trunk/spark/lib/salt/CMakeLists.txt (rev 0) +++ trunk/spark/lib/salt/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,52 @@ +set(salt_LIB_SRCS + bounds.cpp + fileclasses.cpp + frustum.cpp + matrix.cpp + path.cpp + plane.cpp + sharedlibrary.cpp +) + +########### target ############### + +add_library(salt SHARED ${salt_LIB_SRCS}) + +target_link_libraries(salt libobject) + +set_target_properties(salt PROPERTIES VERSION ${SALT_VERSION} + SOVERSION ${SALT_SO_VERSION} DEBUG_POSTFIX _debug) +install(TARGETS salt DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/salt-config.in + ${CMAKE_CURRENT_BINARY_DIR}/salt-config) + +########### install files ############### + +install(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/salt + FILES_MATCHING PATTERN "*.h") +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/salt-config DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) + +#original Makefile.am contents follow: + +#if DEBUG +#libsalt_debug_la_CXXFLAGS = -O -g -W -Wall +#libsalt_la_CXXFLAGS = -O2 +# +#libpkginclude_HEADERS = \ +#bounds.h \ +#fileclasses.h \ +#gmath.h \ +#path.h \ +#random.h \ +#salt.h \ +#tvector.h \ +#defines.h \ +#frustum.h \ +#matrix.h \ +#plane.h \ +#rect.h \ +#sharedlibrary.h \ +#vector.h Property changes on: trunk/spark/lib/salt/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/lib/zeitgeist/CMakeLists.txt =================================================================== --- trunk/spark/lib/zeitgeist/CMakeLists.txt (rev 0) +++ trunk/spark/lib/zeitgeist/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,79 @@ +set(zeitgeist_LIB_SRCS + class.cpp + class_c.cpp + core.cpp + corecontext.cpp + leaf.cpp + leaf_c.cpp + parameterlist.cpp + node.cpp + node_c.cpp + object.cpp + object_c.cpp + zeitgeist.cpp + fileserver/fileserver.cpp + fileserver/fileserver_c.cpp + fileserver/filesystem_c.cpp + logserver/logserver.cpp + logserver/logserver_c.cpp + logserver/logserverstreambuf.cpp + randomserver/randomserver.cpp + randomserver/randomserver_c.cpp + scriptserver/gcvalue.cpp + scriptserver/rubywrapper.cpp + scriptserver/scriptserver.cpp + scriptserver/scriptserver_c.cpp + #telnetserver/telnetdaemon.cpp + #telnetserver/telnetserver.cpp + #telnetserver/telnetserver_c.cpp + #telnetserver/telnetsession.c +) + +include_directories(${CMAKE_SOURCE_DIR}/lib ${RUBY_INCLUDE_PATH}) + +########### target ############### +add_library(zeitgeist SHARED ${zeitgeist_LIB_SRCS}) + +target_link_libraries(zeitgeist ${RUBY_LIBRARY}) + +set_target_properties(zeitgeist PROPERTIES VERSION ${ZEITGEIST_VERSION} + SOVERSION ${ZEITGEIST_SO_VERSION} DEBUG_POSTFIX _debug) +install(TARGETS zeitgeist DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zeitgeist-config.in + ${CMAKE_CURRENT_BINARY_DIR}/zeitgeist-config) + +########### install files ############### + +install(FILES zeitgeist.rb DESTINATION ${DATADIR}/${CMAKE_PROJECT_NAME}) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/zeitgeist-config + DESTINATION ${BINDIR} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) +install(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/zeitgeist + FILES_MATCHING PATTERN "*.h") + + +#original Makefile.am contents follow: + +#nobase_libpkginclude_HEADERS = \ +#class.h \ +#core.h \ +#corecontext.h \ +#leaf.h \ +#parameterlist.h \ +#node.h \ +#object.h \ +#object_c.h \ +#zeitgeist.h \ +#fileserver/fileserver.h \ +#fileserver/filesystem.h \ +#logserver/logserver.h \ +#logserver/logserverstreambuf.h \ +#randomserver/randomserver.h \ +#scriptserver/gcvalue.h \ +#scriptserver/scriptserver.h \ +#scriptserver/rubywrapper.h +# +##telnetserver/telnetdaemon.h \ +##telnetserver/telnetserver.h \ +##telnetserver/telnetsession.h Property changes on: trunk/spark/lib/zeitgeist/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/CMakeLists.txt =================================================================== --- trunk/spark/plugin/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,20 @@ +include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility) + +add_subdirectory(filesystemstd) +add_subdirectory(filesystemzip) +add_subdirectory(forceeffector) +add_subdirectory(gyrorateperceptor) +add_subdirectory(inputsdl) +add_subdirectory(objimporter) +add_subdirectory(openglsyssdl) +add_subdirectory(perfectvisionperceptor) +add_subdirectory(collisionperceptor) +add_subdirectory(sexpparser) +add_subdirectory(rosimporter) +add_subdirectory(rubysceneimporter) +add_subdirectory(sparkmonitor) +add_subdirectory(sparkagent) +add_subdirectory(sceneeffector) +add_subdirectory(soundsystemfmod) +add_subdirectory(inputwx) +add_subdirectory(openglsyswx) Property changes on: trunk/spark/plugin/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/collisionperceptor/CMakeLists.txt =================================================================== --- trunk/spark/plugin/collisionperceptor/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/collisionperceptor/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,28 @@ + +########### next target ############### + +set(collisionperceptor_LIB_SRCS + export.cpp + collisionperceptor.h + collisionperceptor.cpp + collisionperceptor_c.cpp + perceptorhandler.h + perceptorhandler.cpp + perceptorhandler_c.cpp + touchperceptor.h + touchperceptor.cpp + touchperceptor_c.cpp + touchperceptorhandler.h + touchperceptorhandler.cpp + touchperceptorhandler_c.cpp + forceresistanceperceptor.h + forceresistanceperceptor.cpp + forceresistanceperceptor_c.cpp +) + +add_library(collisionperceptor MODULE ${collisionperceptor_LIB_SRCS}) + +target_link_libraries(collisionperceptor) + +set_target_properties(collisionperceptor PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS collisionperceptor DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/collisionperceptor/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/filesystemrar/CMakeLists.txt =================================================================== --- trunk/spark/plugin/filesystemrar/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/filesystemrar/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,16 @@ + +########### next target ############### + +set(filesystemrar_LIB_SRCS + export.cpp + filesystemrar.cpp + filesystemrar.h + filesystemrar_c.cpp +) + +add_library(filesystemrar MODULE ${filesystemrar_LIB_SRCS}) + +target_link_libraries(filesystemrar) + +set_target_properties(filesystemrar PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS filesystemrar DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/filesystemrar/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/filesystemstd/CMakeLists.txt =================================================================== --- trunk/spark/plugin/filesystemstd/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/filesystemstd/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,16 @@ + +########### next target ############### + +set(filesystemstd_LIB_SRCS + export.cpp + filesystemstd.cpp + filesystemstd.h + filesystemstd_c.cpp +) + +add_library(filesystemstd MODULE ${filesystemstd_LIB_SRCS}) + +target_link_libraries(filesystemstd) + +set_target_properties(filesystemstd PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS filesystemstd DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/filesystemstd/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/filesystemzip/CMakeLists.txt =================================================================== --- trunk/spark/plugin/filesystemzip/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/filesystemzip/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,18 @@ + +########### next target ############### + +set(filesystemzip_LIB_SRCS + export.cpp + filesystemzip.cpp + filesystemzip.h + filesystemzip_c.cpp +) + +if (Boost_REGEX_FOUND) + add_library(filesystemzip MODULE ${filesystemzip_LIB_SRCS}) + + target_link_libraries(filesystemzip ${Boost_REGEX_LIBRARY}) + + set_target_properties(filesystemzip PROPERTIES VERSION 0.0.0 SOVERSION 0) + install(TARGETS filesystemzip DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) +endif (Boost_REGEX_FOUND) Property changes on: trunk/spark/plugin/filesystemzip/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/forceeffector/CMakeLists.txt =================================================================== --- trunk/spark/plugin/forceeffector/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/forceeffector/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,17 @@ + +########### next target ############### + +set(forceeffector_LIB_SRCS + export.cpp + forceeffector.cpp + forceeffector.h + forceeffector_c.cpp + forceaction.h +) + +add_library(forceeffector MODULE ${forceeffector_LIB_SRCS}) + +target_link_libraries(forceeffector) + +set_target_properties(forceeffector PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS forceeffector DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/forceeffector/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/gyrorateperceptor/CMakeLists.txt =================================================================== --- trunk/spark/plugin/gyrorateperceptor/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/gyrorateperceptor/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,16 @@ + +########### next target ############### + +set(gyrorateperceptor_LIB_SRCS + export.cpp + gyrorateperceptor.h + gyrorateperceptor.cpp + gyrorateperceptor_c.cpp +) + +add_library(gyrorateperceptor MODULE ${gyrorateperceptor_LIB_SRCS}) + +target_link_libraries(gyrorateperceptor) + +set_target_properties(gyrorateperceptor PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS gyrorateperceptor DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/gyrorateperceptor/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/inputsdl/CMakeLists.txt =================================================================== --- trunk/spark/plugin/inputsdl/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/inputsdl/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,30 @@ + +########### next target ############### + +set(inputsdl_LIB_SRCS + export.cpp + inputdevicesdl.h + inputdevicesdl_c.cpp + inputsystemsdl.cpp + inputsystemsdl.h + inputsystemsdl_c.cpp + keyboardsdl.cpp + keyboardsdl.h + keyboardsdl_c.cpp + mousesdl.cpp + mousesdl.h + mousesdl_c.cpp + timersdl.cpp + timersdl.h + timersdl_c.cpp +) + +include_directories(${SDL_INCLUDE_DIR}) + +add_library(inputsdl MODULE ${inputsdl_LIB_SRCS}) + +target_link_libraries(inputsdl) + +set_target_properties(inputsdl PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS inputsdl DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) + Property changes on: trunk/spark/plugin/inputsdl/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/inputwx/CMakeLists.txt =================================================================== --- trunk/spark/plugin/inputwx/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/inputwx/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,23 @@ + +########### next target ############### + +if (wxWidgets_FOUND) + set(inputwx_LIB_SRCS + export.cpp + inputsystemwx.h + inputsystemwx.cpp + inputsystemwx_c.cpp + inputwx.h + inputwx.cpp + ) + + include_directories(${wxWidgets_INCLUDE_DIRS}) + add_definitions(${wxWidgets_DEFINITIONS}) + add_library(inputwx MODULE ${inputwx_LIB_SRCS}) + + target_link_libraries(inputwx) + + set_target_properties(inputwx PROPERTIES COMPILE_FLAGS ${wxWidgets_CXX_FLAGS}) + set_target_properties(inputwx PROPERTIES VERSION 0.0.0 SOVERSION 0) + install(TARGETS inputwx DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) +endif (wxWidgets_FOUND) Property changes on: trunk/spark/plugin/inputwx/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/objimporter/CMakeLists.txt =================================================================== --- trunk/spark/plugin/objimporter/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/objimporter/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,16 @@ + +########### next target ############### + +set(objimporter_LIB_SRCS + export.cpp + objimporter.cpp + objimporter_c.cpp + objimporter.h +) + +add_library(objimporter MODULE ${objimporter_LIB_SRCS}) + +target_link_libraries(objimporter) + +set_target_properties(objimporter PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS objimporter DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/objimporter/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/openglsyssdl/CMakeLists.txt =================================================================== --- trunk/spark/plugin/openglsyssdl/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/openglsyssdl/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,16 @@ + +########### next target ############### + +set(openglsyssdl_LIB_SRCS + export.cpp + openglsystemsdl.cpp + openglsystemsdl.h + openglsystemsdl_c.cpp +) + +add_library(openglsyssdl MODULE ${openglsyssdl_LIB_SRCS}) + +target_link_libraries(openglsyssdl) + +set_target_properties(openglsyssdl PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS openglsyssdl DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/openglsyssdl/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/openglsyswx/CMakeLists.txt =================================================================== --- trunk/spark/plugin/openglsyswx/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/openglsyswx/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,22 @@ + +########### next target ############### + +if (wxWidgets_FOUND) + set(openglsyswx_LIB_SRCS + export.cpp + openglsystemwx.cpp + openglsystemwx.h + openglsystemwx_c.cpp + ) + + include_directories(${wxWidgets_INCLUDE_DIRS}) + add_definitions(${wxWidgets_DEFINITIONS}) + add_library(openglsyswx MODULE ${openglsyswx_LIB_SRCS}) + + target_link_libraries(openglsyswx) + + set_target_properties(openglsyswx PROPERTIES VERSION 0.0.0 SOVERSION 0) + set_target_properties(inputwx PROPERTIES COMPILE_FLAGS ${wxWidgets_CXX_FLAGS}) + + install(TARGETS openglsyswx DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) +endif (wxWidgets_FOUND) Property changes on: trunk/spark/plugin/openglsyswx/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/perfectvisionperceptor/CMakeLists.txt =================================================================== --- trunk/spark/plugin/perfectvisionperceptor/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/perfectvisionperceptor/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,17 @@ + +########### next target ############### + +set(perfectvisionperceptor_LIB_SRCS + export.cpp + perfectvisionperceptor.h + perfectvisionperceptor.cpp + perfectvisionperceptor_c.cpp +) + +add_library(perfectvisionperceptor MODULE ${perfectvisionperceptor_LIB_SRCS}) + +target_link_libraries(perfectvisionperceptor) + +set_target_properties(perfectvisionperceptor PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS perfectvisionperceptor DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) + Property changes on: trunk/spark/plugin/perfectvisionperceptor/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/rosimporter/CMakeLists.txt =================================================================== --- trunk/spark/plugin/rosimporter/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/rosimporter/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,17 @@ +########### next target ############### + +set(rosimporter_LIB_SRCS + export.cpp + roselements.cpp + roselements.h + rosimporter.cpp + rosimporter.h + rosimporter_c.cpp +) + +add_library(rosimporter MODULE ${rosimporter_LIB_SRCS}) + +target_link_libraries(rosimporter tinyxml_ex) + +set_target_properties(rosimporter PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS rosimporter DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/rosimporter/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/rubysceneimporter/CMakeLists.txt =================================================================== --- trunk/spark/plugin/rubysceneimporter/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/rubysceneimporter/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,15 @@ +########### next target ############### + +set(rubysceneimporter_LIB_SRCS + export.cpp + rubysceneimporter.cpp + rubysceneimporter.h + rubysceneimporter_c.cpp +) + +add_library(rubysceneimporter MODULE ${rubysceneimporter_LIB_SRCS}) + +target_link_libraries(rubysceneimporter sexp) + +set_target_properties(rubysceneimporter PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS rubysceneimporter DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/rubysceneimporter/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/sceneeffector/CMakeLists.txt =================================================================== --- trunk/spark/plugin/sceneeffector/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/sceneeffector/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,17 @@ + +########### next target ############### + +set(sceneeffector_LIB_SRCS + export.cpp + sceneeffector.cpp + sceneeffector.h + sceneeffector_c.cpp + sceneaction.h +) + +add_library(sceneeffector MODULE ${sceneeffector_LIB_SRCS}) + +target_link_libraries(sceneeffector) + +set_target_properties(sceneeffector PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS sceneeffector DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/sceneeffector/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/sexpparser/CMakeLists.txt =================================================================== --- trunk/spark/plugin/sexpparser/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/sexpparser/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,15 @@ +########### next target ############### + +set(sexpparser_LIB_SRCS + export.cpp + sexpparser.cpp + sexpparser_c.cpp + sexpparser.h +) + +add_library(sexpparser MODULE ${sexpparser_LIB_SRCS}) + +target_link_libraries(sexpparser sexp) + +set_target_properties(sexpparser PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS sexpparser DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/sexpparser/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/soundsystembass/CMakeLists.txt =================================================================== --- trunk/spark/plugin/soundsystembass/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/soundsystembass/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,22 @@ + +########### next target ############### + +set(soundsystembass_LIB_SRCS + export.cpp + soundeffectbass.cpp + soundeffectbass.h + soundmodulebass.cpp + soundmodulebass.h + soundstreambass.cpp + soundstreambass.h + soundsystembass.cpp + soundsystembass.h + soundsystembass_c.cpp +) + +add_library(soundsystembass MODULE ${soundsystembass_LIB_SRCS}) + +target_link_libraries(soundsystembass) + +set_target_properties(soundsystembass PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS soundsystembass DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/soundsystembass/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/soundsystemfmod/CMakeLists.txt =================================================================== --- trunk/spark/plugin/soundsystemfmod/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/soundsystemfmod/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,24 @@ + +########### next target ############### + +set(soundsystemfmod_LIB_SRCS + export.cpp + soundeffectfmod.cpp + soundeffectfmod.h + soundmodulefmod.cpp + soundmodulefmod.h + soundstreamfmod.cpp + soundstreamfmod.h + soundsystemfmod.cpp + soundsystemfmod.h + soundsystemfmod_c.cpp +) + +if (FMOD_FOUND) + add_library(soundsystemfmod MODULE ${soundsystemfmod_LIB_SRCS}) + + target_link_libraries(soundsystemfmod fmod) + + set_target_properties(soundsystemfmod PROPERTIES VERSION 0.0.0 SOVERSION 0) + install(TARGETS soundsystemfmod DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) +endif (FMOD_FOUND) Property changes on: trunk/spark/plugin/soundsystemfmod/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/sparkagent/CMakeLists.txt =================================================================== --- trunk/spark/plugin/sparkagent/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/sparkagent/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,37 @@ + +########### next target ############### + +set(sparkagent_LIB_SRCS + hinge2action.h + hinge2perceptor.h + hinge2perceptor.cpp + hinge2perceptor_c.cpp + hinge2effector.h + hinge2effector.cpp + hinge2effector_c.cpp + timeperceptor.h + timeperceptor.cpp + timeperceptor_c.cpp + export.cpp + hingeaction.h + hingeeffector.h + hingeeffector.cpp + hingeeffector_c.cpp + hingeperceptor.h + hingeperceptor.cpp + hingeperceptor_c.cpp + universaljointaction.h + universaljointeffector.h + universaljointeffector.cpp + universaljointeffector_c.cpp + universaljointperceptor.h + universaljointperceptor.cpp + universaljointperceptor_c.cpp +) + +add_library(sparkagent MODULE ${sparkagent_LIB_SRCS}) + +target_link_libraries(sparkagent) + +set_target_properties(sparkagent PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS sparkagent DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/sparkagent/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/plugin/sparkmonitor/CMakeLists.txt =================================================================== --- trunk/spark/plugin/sparkmonitor/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/sparkmonitor/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,21 @@ +########### next target ############### + +set(sparkmonitor_LIB_SRCS + export.cpp + sparkmonitor.cpp + sparkmonitor_c.cpp + sparkmonitor.h + sparkmonitorclient.h + sparkmonitorclient.cpp + sparkmonitorclient_c.cpp + sparkmonitorlogfileserver.h + sparkmonitorlogfileserver.cpp + sparkmonitorlogfileserver_c.cpp +) + +add_library(sparkmonitor MODULE ${sparkmonitor_LIB_SRCS}) + +target_link_libraries(sparkmonitor sexp) + +set_target_properties(sparkmonitor PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS sparkmonitor DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Property changes on: trunk/spark/plugin/sparkmonitor/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/spark/CMakeLists.txt =================================================================== --- trunk/spark/spark/CMakeLists.txt (rev 0) +++ trunk/spark/spark/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,42 @@ +########### next target ############### + +set(spark_LIB_SRCS + spark.cpp +) + +include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility + ${FREETYPE_INCLUDE_DIRS}) + +add_library(spark SHARED ${spark_LIB_SRCS}) + +target_link_libraries(spark) + +set_target_properties(spark PROPERTIES VERSION ${SPARK_VERSION} + SOVERSION ${SPARK_SO_VERSION} DEBUG_POSTFIX _debug) +install(TARGETS spark DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/spark-config.in + ${CMAKE_CURRENT_BINARY_DIR}/spark-config) + +########### install files ############### + +install(FILES spark.rb DESTINATION ${DATADIR}/${CMAKE_PROJECT_NAME}) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/spark-config DESTINATION ${BINDIR} + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ + GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) +install(FILES spark.h DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/spark) + + + +#original Makefile.am contents follow: + +#libspark_debug_la_CXXFLAGS = -O -g -W -Wall +#libspark_la_LIBADD = @FREETYPE_LIBADD@ @SDL_LIBADD@ @IL_LIBADD@ @GL_LIBADD@ +#bin_SCRIPTS = spark-config +# +#AM_CPPFLAGS = -I${top_srcdir}/lib -I${top_srcdir}/utility \ +# @FREETYPE_CPPFLAGS@ @RUBY_CPPFLAGS@ @SDL_CPPFLAGS@ +# +# +#nobase_libpkginclude_HEADERS = \ +#spark.h Property changes on: trunk/spark/spark/CMakeLists.txt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/spark/sparkconfig.h.cmake =================================================================== --- trunk/spark/sparkconfig.h.cmake (rev 0) +++ trunk/spark/sparkconfig.h.cmake 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,37 @@ +#cmakedefine HAVE_NETDB_H 1 + +#cmakedefine HAVE_RESOLV_H 1 + +#cmakedefine HAVE_SYS_SOCKET_H 1 + +#cmakedefine HAVE_NETINET_IN_H 1 + +#cmakedefine HAVE_WINSOCK2_H 1 + +#cmakedefine HAVE_ARPA_NAMESER_H 1 + +#cmakedefine HAVE_ARPA_INET_H 1 + +#cmakedefine HAVE_SOCKLEN_T 1 + +#ifndef HAVE_STRING_H +#cmakedefine HAVE_STRING_H 1 +#endif + +#ifndef HAVE_UNISTD_H +#cmakedefine HAVE_UNISTD_H 1 +#endif + +#cmakedefine HAVE_POLL_H 1 + +#cmakedefine HAVE_EXECINFO_H 1 + +#cmakedefine HAVE_IL_IL_H 1 + +#cmakedefine HAVE_COREFOUNDATION_COREFOUNDATION_H 1 + +#cmakedefine HAVE_STRUPR 1 + +#cmakedefine HAVE_KEROSIN_KEROSIN_H 1 + +#define PACKAGE_NAME "${CMAKE_PROJECT_NAME}" Added: trunk/spark/test/CMakeLists.txt =================================================================== --- trunk/spark/test/CMakeLists.txt (rev 0) +++ trunk/spark/test/CMakeLists.txt 2008-11-30 21:56:52 UTC (rev 16) @@ -0,0 +1,7 @@ +include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility) + +add_subdirectory(coretest) +add_subdirectory(fonttest) +add_subdirectory(inputtest) +add_subdirectory(scenet... [truncated message content] |
From: <he...@us...> - 2008-12-19 18:14:31
|
Revision: 19 http://simspark.svn.sourceforge.net/simspark/?rev=19&view=rev Author: hedayat Date: 2008-12-19 18:12:56 +0000 (Fri, 19 Dec 2008) Log Message: ----------- Replaced make_shared() function calls with .lock() function call. Fixed compilation problem with recent boost versions. Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/agentaspect/effector.cpp trunk/spark/lib/oxygen/agentaspect/jointeffector.h trunk/spark/lib/oxygen/agentaspect/jointperceptor.h trunk/spark/lib/oxygen/physicsserver/body.cpp trunk/spark/lib/oxygen/physicsserver/bodycontroller.cpp trunk/spark/lib/oxygen/physicsserver/collider.cpp trunk/spark/lib/oxygen/physicsserver/collisionhandler.cpp trunk/spark/lib/oxygen/physicsserver/joint.cpp trunk/spark/lib/oxygen/sceneserver/basenode.cpp trunk/spark/lib/oxygen/sceneserver/fpscontroller.cpp trunk/spark/lib/oxygen/sceneserver/sceneserver.cpp trunk/spark/lib/oxygen/sceneserver/transform.cpp trunk/spark/lib/oxygen/simulationserver/simcontrolnode.cpp trunk/spark/lib/zeitgeist/class.cpp trunk/spark/lib/zeitgeist/core.cpp trunk/spark/lib/zeitgeist/leaf.cpp trunk/spark/lib/zeitgeist/leaf.h trunk/spark/lib/zeitgeist/node.cpp trunk/spark/lib/zeitgeist/node.h trunk/spark/plugin/forceeffector/forceeffector.cpp trunk/spark/plugin/perfectvisionperceptor/perfectvisionperceptor.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/ChangeLog 2008-12-19 18:12:56 UTC (rev 19) @@ -1,3 +1,28 @@ +2008-12-19 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/agentaspect/effector.cpp: + * lib/oxygen/agentaspect/jointeffector.h: + * lib/oxygen/agentaspect/jointperceptor.h: + * lib/oxygen/physicsserver/bodycontroller.cpp: + * lib/oxygen/physicsserver/collider.cpp: + * lib/oxygen/physicsserver/collisionhandler.cpp: + * lib/oxygen/physicsserver/joint.cpp: + * lib/oxygen/sceneserver/basenode.cpp: + * lib/oxygen/sceneserver/fpscontroller.cpp: + * lib/oxygen/simulationserver/simcontrolnode.cpp: + * lib/oxygen/sceneserver/transform.cpp: + * lib/oxygen/sceneserver/sceneserver.cpp: + * lib/oxygen/physicsserver/body.cpp: + * lib/zeitgeist/class.cpp: + * lib/zeitgeist/core.cpp: + * lib/zeitgeist/leaf.cpp: + * lib/zeitgeist/leaf.h: + * lib/zeitgeist/node.cpp: + * lib/zeitgeist/node.h: + * plugin/forceeffector/forceeffector.cpp: + * plugin/perfectvisionperceptor/perfectvisionperceptor.cpp: + - Replaced make_shared() with .lock() function call. + 2008-12-02 Hedayat Vatankhah <he...@gr...> * utility/libobj/CMakeLists.txt: Modified: trunk/spark/lib/oxygen/agentaspect/effector.cpp =================================================================== --- trunk/spark/lib/oxygen/agentaspect/effector.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/oxygen/agentaspect/effector.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -30,7 +30,7 @@ Effector::GetAgentAspect() { return shared_static_cast<AgentAspect> - (make_shared(GetParentSupportingClass("AgentAspect"))); + (GetParentSupportingClass("AgentAspect").lock()); } bool Effector::Realize(boost::shared_ptr<ActionObject> action) Modified: trunk/spark/lib/oxygen/agentaspect/jointeffector.h =================================================================== --- trunk/spark/lib/oxygen/agentaspect/jointeffector.h 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/oxygen/agentaspect/jointeffector.h 2008-12-19 18:12:56 UTC (rev 19) @@ -42,7 +42,7 @@ virtual void UpdateCached() { Effector::UpdateCached(); - mJoint = make_shared(FindParentSupportingClass<_JOINT>()); + mJoint = FindParentSupportingClass<_JOINT>().lock(); if (mJoint.get() == 0) { Modified: trunk/spark/lib/oxygen/agentaspect/jointperceptor.h =================================================================== --- trunk/spark/lib/oxygen/agentaspect/jointperceptor.h 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/oxygen/agentaspect/jointperceptor.h 2008-12-19 18:12:56 UTC (rev 19) @@ -40,7 +40,7 @@ virtual void UpdateCached() { Perceptor::UpdateCached(); - mJoint = make_shared(FindParentSupportingClass<_JOINT>()); + mJoint = FindParentSupportingClass<_JOINT>().lock(); if (mJoint.get() == 0) { Modified: trunk/spark/lib/oxygen/physicsserver/body.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/body.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/oxygen/physicsserver/body.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -126,7 +126,7 @@ dBodySetData(mODEBody, this); shared_ptr<BaseNode> baseNode = shared_static_cast<BaseNode> - (make_shared(GetParent())); + (GetParent().lock()); const Matrix& mat = baseNode->GetWorldTransform(); SetRotation(mat); @@ -425,7 +425,7 @@ const dReal* rot = dBodyGetRotation(mODEBody); shared_ptr<BaseNode> baseNode = shared_static_cast<BaseNode> - (make_shared(GetParent())); + (GetParent().lock()); Matrix mat; @@ -513,7 +513,7 @@ } shared_ptr<Body> body = shared_static_cast<Body> - (make_shared(bodyPtr->GetSelf())); + (bodyPtr->GetSelf().lock()); if (body.get() == 0) { Modified: trunk/spark/lib/oxygen/physicsserver/bodycontroller.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/bodycontroller.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/oxygen/physicsserver/bodycontroller.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -43,7 +43,7 @@ mBody.reset(); mBody = shared_dynamic_cast<Body> - (make_shared(GetParentSupportingClass("Body"))); + (GetParentSupportingClass("Body").lock()); if (mBody.get() == 0) { Modified: trunk/spark/lib/oxygen/physicsserver/collider.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/collider.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/oxygen/physicsserver/collider.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -194,7 +194,7 @@ } shared_ptr<Collider> collider = shared_static_cast<Collider> - (make_shared(collPtr->GetSelf())); + (collPtr->GetSelf().lock()); if (collider.get() == 0) { Modified: trunk/spark/lib/oxygen/physicsserver/collisionhandler.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/collisionhandler.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/oxygen/physicsserver/collisionhandler.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -69,7 +69,7 @@ << "(CollisionHandler) found no Space node\n"; } - mCollider = shared_static_cast<Collider>(make_shared(GetParent())); + mCollider = shared_static_cast<Collider>(GetParent().lock()); if (mCollider.get() == 0) { GetLog()->Debug() Modified: trunk/spark/lib/oxygen/physicsserver/joint.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/joint.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/oxygen/physicsserver/joint.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -66,7 +66,7 @@ } shared_ptr<Joint> joint = shared_static_cast<Joint> - (make_shared(jointPtr->GetSelf())); + (jointPtr->GetSelf().lock()); if (joint.get() == 0) { @@ -126,7 +126,7 @@ } shared_ptr<Leaf> mySelf = shared_static_cast<Leaf> - (make_shared(GetSelf())); + (GetSelf().lock()); shared_ptr<Leaf> leaf = GetCore()->Get(path,mySelf); Modified: trunk/spark/lib/oxygen/sceneserver/basenode.cpp =================================================================== --- trunk/spark/lib/oxygen/sceneserver/basenode.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/oxygen/sceneserver/basenode.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -153,7 +153,7 @@ } // move up the hierarchy until we find a scene node - return make_shared(FindParentSupportingClass<Scene>()); + return FindParentSupportingClass<Scene>().lock(); } void BaseNode::EnableDebugMode() Modified: trunk/spark/lib/oxygen/sceneserver/fpscontroller.cpp =================================================================== --- trunk/spark/lib/oxygen/sceneserver/fpscontroller.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/oxygen/sceneserver/fpscontroller.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -161,7 +161,7 @@ mBody->SetVelocity(velocity); shared_ptr<BaseNode> bodyParent = shared_static_cast<BaseNode> - (make_shared(mBody->GetParent())); + (mBody->GetParent().lock()); if (bodyParent.get() != 0) { Modified: trunk/spark/lib/oxygen/sceneserver/sceneserver.cpp =================================================================== --- trunk/spark/lib/oxygen/sceneserver/sceneserver.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/oxygen/sceneserver/sceneserver.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -297,7 +297,7 @@ void SceneServer::ReparentTransformChildren(shared_ptr<Transform> node) { shared_ptr<BaseNode> parent = - shared_dynamic_cast<BaseNode>(make_shared(node->GetParent())); + shared_dynamic_cast<BaseNode>(node->GetParent().lock()); // while not empty while (node->begin() != node->end()) Modified: trunk/spark/lib/oxygen/sceneserver/transform.cpp =================================================================== --- trunk/spark/lib/oxygen/sceneserver/transform.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/oxygen/sceneserver/transform.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -66,7 +66,7 @@ void Transform::SetWorldTransform(const salt::Matrix &transform) { shared_ptr<BaseNode> parent = shared_static_cast<BaseNode> - (make_shared(mParent)); + (mParent.lock()); if (parent.get() == 0) { @@ -122,7 +122,7 @@ void Transform::UpdateHierarchyInternal() { - shared_ptr<BaseNode> parent = shared_static_cast<BaseNode>(make_shared(mParent)); + shared_ptr<BaseNode> parent = shared_static_cast<BaseNode>(mParent.lock()); // no parent, return local transform if (parent.get() == NULL) Modified: trunk/spark/lib/oxygen/simulationserver/simcontrolnode.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/simcontrolnode.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/oxygen/simulationserver/simcontrolnode.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -40,7 +40,7 @@ shared_ptr<SimulationServer> SimControlNode::GetSimulationServer() { return shared_static_cast<SimulationServer> - (make_shared(GetParent())); + (GetParent().lock()); } void SimControlNode::SetSimTime( float now ) Modified: trunk/spark/lib/zeitgeist/class.cpp =================================================================== --- trunk/spark/lib/zeitgeist/class.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/zeitgeist/class.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -62,7 +62,7 @@ if (obj.get()) { if (obj->Construct(obj, shared_static_cast<Class> - (make_shared(GetSelf()))) == true) + (GetSelf().lock())) == true) { // successfully constructed AttachInstance(obj); @@ -85,7 +85,7 @@ } - return make_shared(mCore); + return mCore.lock(); } void Class::AttachInstance(const boost::weak_ptr<Object> &instance) Modified: trunk/spark/lib/zeitgeist/core.cpp =================================================================== --- trunk/spark/lib/zeitgeist/core.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/zeitgeist/core.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -232,7 +232,7 @@ boost::shared_ptr<CoreContext> Core::CreateContext() { - return shared_ptr<CoreContext>(new CoreContext(make_shared(mSelf), GetRoot())); + return shared_ptr<CoreContext>(new CoreContext(mSelf.lock(), GetRoot())); } boost::shared_ptr<Object> Modified: trunk/spark/lib/zeitgeist/leaf.cpp =================================================================== --- trunk/spark/lib/zeitgeist/leaf.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/zeitgeist/leaf.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -51,13 +51,13 @@ { if (name.compare("..") == 0) { - return make_shared(GetParent()); + return GetParent().lock(); } if (name.compare(".") == 0) { - return shared_static_cast<Leaf>(make_shared(GetSelf())); + return shared_static_cast<Leaf>(GetSelf().lock()); } return boost::shared_ptr<Leaf>(); @@ -77,12 +77,12 @@ { if (name.compare("..") == 0) { - baseList.push_back(make_shared(GetParent())); + baseList.push_back(GetParent().lock()); } if (name.compare(".") == 0) { - baseList.push_back(shared_static_cast<Leaf>(make_shared(GetSelf()))); + baseList.push_back(shared_static_cast<Leaf>(GetSelf().lock())); } } @@ -98,7 +98,7 @@ Leaf::GetParentSupportingClass(const std::string &name) const { shared_ptr<Node> node - = shared_static_cast<Node>(make_shared(GetParent())); + = shared_static_cast<Node>(GetParent().lock()); while ( @@ -107,7 +107,7 @@ (! node->GetClass()->SupportsClass(name)) ) { - node = make_shared(node->GetParent()); + node = node->GetParent().lock(); } return weak_ptr<Node>(node); @@ -160,7 +160,7 @@ { if (p) { - shared_ptr<Leaf> blah = make_shared(GetParent()); + shared_ptr<Leaf> blah = GetParent().lock(); parentPath = blah->GetFullPath(); } } Modified: trunk/spark/lib/zeitgeist/leaf.h =================================================================== --- trunk/spark/lib/zeitgeist/leaf.h 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/zeitgeist/leaf.h 2008-12-19 18:12:56 UTC (rev 19) @@ -199,7 +199,7 @@ FindParentSupportingClass() const; // { // boost::shared_ptr<Node> node -// = boost::shared_static_cast<Node>(make_shared(GetParent())); +// = boost::shared_static_cast<Node>(GetParent().lock()); // while (node.get() != 0) // { @@ -211,7 +211,7 @@ // return test; // } -// node = boost::shared_static_cast<Node>(make_shared(node->GetParent())); +// node = boost::shared_static_cast<Node>(node->GetParent().lock()); // } // return boost::shared_ptr<CLASS>(); Modified: trunk/spark/lib/zeitgeist/node.cpp =================================================================== --- trunk/spark/lib/zeitgeist/node.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/zeitgeist/node.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -232,7 +232,7 @@ } mChildren.push_back(leaf); - leaf->SetParent(shared_static_cast<Node>(make_shared(GetSelf()))); + leaf->SetParent(shared_static_cast<Node>(GetSelf().lock())); return true; } Modified: trunk/spark/lib/zeitgeist/node.h =================================================================== --- trunk/spark/lib/zeitgeist/node.h 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/lib/zeitgeist/node.h 2008-12-19 18:12:56 UTC (rev 19) @@ -132,7 +132,7 @@ Leaf::FindParentSupportingClass() const { boost::shared_ptr<Node> node - = boost::shared_static_cast<Node>(make_shared(GetParent())); + = boost::shared_static_cast<Node>(GetParent().lock()); while (node.get() != 0) { @@ -144,7 +144,7 @@ return test; } - //node = boost::shared_static_cast<Node>(make_shared(node->GetParent())); + //node = boost::shared_static_cast<Node>(node->GetParent().lock()); node = boost::shared_static_cast<Node>(node->GetParent().lock()); } Modified: trunk/spark/plugin/forceeffector/forceeffector.cpp =================================================================== --- trunk/spark/plugin/forceeffector/forceeffector.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/plugin/forceeffector/forceeffector.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -83,7 +83,7 @@ void ForceEffector::OnLink() { shared_ptr<BaseNode> parent = - shared_dynamic_cast<BaseNode>(make_shared(GetParent())); + shared_dynamic_cast<BaseNode>(GetParent().lock()); if (parent.get() == 0) { Modified: trunk/spark/plugin/perfectvisionperceptor/perfectvisionperceptor.cpp =================================================================== --- trunk/spark/plugin/perfectvisionperceptor/perfectvisionperceptor.cpp 2008-12-01 20:57:25 UTC (rev 18) +++ trunk/spark/plugin/perfectvisionperceptor/perfectvisionperceptor.cpp 2008-12-19 18:12:56 UTC (rev 19) @@ -71,7 +71,7 @@ // we want positions relative to the closest parent transform node shared_ptr<Transform> parent = shared_dynamic_cast<Transform> - (make_shared(FindParentSupportingClass<Transform>())); + (FindParentSupportingClass<Transform>().lock()); salt::Vector3f myPos(0,0,0); if (parent.get() == 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-01-20 16:06:42
|
Revision: 22 http://simspark.svn.sourceforge.net/simspark/?rev=22&view=rev Author: hedayat Date: 2009-01-20 16:06:07 +0000 (Tue, 20 Jan 2009) Log Message: ----------- Add support for having many locations for resources. Some spell corrections A little fix in cmake for building release builds. Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/lib/salt/fileclasses.cpp trunk/spark/lib/salt/fileclasses.h trunk/spark/lib/zeitgeist/fileserver/fileserver.cpp trunk/spark/lib/zeitgeist/fileserver/fileserver.h Property Changed: ---------------- trunk/spark/ Property changes on: trunk/spark ___________________________________________________________________ Modified: svn:ignore - .project .cproject autom4te.cache configure sparkconfig.h.in Makefile.in aclocal.m4 .cdtconfigure.Build (GNU) Makefile config.status stamp-h1 libtool sparkconfig.h + .project .cproject autom4te.cache configure sparkconfig.h.in Makefile.in aclocal.m4 .cdtconfigure.Build (GNU) Makefile config.status stamp-h1 libtool sparkconfig.h .settings Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2009-01-14 14:38:57 UTC (rev 21) +++ trunk/spark/CMakeLists.txt 2009-01-20 16:06:07 UTC (rev 22) @@ -72,7 +72,7 @@ ########## add extra flags ########## -set(CMAKE_BUILD_TYPE Debug) +set(CMAKE_BUILD_TYPE Debug CACHE STRING "Release or Debug build type") add_definitions(-DHAVE_CONFIG_H) include_directories(${CMAKE_BINARY_DIR}) if (UNIX) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-01-14 14:38:57 UTC (rev 21) +++ trunk/spark/ChangeLog 2009-01-20 16:06:07 UTC (rev 22) @@ -1,3 +1,20 @@ +2009-01-20 Hedayat Vatankhah <he...@gr...> + + * lib/zeitgeist/fileserver/fileserver.h: + * lib/zeitgeist/fileserver/fileserver.cpp: + - added new function: AddResourceLocation to support many resource + locations + - some spell corrections + +2009-01-19 Hedayat Vatankhah <he...@gr...> + + * CMakeLists.txt: + - fixed selecting build type from cmake command line + + * lib/salt/fileclasses.h: + * lib/salt/fileclasses.cpp: + - remove some warnings using const char* variables + 2008-12-19 Hedayat Vatankhah <he...@gr...> * lib/oxygen/agentaspect/effector.cpp: Modified: trunk/spark/lib/salt/fileclasses.cpp =================================================================== --- trunk/spark/lib/salt/fileclasses.cpp 2009-01-14 14:38:57 UTC (rev 21) +++ trunk/spark/lib/salt/fileclasses.cpp 2009-01-20 16:06:07 UTC (rev 22) @@ -90,7 +90,7 @@ // MemFile //------------------------------------------------------------------------------------------------ -MemFile::MemFile(const char *fn, char *mode) +MemFile::MemFile(const char *fn, const char *mode) { if(fn==NULL) { @@ -132,7 +132,7 @@ Destroy(); } -bool MemFile::Open(const char *fn, char *mode) +bool MemFile::Open(const char *fn, const char *mode) { if(fn==NULL) return false; @@ -280,7 +280,7 @@ mHandle=h; } -StdFile::StdFile(const char* fn,char* mode) +StdFile::StdFile(const char* fn,const char* mode) { mHandle=NULL; //open file @@ -308,7 +308,7 @@ mHandle = NULL; } -bool StdFile::Open(const char* fileName,char* mode) +bool StdFile::Open(const char* fileName,const char* mode) { //Open fn with mode mode if(fileName==NULL) Modified: trunk/spark/lib/salt/fileclasses.h =================================================================== --- trunk/spark/lib/salt/fileclasses.h 2009-01-14 14:38:57 UTC (rev 21) +++ trunk/spark/lib/salt/fileclasses.h 2009-01-20 16:06:07 UTC (rev 22) @@ -64,7 +64,7 @@ /** opens the file fn in the specified mode. The implementation of * the namespace and mode semantics ist up to derived classes */ - virtual bool Open(const char*fn=NULL, char*mode="rb") = 0; + virtual bool Open(const char* fn=NULL, const char* mode="rb") = 0; /** closes a previously opened file */ virtual void Close() = 0; @@ -181,12 +181,12 @@ class MemFile : public RFile { public: - MemFile(const char*fn=NULL, char*mode="rb"); + MemFile(const char*fn=NULL, const char*mode="rb"); MemFile(FILE*f); MemFile(RFile *f); ~MemFile(); - bool Open(const char*fn=NULL, char*mode="rb"); + bool Open(const char* fn=NULL, const char* mode="rb"); bool Open(void*buffer, long s); void Close(); void Destroy(); @@ -310,10 +310,10 @@ { public: StdFile(FILE*f); - StdFile(const char*fn=NULL, char*mode="rb"); + StdFile(const char* fn = NULL, const char* mode = "rb"); virtual ~StdFile(); - bool Open(const char*fn=NULL, char*mode="rb"); + bool Open(const char*fn=NULL, const char* mode="rb"); void Close(); void Destroy(); Modified: trunk/spark/lib/zeitgeist/fileserver/fileserver.cpp =================================================================== --- trunk/spark/lib/zeitgeist/fileserver/fileserver.cpp 2009-01-14 14:38:57 UTC (rev 21) +++ trunk/spark/lib/zeitgeist/fileserver/fileserver.cpp 2009-01-20 16:06:07 UTC (rev 22) @@ -31,12 +31,18 @@ FileServer::FileServer() : Node(), mNextHandle(1) { + mResourceLocations.push_back(salt::RFile::BundlePath()); } FileServer::~FileServer() { } +void FileServer::AddResourceLocation(const std::string& path) +{ + mResourceLocations.push_back(path + salt::RFile::Sep()); +} + bool FileServer::LocateResource(const std::string& inName, std::string& outName) { if (Exist(inName)) @@ -45,16 +51,19 @@ return true; } - string fname = salt::RFile::BundlePath() + inName; + for (unsigned i = 0; i < mResourceLocations.size(); ++i) + { + string fname = mResourceLocations[i] + inName; - if (Exist(fname)) - { - GetLog()->Debug() << "(FileServer::LocateResource) expanded filename to '" - << fname << "'\n"; + if (Exist(fname)) + { + GetLog()->Debug() << "(FileServer::LocateResource) expanded filename to '" + << fname << "'\n"; - outName = fname; - return true; - } + outName = fname; + return true; + } + } GetLog()->Debug() << "FileServer::LocateResource) unable to locate resource '" Modified: trunk/spark/lib/zeitgeist/fileserver/fileserver.h =================================================================== --- trunk/spark/lib/zeitgeist/fileserver/fileserver.h 2009-01-14 14:38:57 UTC (rev 21) +++ trunk/spark/lib/zeitgeist/fileserver/fileserver.h 2009-01-20 16:06:07 UTC (rev 22) @@ -52,7 +52,7 @@ #ifndef ZEITGEIST_FILESERVER_H #define ZEITGEIST_FILESERVER_H -#include <list> +#include <vector> #include <zeitgeist/node.h> #include "filesystem.h" @@ -94,7 +94,12 @@ FileServer(); ~FileServer(); - /** tests for the existance of the given file at well known + /** + * adds a new location to the list of resource locations + */ + void AddResourceLocation(const std::string& path); + + /** tests for the existence of the given file at well known locations. On success the function returns true. In this case outName is set to the full path to the file. */ @@ -152,7 +157,7 @@ /** iterates through files. 'directory', 'name' and * 'extension' give directory, name and extension a file must - * match. directory,name and extension may be NULL, in wich + * match. directory,name and extension may be NULL, in which * case every directory,extension and/or name matches. For * each match the function callback is called with the name * of the matched file and the additional user parameter @@ -179,6 +184,9 @@ /** the next free handle */ THandle mNextHandle; + + /** list of resource locations */ + std::vector<std::string> mResourceLocations; }; DECLARE_CLASS(FileServer) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-01-21 17:46:40
|
Revision: 26 http://simspark.svn.sourceforge.net/simspark/?rev=26&view=rev Author: hedayat Date: 2009-01-21 17:46:14 +0000 (Wed, 21 Jan 2009) Log Message: ----------- Fixed library versions Some other small cmake fixes Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2009-01-21 09:59:55 UTC (rev 25) +++ trunk/spark/CMakeLists.txt 2009-01-21 17:46:14 UTC (rev 26) @@ -78,31 +78,27 @@ include_directories(${CMAKE_BINARY_DIR}) if (UNIX) set(CMAKE_CXX_FLAGS "-Wno-deprecated") - set(CMAKE_CXX_FLAGS_DEBUG "-g -W -Wall -Woverloaded-virtual") - set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG") + set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -W -Wall -Woverloaded-virtual") + set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG") endif (UNIX) -set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH - "The directory to install binaries into.") -set(LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH - "The directory to install libraries into.") -set(DATADIR "${CMAKE_INSTALL_PREFIX}/share" CACHE PATH - "The directory to install data files into.") -set(INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH - "The directory to install includes into.") +set(BINDIR "bin" CACHE PATH "The directory to install binaries into.") +set(LIBDIR "lib" CACHE PATH "The directory to install libraries into.") +set(DATADIR "share" CACHE PATH "The directory to install data files into.") +set(INCLUDEDIR "include" CACHE PATH "The directory to install includes into.") set(CMAKE_SHARED_MODULE_PREFIX "") mark_as_advanced(BINDIR LIBDIR DATADIR INCLUDEDIR) ########## library version numbers ########## -set(SALT_SO_VERSION 3) -set(SALT_VERSION ${SALT_SO_VERSION}.1.3) +set(SALT_SO_VERSION 0) +set(SALT_VERSION ${SALT_SO_VERSION}.3.1) set(ZEITGEIST_SO_VERSION 3) -set(ZEITGEIST_VERSION ${ZEITGEIST_SO_VERSION}.1.0) -set(OXYGEN_SO_VERSION 5) -set(OXYGEN_VERSION ${OXYGEN_SO_VERSION}.3.2) +set(ZEITGEIST_VERSION ${ZEITGEIST_SO_VERSION}.0.1) +set(OXYGEN_SO_VERSION 3) +set(OXYGEN_VERSION ${OXYGEN_SO_VERSION}.2.3) set(KEROSIN_SO_VERSION 1) -set(KEROSIN_VERSION ${KEROSIN_SO_VERSION}.1.0) +set(KEROSIN_VERSION ${KEROSIN_SO_VERSION}.0.1) set(SPARK_SO_VERSION 0) set(SPARK_VERSION ${SPARK_SO_VERSION}.0.0) set(RCSSNET_SO_VERSION 0) @@ -127,7 +123,7 @@ ########## generate configuration file ########## configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sparkconfig.h.cmake -${CMAKE_CURRENT_BINARY_DIR}/sparkconfig.h) + ${CMAKE_CURRENT_BINARY_DIR}/sparkconfig.h) ########## add subdirectories ############ add_subdirectory(utility) @@ -158,9 +154,6 @@ #original Makefile.am contents follow: -#pkginclude_HEADERS = \ -#sparkconfig.h -# #DISTCLEANFILES = $(top_builddir)/macosX/SDLMain.o $(top_builddir)/macosX/libSDLmain.a # #UPLOAD_BIN = Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-01-21 09:59:55 UTC (rev 25) +++ trunk/spark/ChangeLog 2009-01-21 17:46:14 UTC (rev 26) @@ -5,6 +5,7 @@ files like CMakeLists.txt files; so, using 'make package_source' is preferred to 'make dist' now. - some cleanup + - fixed library version numbers * lib/salt/CMakeLists.txt: * lib/oxygen/CMakeLists.txt: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-01-21 08:27:48
|
Revision: 24 http://simspark.svn.sourceforge.net/simspark/?rev=24&view=rev Author: hedayat Date: 2009-01-21 08:27:33 +0000 (Wed, 21 Jan 2009) Log Message: ----------- Add cmake support for documentation generation Don't install .svn directories when using cmake Some cleanup Now, CMake support should be inline with autoconf support. Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/doc/CMakeLists.txt trunk/spark/doc/Doxyfile.in trunk/spark/doc/devel/CMakeLists.txt trunk/spark/lib/kerosin/CMakeLists.txt trunk/spark/lib/oxygen/CMakeLists.txt trunk/spark/lib/salt/CMakeLists.txt trunk/spark/lib/zeitgeist/CMakeLists.txt trunk/spark/utility/rcssnet/CMakeLists.txt Added Paths: ----------- trunk/spark/cmake/UseLATEX.cmake Removed Paths: ------------- trunk/spark/doc/devel/howtos/CMakeLists.txt Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2009-01-20 16:13:20 UTC (rev 23) +++ trunk/spark/CMakeLists.txt 2009-01-21 08:27:33 UTC (rev 24) @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 2.6) project(simspark CXX C) +set(PACKAGE_VERSION "0.1") ########## check for headerfiles/libraries ########## include(CheckIncludeFile) @@ -147,8 +148,9 @@ ########### CPack section ############# set(CPACK_SOURCE_GENERATOR TGZ) set(CPACK_SOURCE_IGNORE_FILES - /CVS/ /[.]svn/ /.*[.]o /autom4te[.]cache/ /[.].*) -set(CPACK_PACKAGE_VERSION "0.1") + /CVS/ /[.]svn/ /.*[.]o /autom4te[.]cache/ /[.].* /bootstrap /RELEASE + /styles/ /papers/ /rpm.am /msi.am /codingstyle.txt) +set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION}) set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}) @@ -156,27 +158,11 @@ #original Makefile.am contents follow: -#### utility subdir has to be made first -#SUBDIRS = utility lib plugin test doc spark data -# #pkginclude_HEADERS = \ #sparkconfig.h # -#doc: doc-recursive -#doc-recursive: -# cd doc && $(MAKE) $(AM_MAKEFLAGS) doc -# -#CLEANFILES = -# #DISTCLEANFILES = $(top_builddir)/macosX/SDLMain.o $(top_builddir)/macosX/libSDLmain.a -#EXTRA_DIST = macosX \ -# windows/sparkconfig.h windows/simspark.iss windows/spark.ico -#dist_doc_DATA = AUTHORS ChangeLog COPYING NEWS README THANKS # -#EXTRA_SRC_DISTS = -#EXTRA_BIN_DISTS = -#include $(top_srcdir)/config.aux/dist.am -# #UPLOAD_BIN = #UPLOAD_SRC = upload-gzip upload-bzip2 upload-zip #UPLOAD_TARGETS = \ @@ -185,11 +171,4 @@ #{zip=>@PACKAGE@-@VERSION@.zip} #include $(top_srcdir)/config.aux/sf.am # -# #include $(top_srcdir)/config.aux/cvs.am -# -##MSI_SETUP_FILE=Setup/Release/@PAC...@Se...i -##include $(top_srcdir)/config.aux/msi.am -# -##include $(top_srcdir)/config.aux/rpm.am -# Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-01-20 16:13:20 UTC (rev 23) +++ trunk/spark/ChangeLog 2009-01-21 08:27:33 UTC (rev 24) @@ -1,3 +1,26 @@ +2009-01-21 Hedayat Vatankhah <he...@gr...> + + * CMakeLists.txt: + - make cpack support more like 'make dist'. It includes some additional + files like CMakeLists.txt files; so, using 'make package_source' is + preferred to 'make dist' now. + - some cleanup + + * lib/salt/CMakeLists.txt: + * lib/oxygen/CMakeLists.txt: + * lib/kerosin/CMakeLists.txt: + * lib/zeitgeist/CMakeLists.txt: + * utility/rcssnet/CMakeLists.txt: + - don't install .svn directories! + + * doc/Doxyfile.in: + - generate documents inside build directory instead of source directory + + * doc/devel/CMakeLists.txt: + * doc/CMakeLists.txt: + * cmake/UseLATEX.cmake: + - add cmake support for generating documents + 2009-01-20 Hedayat Vatankhah <he...@gr...> * lib/zeitgeist/fileserver/fileserver.h: Added: trunk/spark/cmake/UseLATEX.cmake =================================================================== --- trunk/spark/cmake/UseLATEX.cmake (rev 0) +++ trunk/spark/cmake/UseLATEX.cmake 2009-01-21 08:27:33 UTC (rev 24) @@ -0,0 +1,770 @@ +# File: UseLATEX.cmake +# CMAKE commands to actually use the LaTeX compiler +# Version: 1.7.0 +# Author: Kenneth Moreland (kmorel at sandia dot gov) +# +# Copyright 2004 Sandia Corporation. +# Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive +# license for use of this work by or on behalf of the +# U.S. Government. Redistribution and use in source and binary forms, with +# or without modification, are permitted provided that this Notice and any +# statement of authorship are reproduced on all copies. +# +# The following MACROS are defined: +# +# ADD_LATEX_DOCUMENT(<tex_file> +# [BIBFILES <bib_files>] +# [INPUTS <input_tex_files>] +# [IMAGE_DIRS] <image_directories> +# [IMAGES] <image_files> +# [CONFIGURE] <tex_files> +# [DEPENDS] <tex_files> +# [USE_INDEX] [USE_GLOSSARY] +# [DEFAULT_PDF] [MANGLE_TARGET_NAMES]) +# Adds targets that compile <tex_file>. The latex output is placed +# in LATEX_OUTPUT_PATH or CMAKE_CURRENT_BINARY_DIR if the former is +# not set. The latex program is picky about where files are located, +# so all input files are copied from the source directory to the +# output directory. This includes the target tex file, any tex file +# listed with the INPUTS option, the bibliography files listed with +# the BIBFILES option, and any .cls, .bst, and .clo files found in +# the current source directory. Images found in the IMAGE_DIRS +# directories or listed by IMAGES are also copied to the output +# directory and coverted to an appropriate format if necessary. Any +# tex files also listed with the CONFIGURE option are also processed +# with the CMake CONFIGURE_FILE command (with the @ONLY flag. Any +# file listed in CONFIGURE but not the target tex file or listed with +# INPUTS has no effect. DEPENDS can be used to specify generated files +# that are needed to compile the latex target. +# +# The following targets are made: +# dvi: Makes <name>.dvi +# pdf: Makes <name>.pdf using pdflatex. +# safepdf: Makes <name>.pdf using ps2pdf. If using the default +# program arguments, this will ensure all fonts are +# embedded and no lossy compression has been performed +# on images. +# ps: Makes <name>.ps +# html: Makes <name>.html +# auxclean: Deletes <name>.aux. This is sometimes necessary +# if a LaTeX error occurs and writes a bad aux file. +# +# If the argument MANGLE_TARGET_NAMES is given, then each of the +# target names above will be mangled with the <tex_file> name. This +# is to make the targets unique if ADD_LATEX_DOCUMENT is called for +# multiple documents. If the argument USE_INDEX is given, then +# commands to build an index are made. If the argument USE_GLOSSARY +# is given, then commands to build a glossary are made. +# +# History: +# +# 1.7.0 Added DEPENDS options (thanks to Theodore Papadopoulp). +# +# 1.6.1 Ported the makeglossaries command to CMake and embedded the port +# into UseLATEX.cmake. +# +# 1.6.0 Allow the use of the makeglossaries command. Thanks to Oystein +# S. Haaland for the patch. +# +# 1.5.0 Allow any type of file in the INPUTS lists, not just tex file +# (suggested by Eric Noulard). As a consequence, the ability to +# specify tex files without the .tex extension is removed. The removed +# function is of dubious value anyway. +# +# When copying input files, skip over any file that exists in the +# binary directory but does not exist in the source directory with the +# assumption that these files were added by some other mechanism. I +# find this useful when creating large documents with multiple +# chapters that I want to build separately (for speed) as I work on +# them. I use the same boilerplate as the starting point for all +# and just copy it with different configurations. This was what the +# separate ADD_LATEX_DOCUMENT method was supposed to originally be for. +# Since its external use is pretty much deprecated, I removed that +# documentation. +# +# 1.4.1 Copy .sty files along with the other class and package files. +# +# 1.4.0 Added a MANGLE_TARGET_NAMES option that will mangle the target names. +# +# Fixed problem with copying bib files that became apparent with +# CMake 2.4. +# +# 1.3.0 Added a LATEX_OUTPUT_PATH variable that allows you or the user to +# specify where the built latex documents to go. This is especially +# handy if you want to do in-source builds. +# +# Removed the ADD_LATEX_IMAGES macro and absorbed the functionality +# into ADD_LATEX_DOCUMENT. The old interface was always kind of +# clunky anyway since you had to specify the image directory in both +# places. It also made supporting LATEX_OUTPUT_PATH problematic. +# +# Added support for jpeg files. +# +# 1.2.0 Changed the configuration options yet again. Removed the NO_CONFIGURE +# Replaced it with a CONFIGURE option that lists input files for which +# configure should be run. +# +# The pdf target no longer depends on the dvi target. This allows you +# to build latex documents that require pdflatex. Also added an option +# to make the pdf target the default one. +# +# 1.1.1 Added the NO_CONFIGURE option. The @ character can be used when +# specifying table column separators. If two or more are used, then +# will incorrectly substitute them. +# +# 1.1.0 Added ability include multiple bib files. Added ability to do copy +# sub-tex files for multipart tex files. +# +# 1.0.0 If both ps and pdf type images exist, just copy the one that +# matches the current render mode. Replaced a bunch of STRING +# commands with GET_FILENAME_COMPONENT commands that were made to do +# the desired function. +# +# 0.4.0 First version posted to CMake Wiki. +# + +############################################################################# +# Find the location of myself while originally executing. If you do this +# inside of a macro, it will recode where the macro was invoked. +############################################################################# +SET(LATEX_USE_LATEX_LOCATION ${CMAKE_CURRENT_LIST_FILE} + CACHE INTERNAL "Location of UseLATEX.cmake file." FORCE + ) + +############################################################################# +# Generic helper macros +############################################################################# + +# Helpful list macros. +MACRO(LATEX_CAR var) + SET(${var} ${ARGV1}) +ENDMACRO(LATEX_CAR) +MACRO(LATEX_CDR var junk) + SET(${var} ${ARGN}) +ENDMACRO(LATEX_CDR) + +MACRO(LATEX_LIST_CONTAINS var value) + SET(${var}) + FOREACH (value2 ${ARGN}) + IF (${value} STREQUAL ${value2}) + SET(${var} TRUE) + ENDIF (${value} STREQUAL ${value2}) + ENDFOREACH (value2) +ENDMACRO(LATEX_LIST_CONTAINS) + +# Parse macro arguments. +MACRO(LATEX_PARSE_ARGUMENTS prefix arg_names option_names) + SET(DEFAULT_ARGS) + FOREACH(arg_name ${arg_names}) + SET(${prefix}_${arg_name}) + ENDFOREACH(arg_name) + FOREACH(option ${option_names}) + SET(${prefix}_${option}) + ENDFOREACH(option) + + SET(current_arg_name DEFAULT_ARGS) + SET(current_arg_list) + FOREACH(arg ${ARGN}) + LATEX_LIST_CONTAINS(is_arg_name ${arg} ${arg_names}) + IF (is_arg_name) + SET(${prefix}_${current_arg_name} ${current_arg_list}) + SET(current_arg_name ${arg}) + SET(current_arg_list) + ELSE (is_arg_name) + LATEX_LIST_CONTAINS(is_option ${arg} ${option_names}) + IF (is_option) + SET(${prefix}_${arg} TRUE) + ELSE (is_option) + SET(current_arg_list ${current_arg_list} ${arg}) + ENDIF (is_option) + ENDIF (is_arg_name) + ENDFOREACH(arg) + SET(${prefix}_${current_arg_name} ${current_arg_list}) +ENDMACRO(LATEX_PARSE_ARGUMENTS) + +# Match the contents of a file to a regular expression. +MACRO(LATEX_FILE_MATCH variable filename regexp default) + # The FILE STRINGS command would be a bit better, but it's not supported on + # older versions of CMake. + FILE(READ ${filename} file_contents) + STRING(REGEX MATCHALL "${regexp}" + ${variable} ${file_contents} + ) + IF (NOT ${variable}) + SET(${variable} "${default}") + ENDIF (NOT ${variable}) +ENDMACRO(LATEX_FILE_MATCH) + +############################################################################# +# Macros that perform processing during a LaTeX build. +############################################################################# +MACRO(LATEX_MAKEGLOSSARIES) + MESSAGE("**************************** In makeglossaries") + IF (NOT LATEX_TARGET) + MESSAGE(SEND_ERROR "Need to define LATEX_TARGET") + ENDIF (NOT LATEX_TARGET) + + IF (NOT MAKEINDEX_COMPILER) + MESSAGE(SEND_ERROR "Need to define MAKEINDEX_COMPILER") + ENDIF (NOT MAKEINDEX_COMPILER) + + SET(aux_file ${LATEX_TARGET}.aux) + + IF (NOT EXISTS ${aux_file}) + MESSAGE(SEND_ERROR "${aux_file} does not exist. Run latex on your target file.") + ENDIF (NOT EXISTS ${aux_file}) + + LATEX_FILE_MATCH(newglossary_lines ${aux_file} + "@newglossary[ \t]*{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}" + "@newglossary{main}{glg}{gls}{glo}" + ) + + LATEX_FILE_MATCH(istfile_line ${aux_file} + "@istfilename[ \t]*{([^}]*)}" + "@istfilename{${LATEX_TARGET}.ist}" + ) + STRING(REGEX REPLACE "@istfilename[ \t]*{([^}]*)}" "\\1" + istfile ${istfile_line} + ) + + FOREACH(newglossary ${newglossary_lines}) + STRING(REGEX REPLACE + "@newglossary[ \t]*{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}" + "\\1" glossary_name ${newglossary} + ) + STRING(REGEX REPLACE + "@newglossary[ \t]*{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}" + "${LATEX_TARGET}.\\2" glossary_log ${newglossary} + ) + STRING(REGEX REPLACE + "@newglossary[ \t]*{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}" + "${LATEX_TARGET}.\\3" glossary_out ${newglossary} + ) + STRING(REGEX REPLACE + "@newglossary[ \t]*{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}" + "${LATEX_TARGET}.\\4" glossary_in ${newglossary} + ) + MESSAGE("${MAKEINDEX_COMPILER} ${MAKEGLOSSARIES_COMPILER_FLAGS} -s ${istfile} -t ${glossary_log} -o ${glossary_out} ${glossary_in}") + EXEC_PROGRAM(${MAKEINDEX_COMPILER} ARGS ${MAKEGLOSSARIES_COMPILER_FLAGS} + -s ${istfile} -t ${glossary_log} -o ${glossary_out} ${glossary_in} + ) + ENDFOREACH(newglossary) +ENDMACRO(LATEX_MAKEGLOSSARIES) + +############################################################################# +# Helper macros for establishing LaTeX build. +############################################################################# + +MACRO(LATEX_NEEDIT VAR NAME) + IF (NOT ${VAR}) + MESSAGE(SEND_ERROR "I need the ${NAME} command.") + ENDIF(NOT ${VAR}) +ENDMACRO(LATEX_NEEDIT) + +MACRO(LATEX_WANTIT VAR NAME) + IF (NOT ${VAR}) + MESSAGE(STATUS "I could not find the ${NAME} command.") + ENDIF(NOT ${VAR}) +ENDMACRO(LATEX_WANTIT) + +MACRO(LATEX_SETUP_VARIABLES) + SET(LATEX_OUTPUT_PATH "${LATEX_OUTPUT_PATH}" + CACHE PATH "If non empty, specifies the location to place LaTeX output." + ) + + FIND_PACKAGE(LATEX) + + MARK_AS_ADVANCED(CLEAR + LATEX_COMPILER + PDFLATEX_COMPILER + BIBTEX_COMPILER + MAKEINDEX_COMPILER + DVIPS_CONVERTER + PS2PDF_CONVERTER + LATEX2HTML_CONVERTER + ) + + LATEX_NEEDIT(LATEX_COMPILER latex) + LATEX_WANTIT(PDFLATEX_COMPILER pdflatex) + LATEX_NEEDIT(BIBTEX_COMPILER bibtex) + LATEX_NEEDIT(MAKEINDEX_COMPILER makeindex) + LATEX_WANTIT(DVIPS_CONVERTER dvips) + LATEX_WANTIT(PS2PDF_CONVERTER ps2pdf) + LATEX_WANTIT(LATEX2HTML_CONVERTER latex2html) + + SET(LATEX_COMPILER_FLAGS "-interaction=nonstopmode" + CACHE STRING "Flags passed to latex.") + SET(PDFLATEX_COMPILER_FLAGS ${LATEX_COMPILER_FLAGS} + CACHE STRING "Flags passed to pdflatex.") + SET(BIBTEX_COMPILER_FLAGS "" + CACHE STRING "Flags passed to bibtex.") + SET(MAKEINDEX_COMPILER_FLAGS "" + CACHE STRING "Flags passed to makeindex.") + SET(MAKEGLOSSARIES_COMPILER_FLAGS "" + CACHE STRING "Flags passed to makeglossaries.") + SET(DVIPS_CONVERTER_FLAGS "-Ppdf -G0 -t letter" + CACHE STRING "Flags passed to dvips.") + SET(PS2PDF_CONVERTER_FLAGS "-dMaxSubsetPct=100 -dCompatibilityLevel=1.3 -dSubsetFonts=true -dEmbedAllFonts=true -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -dColorImageFilter=/FlateEncode -dGrayImageFilter=/FlateEncode -dMonoImageFilter=/FlateEncode" + CACHE STRING "Flags passed to ps2pdf.") + SET(LATEX2HTML_CONVERTER_FLAGS "" + CACHE STRING "Flags passed to latex2html.") + MARK_AS_ADVANCED( + LATEX_COMPILER_FLAGS + PDFLATEX_COMPILER_FLAGS + BIBTEX_COMPILER_FLAGS + MAKEINDEX_COMPILER_FLAGS + MAKEGLOSSARIES_COMPILER_FLAGS + DVIPS_CONVERTER_FLAGS + PS2PDF_CONVERTER_FLAGS + LATEX2HTML_CONVERTER_FLAGS + ) + SEPARATE_ARGUMENTS(LATEX_COMPILER_FLAGS) + SEPARATE_ARGUMENTS(PDFLATEX_COMPILER_FLAGS) + SEPARATE_ARGUMENTS(BIBTEX_COMPILER_FLAGS) + SEPARATE_ARGUMENTS(MAKEINDEX_COMPILER_FLAGS) + SEPARATE_ARGUMENTS(MAKEGLOSSARIES_COMPILER_FLAGS) + SEPARATE_ARGUMENTS(DVIPS_CONVERTER_FLAGS) + SEPARATE_ARGUMENTS(PS2PDF_CONVERTER_FLAGS) + SEPARATE_ARGUMENTS(LATEX2HTML_CONVERTER_FLAGS) + + FIND_PROGRAM(IMAGEMAGICK_CONVERT convert + DOC "The convert program that comes with ImageMagick (available at http://www.imagemagick.org)." + ) + IF (NOT IMAGEMAGICK_CONVERT) + MESSAGE(SEND_ERROR "Could not find convert program. Please download ImageMagick from http://www.imagemagick.org and install.") + ENDIF (NOT IMAGEMAGICK_CONVERT) + + OPTION(LATEX_SMALL_IMAGES + "If on, the raster images will be converted to 1/6 the original size. This is because papers usually require 600 dpi images whereas most monitors only require at most 96 dpi. Thus, smaller images make smaller files for web distributation and can make it faster to read dvi files." + OFF) + IF (LATEX_SMALL_IMAGES) + SET(LATEX_RASTER_SCALE 16) + SET(LATEX_OPPOSITE_RASTER_SCALE 100) + ELSE (LATEX_SMALL_IMAGES) + SET(LATEX_RASTER_SCALE 100) + SET(LATEX_OPPOSITE_RASTER_SCALE 16) + ENDIF (LATEX_SMALL_IMAGES) + + # Just holds extensions for known image types. They should all be lower case. + SET(LATEX_DVI_VECTOR_IMAGE_EXTENSIONS .eps) + SET(LATEX_DVI_RASTER_IMAGE_EXTENSIONS) + SET(LATEX_DVI_IMAGE_EXTENSIONS + ${LATEX_DVI_VECTOR_IMAGE_EXTENSIONS} ${LATEX_DVI_RASTER_IMAGE_EXTENSIONS}) + SET(LATEX_PDF_VECTOR_IMAGE_EXTENSIONS .pdf) + SET(LATEX_PDF_RASTER_IMAGE_EXTENSIONS .png .jpeg .jpg) + SET(LATEX_PDF_IMAGE_EXTENSIONS + ${LATEX_PDF_VECTOR_IMAGE_EXTENSIONS} ${LATEX_PDF_RASTER_IMAGE_EXTENSIONS}) + SET(LATEX_IMAGE_EXTENSIONS + ${LATEX_DVI_IMAGE_EXTENSIONS} ${LATEX_PDF_IMAGE_EXTENSIONS}) +ENDMACRO(LATEX_SETUP_VARIABLES) + +MACRO(LATEX_GET_OUTPUT_PATH var) + SET(${var}) + IF (LATEX_OUTPUT_PATH) + IF ("${LATEX_OUTPUT_PATH}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + MESSAGE(SEND_ERROR "You cannot set LATEX_OUTPUT_PATH to the same directory that contains LaTeX input files.") + ELSE ("${LATEX_OUTPUT_PATH}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + SET(${var} "${LATEX_OUTPUT_PATH}") + ENDIF ("${LATEX_OUTPUT_PATH}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + ELSE (LATEX_OUTPUT_PATH) + IF ("${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + MESSAGE(SEND_ERROR "LaTeX files must be built out of source or you must set LATEX_OUTPUT_PATH.") + ELSE ("${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + SET(${var} "${CMAKE_CURRENT_BINARY_DIR}") + ENDIF ("${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + ENDIF (LATEX_OUTPUT_PATH) +ENDMACRO(LATEX_GET_OUTPUT_PATH) + +# Makes custom commands to convert a file to a particular type. +MACRO(LATEX_CONVERT_IMAGE output_files input_file output_extension convert_flags + output_extensions other_files) + SET(input_dir ${CMAKE_CURRENT_SOURCE_DIR}) + LATEX_GET_OUTPUT_PATH(output_dir) + + GET_FILENAME_COMPONENT(extension "${input_file}" EXT) + + STRING(REGEX REPLACE "\\.[^.]*\$" ${output_extension} output_file + "${input_file}") + + LATEX_LIST_CONTAINS(is_type ${extension} ${output_extensions}) + IF (is_type) + IF (convert_flags) + ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${output_file} + COMMAND ${IMAGEMAGICK_CONVERT} + ARGS ${input_dir}/${input_file} ${convert_flags} + ${output_dir}/${output_file} + DEPENDS ${input_dir}/${input_file} + ) + SET(${output_files} ${${output_files}} ${output_dir}/${output_file}) + ELSE (convert_flags) + # As a shortcut, we can just copy the file. + ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${input_file} + COMMAND ${CMAKE_COMMAND} + ARGS -E copy ${input_dir}/${input_file} ${output_dir}/${input_file} + DEPENDS ${input_dir}/${input_file} + ) + SET(${output_files} ${${output_files}} ${output_dir}/${input_file}) + ENDIF (convert_flags) + ELSE (is_type) + SET(do_convert TRUE) + # Check to see if there is another input file of the appropriate type. + FOREACH(valid_extension ${output_extensions}) + STRING(REGEX REPLACE "\\.[^.]*\$" ${output_extension} try_file + "${input_file}") + LATEX_LIST_CONTAINS(has_native_file "${try_file}" ${other_files}) + IF (has_native_file) + SET(do_convert FALSE) + ENDIF (has_native_file) + ENDFOREACH(valid_extension) + + # If we still need to convert, do it. + IF (do_convert) + ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${output_file} + COMMAND ${IMAGEMAGICK_CONVERT} + ARGS ${input_dir}/${input_file} ${convert_flags} + ${output_dir}/${output_file} + DEPENDS ${input_dir}/${input_file} + ) + SET(${output_files} ${${output_files}} ${output_dir}/${output_file}) + ENDIF (do_convert) + ENDIF (is_type) +ENDMACRO(LATEX_CONVERT_IMAGE) + +# Adds custom commands to process the given files for dvi and pdf builds. +# Adds the output files to the given variables (does not replace). +MACRO(LATEX_PROCESS_IMAGES dvi_outputs pdf_outputs) + LATEX_GET_OUTPUT_PATH(output_dir) + FOREACH(file ${ARGN}) + IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${file}") + GET_FILENAME_COMPONENT(extension "${file}" EXT) + SET(convert_flags) + + # Check to see if we need to downsample the image. + LATEX_LIST_CONTAINS(is_raster extension + ${LATEX_DVI_RASTER_IMAGE_EXTENSIONS} + ${LATEX_PDF_RASTER_IMAGE_EXTENSIONS}) + IF (LATEX_SMALL_IMAGES) + IF (is_raster) + SET(convert_flags -resize ${LATEX_RASTER_SCALE}%) + ENDIF (is_raster) + ENDIF (LATEX_SMALL_IMAGES) + + # Make sure the output directory exists. + GET_FILENAME_COMPONENT(path "${output_dir}/${file}" PATH) + MAKE_DIRECTORY("${path}") + + # Do conversions for dvi. + LATEX_CONVERT_IMAGE(${dvi_outputs} "${file}" .eps "${convert_flags}" + "${LATEX_DVI_IMAGE_EXTENSIONS}" "${ARGN}") + + # Do conversions for pdf. + IF (is_raster) + LATEX_CONVERT_IMAGE(${pdf_outputs} "${file}" .png "${convert_flags}" + "${LATEX_PDF_IMAGE_EXTENSIONS}" "${ARGN}") + ELSE (is_raster) + LATEX_CONVERT_IMAGE(${pdf_outputs} "${file}" .pdf "${convert_flags}" + "${LATEX_PDF_IMAGE_EXTENSIONS}" "${ARGN}") + ENDIF (is_raster) + ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${file}") + MESSAGE("Could not find file \"${CMAKE_CURRENT_SOURCE_DIR}/${file}\"") + ENDIF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${file}") + ENDFOREACH(file) +ENDMACRO(LATEX_PROCESS_IMAGES) + +MACRO(ADD_LATEX_IMAGES) + MESSAGE("The ADD_LATEX_IMAGES macro is deprecated. Image directories are specified with LATEX_ADD_DOCUMENT.") +ENDMACRO(ADD_LATEX_IMAGES) + +MACRO(LATEX_COPY_GLOBBED_FILES pattern dest) + FILE(GLOB file_list ${pattern}) + FOREACH(in_file ${file_list}) + GET_FILENAME_COMPONENT(out_file ${in_file} NAME) + CONFIGURE_FILE(${in_file} ${dest}/${out_file} COPYONLY) + ENDFOREACH(in_file) +ENDMACRO(LATEX_COPY_GLOBBED_FILES) + +MACRO(LATEX_COPY_INPUT_FILE file) + LATEX_GET_OUTPUT_PATH(output_dir) + + IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}) + GET_FILENAME_COMPONENT(path ${file} PATH) + FILE(MAKE_DIRECTORY ${output_dir}/${path}) + + LATEX_LIST_CONTAINS(use_config ${file} ${LATEX_CONFIGURE}) + IF (use_config) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file} + ${output_dir}/${file} + @ONLY + ) + ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${file} + COMMAND ${CMAKE_COMMAND} + ARGS ${CMAKE_BINARY_DIR} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file} + ) + ELSE (use_config) + ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${file} + COMMAND ${CMAKE_COMMAND} + ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${file} ${output_dir}/${file} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file} + ) + ENDIF (use_config) + ELSE (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}) + IF (EXISTS ${output_dir}/${file}) + # Special case: output exists but input does not. Assume that it was + # created elsewhere and skip the input file copy. + ELSE (EXISTS ${output_dir}/${file}) + MESSAGE("Could not find input file ${CMAKE_CURRENT_SOURCE_DIR}/${file}") + ENDIF (EXISTS ${output_dir}/${file}) + ENDIF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}) +ENDMACRO(LATEX_COPY_INPUT_FILE) + +############################################################################# +# Commands provided by the UseLATEX.cmake "package" +############################################################################# + +MACRO(LATEX_USAGE command message) + MESSAGE(SEND_ERROR + "${message}\nUsage: ${command}(<tex_file>\n [BIBFILES <bib_file> <bib_file> ...]\n [INPUTS <tex_file> <tex_file> ...]\n [IMAGE_DIRS <directory1> <directory2> ...]\n [IMAGES <image_file1> <image_file2>\n [CONFIGURE <tex_file> <tex_file> ...]\n [DEPENDS <tex_file> <tex_file> ...]\n [USE_INDEX] [USE_GLOSSARY] [DEFAULT_PDF] [MANGLE_TARGET_NAMES])" + ) +ENDMACRO(LATEX_USAGE command message) + +# Parses arguments to ADD_LATEX_DOCUMENT and ADD_LATEX_TARGETS and sets the +# variables LATEX_TARGET, LATEX_IMAGE_DIR, LATEX_BIBFILES, LATEX_DEPENDS, and +# LATEX_INPUTS. +MACRO(PARSE_ADD_LATEX_ARGUMENTS command) + LATEX_PARSE_ARGUMENTS( + LATEX + "BIBFILES;INPUTS;IMAGE_DIRS;IMAGES;CONFIGURE;DEPENDS" + "USE_INDEX;USE_GLOSSARY;USE_GLOSSARIES;DEFAULT_PDF;MANGLE_TARGET_NAMES" + ${ARGN} + ) + + # The first argument is the target latex file. + IF (LATEX_DEFAULT_ARGS) + LATEX_CAR(LATEX_MAIN_INPUT ${LATEX_DEFAULT_ARGS}) + LATEX_CDR(LATEX_DEFAULT_ARGS ${LATEX_DEFAULT_ARGS}) + GET_FILENAME_COMPONENT(LATEX_TARGET ${LATEX_MAIN_INPUT} NAME_WE) + ELSE (LATEX_DEFAULT_ARGS) + LATEX_USAGE(${command} "No tex file target given to ${command}.") + ENDIF (LATEX_DEFAULT_ARGS) + + IF (LATEX_DEFAULT_ARGS) + LATEX_USAGE(${command} "Invalid or depricated arguments: ${LATEX_DEFAULT_ARGS}") + ENDIF (LATEX_DEFAULT_ARGS) + + # Backward compatibility between 1.6.0 and 1.6.1. + IF (LATEX_USE_GLOSSARIES) + SET(LATEX_USE_GLOSSARY TRUE) + ENDIF (LATEX_USE_GLOSSARIES) +ENDMACRO(PARSE_ADD_LATEX_ARGUMENTS) + +MACRO(ADD_LATEX_TARGETS) + LATEX_GET_OUTPUT_PATH(output_dir) + PARSE_ADD_LATEX_ARGUMENTS(ADD_LATEX_TARGETS ${ARGV}) + + # Set up target names. + IF (LATEX_MANGLE_TARGET_NAMES) + SET(dvi_target ${LATEX_TARGET}_dvi) + SET(pdf_target ${LATEX_TARGET}_pdf) + SET(ps_target ${LATEX_TARGET}_ps) + SET(safepdf_target ${LATEX_TARGET}_safepdf) + SET(html_target ${LATEX_TARGET}_html) + SET(auxclean_target ${LATEX_TARGET}_auxclean) + ELSE (LATEX_MANGLE_TARGET_NAMES) + SET(dvi_target dvi) + SET(pdf_target pdf) + SET(ps_target ps) + SET(safepdf_target safepdf) + SET(html_target html) + SET(auxclean_target auxclean) + ENDIF (LATEX_MANGLE_TARGET_NAMES) + + # For each directory in LATEX_IMAGE_DIRS, glob all the image files and + # place them in LATEX_IMAGES. + FOREACH(dir ${LATEX_IMAGE_DIRS}) + FOREACH(extension ${LATEX_IMAGE_EXTENSIONS}) + FILE(GLOB files ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/*${extension}) + FOREACH(file ${files}) + GET_FILENAME_COMPONENT(filename ${file} NAME) + SET(LATEX_IMAGES ${LATEX_IMAGES} ${dir}/${filename}) + ENDFOREACH(file) + ENDFOREACH(extension) + ENDFOREACH(dir) + + SET(dvi_images) + SET(pdf_images) + LATEX_PROCESS_IMAGES(dvi_images pdf_images ${LATEX_IMAGES}) + + SET(make_dvi_command + ${CMAKE_COMMAND} -E chdir ${output_dir} + ${LATEX_COMPILER} ${LATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT}) + SET(make_pdf_command + ${CMAKE_COMMAND} -E chdir ${output_dir} + ${PDFLATEX_COMPILER} ${PDFLATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT}) + + SET(make_dvi_depends ${LATEX_DEPENDS} ${dvi_images}) + SET(make_pdf_depends ${LATEX_DEPENDS} ${pdf_images}) + FOREACH(input ${LATEX_MAIN_INPUT} ${LATEX_INPUTS}) + SET(make_dvi_depends ${make_dvi_depends} ${output_dir}/${input}) + SET(make_pdf_depends ${make_pdf_depends} ${output_dir}/${input}) + ENDFOREACH(input) + + IF (LATEX_BIBFILES) + SET(make_dvi_command ${make_dvi_command} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${BIBTEX_COMPILER} ${BIBTEX_COMPILER_FLAGS} ${LATEX_TARGET}) + SET(make_pdf_command ${make_pdf_command} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${BIBTEX_COMPILER} ${BIBTEX_COMPILER_FLAGS} ${LATEX_TARGET}) + FOREACH (bibfile ${LATEX_BIBFILES}) + SET(make_dvi_depends ${make_dvi_depends} ${output_dir}/${bibfile}) + SET(make_pdf_depends ${make_pdf_depends} ${output_dir}/${bibfile}) + ENDFOREACH (bibfile ${LATEX_BIBFILES}) + ENDIF (LATEX_BIBFILES) + + IF (LATEX_USE_INDEX) + SET(make_dvi_command ${make_dvi_command} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${LATEX_COMPILER} ${LATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${MAKEINDEX_COMPILER} ${MAKEINDEX_COMPILER_FLAGS} ${LATEX_TARGET}.idx) + SET(make_pdf_command ${make_pdf_command} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${PDFLATEX_COMPILER} ${PDFLATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${MAKEINDEX_COMPILER} ${MAKEINDEX_COMPILER_FLAGS} ${LATEX_TARGET}.idx) + ENDIF (LATEX_USE_INDEX) + + IF (LATEX_USE_GLOSSARY) + SET(make_dvi_command ${make_dvi_command} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${LATEX_COMPILER} ${LATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${CMAKE_COMMAND} + -D LATEX_BUILD_COMMAND=makeglossaries + -D LATEX_TARGET=${LATEX_TARGET} + -D MAKEINDEX_COMPILER=${MAKEINDEX_COMPILER} + -D MAKEGLOSSARIES_COMPILER_FLAGS=${MAKEGLOSSARIES_COMPILER_FLAGS} + -P ${LATEX_USE_LATEX_LOCATION} + ) + SET(make_pdf_command ${make_pdf_command} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${PDFLATEX_COMPILER} ${PDFLATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${CMAKE_COMMAND} + -D LATEX_BUILD_COMMAND=makeglossaries + -D LATEX_TARGET=${LATEX_TARGET} + -D MAKEINDEX_COMPILER=${MAKEINDEX_COMPILER} + -D MAKEGLOSSARIES_COMPILER_FLAGS=${MAKEGLOSSARIES_COMPILER_FLAGS} + -P ${LATEX_USE_LATEX_LOCATION} + ) + ENDIF (LATEX_USE_GLOSSARY) + + SET(make_dvi_command ${make_dvi_command} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${LATEX_COMPILER} ${LATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${LATEX_COMPILER} ${LATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT}) + SET(make_pdf_command ${make_pdf_command} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${PDFLATEX_COMPILER} ${PDFLATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT} + COMMAND ${CMAKE_COMMAND} -E chdir ${output_dir} + ${PDFLATEX_COMPILER} ${PDFLATEX_COMPILER_FLAGS} ${LATEX_MAIN_INPUT}) + + IF (LATEX_DEFAULT_PDF) + ADD_CUSTOM_TARGET(${dvi_target} ${make_dvi_command} + DEPENDS ${make_dvi_depends}) + ELSE (LATEX_DEFAULT_PDF) + ADD_CUSTOM_TARGET(${dvi_target} ALL ${make_dvi_command} + DEPENDS ${make_dvi_depends}) + ENDIF (LATEX_DEFAULT_PDF) + + IF (PDFLATEX_COMPILER) + IF (LATEX_DEFAULT_PDF) + ADD_CUSTOM_TARGET(${pdf_target} ALL ${make_pdf_command} + DEPENDS ${make_pdf_depends}) + ELSE (LATEX_DEFAULT_PDF) + ADD_CUSTOM_TARGET(${pdf_target} ${make_pdf_command} + DEPENDS ${make_pdf_depends}) + ENDIF (LATEX_DEFAULT_PDF) + ENDIF (PDFLATEX_COMPILER) + + IF (DVIPS_CONVERTER) + ADD_CUSTOM_TARGET(${ps_target} + ${CMAKE_COMMAND} -E chdir ${output_dir} + ${DVIPS_CONVERTER} ${DVIPS_CONVERTER_FLAGS} -o ${LATEX_TARGET}.ps ${LATEX_TARGET}.dvi + ) + ADD_DEPENDENCIES(${ps_target} ${dvi_target}) + IF (PS2PDF_CONVERTER) + ADD_CUSTOM_TARGET(${safepdf_target} + ${CMAKE_COMMAND} -E chdir ${output_dir} + ${PS2PDF_CONVERTER} ${PS2PDF_CONVERTER_FLAGS} ${LATEX_TARGET}.ps ${LATEX_TARGET}.pdf + ) + ADD_DEPENDENCIES(${safepdf_target} ${ps_target}) + ENDIF (PS2PDF_CONVERTER) + ENDIF (DVIPS_CONVERTER) + + IF (LATEX2HTML_CONVERTER) + ADD_CUSTOM_TARGET(${html_target} + ${CMAKE_COMMAND} -E chdir ${output_dir} + ${LATEX2HTML_CONVERTER} ${LATEX2HTML_CONVERTER_FLAGS} ${LATEX_MAIN_INPUT} + ) + ADD_DEPENDENCIES(${html_target} ${LATEX_MAIN_INPUT} ${LATEX_INPUTS}) + ENDIF (LATEX2HTML_CONVERTER) + + ADD_CUSTOM_TARGET(${auxclean_target} + ${CMAKE_COMMAND} -E remove ${output_dir}/${LATEX_TARGET}.aux ${output_dir}/${LATEX_TARGET}.idx ${output_dir}/${LATEX_TARGET}.ind + ) +ENDMACRO(ADD_LATEX_TARGETS) + +MACRO(ADD_LATEX_DOCUMENT) + LATEX_GET_OUTPUT_PATH(output_dir) + IF (output_dir) + PARSE_ADD_LATEX_ARGUMENTS(ADD_LATEX_DOCUMENT ${ARGV}) + + LATEX_COPY_INPUT_FILE(${LATEX_MAIN_INPUT}) + + FOREACH (bib_file ${LATEX_BIBFILES}) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${bib_file} + ${output_dir}/${bib_file} + COPYONLY) + ADD_CUSTOM_COMMAND(OUTPUT ${output_dir}/${bib_file} + COMMAND ${CMAKE_COMMAND} + ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${bib_file} ${output_dir}/${bib_file} + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${bib_file} + ) + ENDFOREACH (bib_file) + + FOREACH (input ${LATEX_INPUTS}) + LATEX_COPY_INPUT_FILE(${input}) + ENDFOREACH(input) + + LATEX_COPY_GLOBBED_FILES(${CMAKE_CURRENT_SOURCE_DIR}/*.cls ${output_dir}) + LATEX_COPY_GLOBBED_FILES(${CMAKE_CURRENT_SOURCE_DIR}/*.bst ${output_dir}) + LATEX_COPY_GLOBBED_FILES(${CMAKE_CURRENT_SOURCE_DIR}/*.clo ${output_dir}) + LATEX_COPY_GLOBBED_FILES(${CMAKE_CURRENT_SOURCE_DIR}/*.sty ${output_dir}) + + ADD_LATEX_TARGETS(${ARGV}) + ENDIF (output_dir) +ENDMACRO(ADD_LATEX_DOCUMENT) + +############################################################################# +# Actually do stuff +############################################################################# + +IF (LATEX_BUILD_COMMAND) + SET(command_handled) + + IF ("${LATEX_BUILD_COMMAND}" STREQUAL makeglossaries) + LATEX_MAKEGLOSSARIES() + SET(command_handled TRUE) + ENDIF ("${LATEX_BUILD_COMMAND}" STREQUAL makeglossaries) + + IF (NOT command_handled) + MESSAGE(SEND_ERROR "Unknown command: ${LATEX_BUILD_COMMAND}") + ENDIF (NOT command_handled) + +ELSE (LATEX_BUILD_COMMAND) + # Must be part of the actual configure (included from CMakeLists.txt). + LATEX_SETUP_VARIABLES() +ENDIF (LATEX_BUILD_COMMAND) Modified: trunk/spark/doc/CMakeLists.txt =================================================================== --- trunk/spark/doc/CMakeLists.txt 2009-01-20 16:13:20 UTC (rev 23) +++ trunk/spark/doc/CMakeLists.txt 2009-01-21 08:27:33 UTC (rev 24) @@ -1,32 +1,40 @@ add_subdirectory(devel) +find_package(Doxygen) +find_package(Perl) -########### install files ############### +if (DOXYGEN_DOT_EXECUTABLE) + set(HAVE_DOT "YES") +else (DOXYGEN_DOT_EXECUTABLE) + set(HAVE_DOT "NO") +endif (DOXYGEN_DOT_EXECUTABLE) +if (PERL_FOUND) + set(PERL ${PERL_EXECUTABLE}) +else (PERL_FOUND) + set(PERL "perl") +endif (PERL_FOUND) +if (DOXYGEN_EXECUTABLE) + # variables needed by Doxyfile.in + set(PACKAGE ${CMAKE_PROJECT_NAME}) + set(VERSION ${PACKAGE_VERSION}) + set(top_srcdir ${CMAKE_SOURCE_DIR}) + set(top_builddir ${CMAKE_BINARY_DIR}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in + ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) -#original Makefile.am contents follow: + add_custom_target(doc rm -rf api COMMAND mkdir -p api/developers + COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/devel/howtos/*.* api/developers/ + COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile) -#SUBDIRS = devel -# -#all-local: -#if DOXYGEN -# @echo "***" -# @echo "*** To (re-)build the Doxygen API documentation, use 'make doc'" -# @echo "***" -#endif -# -#doc: Doxyfile -# rm -rf $(srcdir)/api/developers -# mkdir -p $(srcdir)/api/developers -# cp $(srcdir)/devel/howtos/*.* $(srcdir)/api/developers/ -#if DOXYGEN -# doxygen Doxyfile -#else -# touch $(srcdir)/api/index.html -#endif -# -#maintainer-clean-local: -# rm -rf api -# rm -rf *~ + set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "api") + +endif (DOXYGEN_EXECUTABLE) + +add_custom_target(comment ALL echo '***' + COMMAND echo '*** To \(re-\)build the Doxygen API documentation, use \"make +doc\"' + COMMAND echo '***') + Modified: trunk/spark/doc/Doxyfile.in =================================================================== --- trunk/spark/doc/Doxyfile.in 2009-01-20 16:13:20 UTC (rev 23) +++ trunk/spark/doc/Doxyfile.in 2009-01-21 08:27:33 UTC (rev 24) @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- PROJECT_NAME = @PACKAGE@ PROJECT_NUMBER = @VERSION@ -OUTPUT_DIRECTORY = @top_srcdir@/doc/ +OUTPUT_DIRECTORY = @top_builddir@/doc/ OUTPUT_LANGUAGE = English USE_WINDOWS_ENCODING = NO EXTRACT_ALL = YES Modified: trunk/spark/doc/devel/CMakeLists.txt =================================================================== --- trunk/spark/doc/devel/CMakeLists.txt 2009-01-20 16:13:20 UTC (rev 23) +++ trunk/spark/doc/devel/CMakeLists.txt 2009-01-21 08:27:33 UTC (rev 24) @@ -1,32 +1,10 @@ -add_subdirectory(howtos) +find_package(LATEX) +if (PDFLATEX_COMPILER AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/manual.tex) + include(../../cmake/UseLATEX.cmake) + add_latex_document(manual.tex INPUTS conventions.tex introduction.tex + rsg.tex definitions.tex manual.tex zeitgeist.tex DEFAULT_PDF) +endif (PDFLATEX_COMPILER AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/manual.tex) -########### install files ############### - - - - -#original Makefile.am contents follow: - -#SUBDIRS = howtos -# -#if COND_PDFLATEX -#%.toc: %.tex -# touch $@ -# pdflatex $< -# -#%.pdf: %.tex %.toc -# pdflatex $< -# -#all-local: -# @if test -f manual.tex; then \ -# $(MAKE) $(AM_MAKEFLAGS) manual.pdf ; \ -# else \ -# echo "***" ;\ -# echo "*** There is no developers manual yet. Please consider contributing to it." ; \ -# echo "***" ; \ -# fi -# -#EXTRA_DIST = manual.pdf -#CLEANFILES = manual.log manual.pdf manual.aux manual.toc -#endif +set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES + "definitions.aux;manual.log;manual.pdf;manual.aux;manual.out;manual.toc") Deleted: trunk/spark/doc/devel/howtos/CMakeLists.txt =================================================================== --- trunk/spark/doc/devel/howtos/CMakeLists.txt 2009-01-20 16:13:20 UTC (rev 23) +++ trunk/spark/doc/devel/howtos/CMakeLists.txt 2009-01-21 08:27:33 UTC (rev 24) @@ -1,28 +0,0 @@ - -########### install files ############### - - - - -#original Makefile.am contents follow: - -#EXTRA_DIST = README \ -#fileserver.html \ -#highlight.css \ -#howto_agent.html \ -#howto_class.html \ -#howto_control.html \ -#howto_effector.html \ -#howto_export.html \ -#howto_function.html \ -#howto_perceptor.html \ -#howto_register.html \ -#howto_script.html \ -#howto_simulation.html \ -#howtos.html \ -#implementation.html \ -#logserver.html \ -#menu.html \ -#scriptserver.html \ -#welcome.html \ -#examplesrc/survivalcontrolaspect.cpp.html Modified: trunk/spark/lib/kerosin/CMakeLists.txt =================================================================== --- trunk/spark/lib/kerosin/CMakeLists.txt 2009-01-20 16:13:20 UTC (rev 23) +++ trunk/spark/lib/kerosin/CMakeLists.txt 2009-01-21 08:27:33 UTC (rev 24) @@ -139,4 +139,4 @@ ${BINDIR} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) install(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/kerosin - FILES_MATCHING PATTERN "*.h") + FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE) Modified: trunk/spark/lib/oxygen/CMakeLists.txt =================================================================== --- trunk/spark/lib/oxygen/CMakeLists.txt 2009-01-20 16:13:20 UTC (rev 23) +++ trunk/spark/lib/oxygen/CMakeLists.txt 2009-01-21 08:27:33 UTC (rev 24) @@ -237,5 +237,5 @@ PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) install(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/oxygen - FILES_MATCHING PATTERN "*.h") + FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE) Modified: trunk/spark/lib/salt/CMakeLists.txt =================================================================== --- trunk/spark/lib/salt/CMakeLists.txt 2009-01-20 16:13:20 UTC (rev 23) +++ trunk/spark/lib/salt/CMakeLists.txt 2009-01-21 08:27:33 UTC (rev 24) @@ -40,7 +40,7 @@ ########### install files ############### install(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/salt - FILES_MATCHING PATTERN "*.h") + FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/salt-config DESTINATION ${BINDIR} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) Modified: trunk/spark/lib/zeitgeist/CMakeLists.txt =================================================================== --- trunk/spark/lib/zeitgeist/CMakeLists.txt 2009-01-20 16:13:20 UTC (rev 23) +++ trunk/spark/lib/zeitgeist/CMakeLists.txt 2009-01-21 08:27:33 UTC (rev 24) @@ -74,6 +74,6 @@ DESTINATION ${BINDIR} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE) install(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/zeitgeist - FILES_MATCHING PATTERN "*.h") + FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE) Modified: trunk/spark/utility/rcssnet/CMakeLists.txt =================================================================== --- trunk/spark/utility/rcssnet/CMakeLists.txt 2009-01-20 16:13:20 UTC (rev 23) +++ trunk/spark/utility/rcssnet/CMakeLists.txt 2009-01-21 08:27:33 UTC (rev 24) @@ -33,4 +33,4 @@ ########### install files ############### install(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/${CMAKE_PROJECT_NAME}/rcssnet - FILES_MATCHING PATTERN "*.hpp") + FILES_MATCHING PATTERN "*.hpp" PATTERN ".svn" EXCLUDE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yx...@us...> - 2009-01-22 11:22:00
|
Revision: 30 http://simspark.svn.sourceforge.net/simspark/?rev=30&view=rev Author: yxu Date: 2009-01-22 11:21:46 +0000 (Thu, 22 Jan 2009) Log Message: ----------- add imageperceptor, but it can not send image to agent at present Modified Paths: -------------- trunk/spark/configure.ac trunk/spark/lib/kerosin/renderserver/baserenderserver.h trunk/spark/lib/kerosin/renderserver/renderserver.h trunk/spark/plugin/CMakeLists.txt trunk/spark/plugin/Makefile.am Added Paths: ----------- trunk/spark/plugin/imageperceptor/ trunk/spark/plugin/imageperceptor/CMakeLists.txt trunk/spark/plugin/imageperceptor/Makefile.am trunk/spark/plugin/imageperceptor/Makefile.in trunk/spark/plugin/imageperceptor/export.cpp trunk/spark/plugin/imageperceptor/imageperceptor.cpp trunk/spark/plugin/imageperceptor/imageperceptor.h trunk/spark/plugin/imageperceptor/imageperceptor_c.cpp Modified: trunk/spark/configure.ac =================================================================== --- trunk/spark/configure.ac 2009-01-22 10:40:16 UTC (rev 29) +++ trunk/spark/configure.ac 2009-01-22 11:21:46 UTC (rev 30) @@ -170,6 +170,7 @@ plugin/openglsyswx/Makefile \ plugin/sparkmonitor/Makefile \ plugin/sparkagent/Makefile \ + plugin/imageperceptor/Makefile \ test/Makefile \ test/coretest/Makefile \ test/fonttest/Makefile \ Modified: trunk/spark/lib/kerosin/renderserver/baserenderserver.h =================================================================== --- trunk/spark/lib/kerosin/renderserver/baserenderserver.h 2009-01-22 10:40:16 UTC (rev 29) +++ trunk/spark/lib/kerosin/renderserver/baserenderserver.h 2009-01-22 11:21:46 UTC (rev 30) @@ -59,6 +59,16 @@ //! get a shot of the current frame virtual bool CopyFrame(char* /* buffer */) const { return false; } + void SetCamera( boost::shared_ptr<oxygen::Camera> c ) + { + mCamera = c; + } + + boost::shared_ptr<oxygen::Camera> GetCamera() + { + return mCamera; + } + protected: /** get the active scene node from the sceneServer */ virtual bool GetActiveScene(); @@ -81,6 +91,9 @@ /** reference to the SceneServer */ CachedPath<oxygen::SceneServer> mSceneServer; + + /** the currently selected camera */ + boost::shared_ptr<oxygen::Camera> mCamera; }; DECLARE_ABSTRACTCLASS(BaseRenderServer); Modified: trunk/spark/lib/kerosin/renderserver/renderserver.h =================================================================== --- trunk/spark/lib/kerosin/renderserver/renderserver.h 2009-01-22 10:40:16 UTC (rev 29) +++ trunk/spark/lib/kerosin/renderserver/renderserver.h 2009-01-22 11:21:46 UTC (rev 30) @@ -123,7 +123,7 @@ // protected: /** reference to the SceneServer */ - CachedPath<oxygen::SceneServer> mSceneServer; + //CachedPath<oxygen::SceneServer> mSceneServer; /** the OpenGL ambient clear color */ RGBA mAmbientColor; @@ -143,9 +143,6 @@ double mPickRange; /** the picked result node */ boost::weak_ptr<RenderNode> mPickedNode; - - /** the currently selected camera */ - boost::shared_ptr<oxygen::Camera> mCamera; }; DECLARE_CLASS(RenderServer); Modified: trunk/spark/plugin/CMakeLists.txt =================================================================== --- trunk/spark/plugin/CMakeLists.txt 2009-01-22 10:40:16 UTC (rev 29) +++ trunk/spark/plugin/CMakeLists.txt 2009-01-22 11:21:46 UTC (rev 30) @@ -18,3 +18,4 @@ add_subdirectory(soundsystemfmod) add_subdirectory(inputwx) add_subdirectory(openglsyswx) +add_subdirectory(imageperceptor) Modified: trunk/spark/plugin/Makefile.am =================================================================== --- trunk/spark/plugin/Makefile.am 2009-01-22 10:40:16 UTC (rev 29) +++ trunk/spark/plugin/Makefile.am 2009-01-22 11:21:46 UTC (rev 30) @@ -16,7 +16,8 @@ sceneeffector\ soundsystemfmod \ inputwx \ - openglsyswx + openglsyswx \ + imageperceptor # filesystemrar # soundsystembass Added: trunk/spark/plugin/imageperceptor/CMakeLists.txt =================================================================== --- trunk/spark/plugin/imageperceptor/CMakeLists.txt (rev 0) +++ trunk/spark/plugin/imageperceptor/CMakeLists.txt 2009-01-22 11:21:46 UTC (rev 30) @@ -0,0 +1,16 @@ + +########### next target ############### + +set(imageperceptor_LIB_SRCS + export.cpp + imageperceptor.h + imageperceptor.cpp + imageperceptor_c.cpp +) + +add_library(imageperceptor MODULE ${imageperceptor_LIB_SRCS}) + +target_link_libraries(imageperceptor) + +set_target_properties(imageperceptor PROPERTIES VERSION 0.0.0 SOVERSION 0) +install(TARGETS imageperceptor DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) Added: trunk/spark/plugin/imageperceptor/Makefile.am =================================================================== --- trunk/spark/plugin/imageperceptor/Makefile.am (rev 0) +++ trunk/spark/plugin/imageperceptor/Makefile.am 2009-01-22 11:21:46 UTC (rev 30) @@ -0,0 +1,12 @@ +pkglib_LTLIBRARIES = imageperceptor.la + +imageperceptor_la_SOURCES = export.cpp \ + imageperceptor.h \ + imageperceptor.cpp \ + imageperceptor_c.cpp + +# -module tells automake we're not building a library but a loadable module +# so we don't need the "lib" prefix in the module name +imageperceptor_la_LDFLAGS = -module -version-info 0:0:0 + +AM_CPPFLAGS = -I${top_srcdir}/lib @RUBY_CPPFLAGS@ Added: trunk/spark/plugin/imageperceptor/Makefile.in =================================================================== --- trunk/spark/plugin/imageperceptor/Makefile.in (rev 0) +++ trunk/spark/plugin/imageperceptor/Makefile.in 2009-01-22 11:21:46 UTC (rev 30) @@ -0,0 +1,543 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugin/imageperceptor +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/sparkconfig.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pkglibdir)" +pkglibLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(pkglib_LTLIBRARIES) +imageperceptor_la_LIBADD = +am_imageperceptor_la_OBJECTS = export.lo imageperceptor.lo \ + imageperceptor_c.lo +imageperceptor_la_OBJECTS = $(am_imageperceptor_la_OBJECTS) +imageperceptor_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(imageperceptor_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config.aux/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(imageperceptor_la_SOURCES) +DIST_SOURCES = $(imageperceptor_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BOOST_THREADS_LIB = @BOOST_THREADS_LIB@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEVIL = @DEVIL@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FREETYPE = @FREETYPE@ +FREETYPE_CPPFLAGS = @FREETYPE_CPPFLAGS@ +FREETYPE_LIBADD = @FREETYPE_LIBADD@ +GLDIR = @GLDIR@ +GLTARGET = @GLTARGET@ +GL_LDFLAGS = @GL_LDFLAGS@ +GL_LIBADD = @GL_LIBADD@ +GREP = @GREP@ +HAVE_DOT = @HAVE_DOT@ +IL_LDFLAGS = @IL_LDFLAGS@ +IL_LIBADD = @IL_LIBADD@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NET_LIBS = @NET_LIBS@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +ODE = @ODE@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PDFLATEX = @PDFLATEX@ +PERL = @PERL@ +RANLIB = @RANLIB@ +RUBY = @RUBY@ +RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ +RUBY_LDADD = @RUBY_LDADD@ +RUBY_LDFLAGS = @RUBY_LDFLAGS@ +SALT_LIBADD = @SALT_LIBADD@ +SDL = @SDL@ +SDLCONFIG = @SDLCONFIG@ +SDL_CPPFLAGS = @SDL_CPPFLAGS@ +SDL_LDFLAGS = @SDL_LDFLAGS@ +SDL_LIBADD = @SDL_LIBADD@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPADES = @SPADES@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WX_CFLAGS = @WX_CFLAGS@ +WX_CFLAGS_ONLY = @WX_CFLAGS_ONLY@ +WX_CONFIG_PATH = @WX_CONFIG_PATH@ +WX_CPPFLAGS = @WX_CPPFLAGS@ +WX_CXXFLAGS = @WX_CXXFLAGS@ +WX_CXXFLAGS_ONLY = @WX_CXXFLAGS_ONLY@ +WX_LIBS = @WX_LIBS@ +WX_LIBS_STATIC = @WX_LIBS_STATIC@ +WX_VERSION = @WX_VERSION@ +XMKMF = @XMKMF@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +bundle_support = @bundle_support@ +datadir = @datadir@ +datarootdir = @datarootdir@ +debug = @debug@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +kerosin_version = @kerosin_version@ +kerosin_version_info = @kerosin_version_info@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +oxygen_version = @oxygen_version@ +oxygen_version_info = @oxygen_version_info@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +rcssnet3D_version = @rcssnet3D_version@ +rcssnet3D_version_info = @rcssnet3D_version_info@ +salt_version = @salt_version@ +salt_version_info = @salt_version_info@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +spark_version = @spark_version@ +spark_version_info = @spark_version_info@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +zeitgeist_version = @zeitgeist_version@ +zeitgeist_version_info = @zeitgeist_version_info@ +pkglib_LTLIBRARIES = imageperceptor.la +imageperceptor_la_SOURCES = export.cpp \ + imageperceptor.h \ + imageperceptor.cpp \ + imageperceptor_c.cpp + + +# -module tells automake we're not building a library but a loadable module +# so we don't need the "lib" prefix in the module name +imageperceptor_la_LDFLAGS = -module -version-info 0:0:0 +AM_CPPFLAGS = -I${top_srcdir}/lib @RUBY_CPPFLAGS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugin/imageperceptor/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugin/imageperceptor/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \ + else :; fi; \ + done + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +imageperceptor.la: $(imageperceptor_la_OBJECTS) $(imageperceptor_la_DEPENDENCIES) + $(imageperceptor_la_LINK) -rpath $(pkglibdir) $(imageperceptor_la_OBJECTS) $(imageperceptor_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/export.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imageperceptor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imageperceptor_c.Plo@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ mv -f $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ mv -f $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ mv -f $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkglibLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Added: trunk/spark/plugin/imageperceptor/export.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/export.cpp (rev 0) +++ trunk/spark/plugin/imageperceptor/export.cpp 2009-01-22 11:21:46 UTC (rev 30) @@ -0,0 +1,26 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "imageperceptor.h" +#include <zeitgeist/zeitgeist.h> + +ZEITGEIST_EXPORT_BEGIN() + ZEITGEIST_EXPORT(ImagePerceptor); +ZEITGEIST_EXPORT_END() Added: trunk/spark/plugin/imageperceptor/imageperceptor.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor.cpp (rev 0) +++ trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2009-01-22 11:21:46 UTC (rev 30) @@ -0,0 +1,210 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +// #include <IL/il.h> +// #include <IL/ilu.h> +// #include <sstream> +#include <GL/gl.h> +#include "imageperceptor.h" +#include <zeitgeist/logserver/logserver.h> + +#define USE_FBO + +// using namespace kerosin; +using namespace oxygen; +using namespace boost; +using namespace zeitgeist; +using namespace salt; +using namespace std; + +ImagePerceptor::ImagePerceptor() : oxygen::Perceptor() +{ + mFramesRendered = 0; +} + +ImagePerceptor::~ImagePerceptor() +{ +} + +#define REG_GL_EXT_FUN(_ptr, _function) \ + static _ptr _function = (_ptr) mOpenGLServer->GetExtension(#_function); \ + if ( !_function ){ \ + GetLog()->Error()<<"(Image Perceptor) ERROR: can not get "#_function"\n"; \ + } + +void ImagePerceptor::OnLink() +{ + mCamera = shared_dynamic_cast<Camera>( GetCore()->New("oxygen/Camera") ); + if ( 0 != mCamera.get() ) + { + AddChildReference(mCamera); + } + else + { + GetLog()->Error() + <<"(ImagePerceptor) ERROR: can not create camera\n"; + } + + RegisterCachedPath(mRenderServer, "/sys/server/render"); + + if (mRenderServer.expired()) + { + GetLog()->Error() + << "(ImagePerceptor) ERROR: RenderServer not found\n"; + } + + RegisterCachedPath(mOpenGLServer,"/sys/server/opengl"); + + if (mOpenGLServer.expired()) + { + GetLog()->Error() + << "(ImagePerceptor) ERROR: OpenGLServer not found\n"; + } + + // create a framebuffer object + REG_GL_EXT_FUN( PFNGLGENFRAMEBUFFERSEXTPROC, glGenFramebuffersEXT ); + REG_GL_EXT_FUN( PFNGLGENRENDERBUFFERSEXTPROC, glGenRenderbuffersEXT); + + glGenFramebuffersEXT(1, &mFBOId); + glGenRenderbuffersEXT(1, &mRBOId); + glGenRenderbuffersEXT(1, &mDepthBuffer); + +} + +void ImagePerceptor::OnUnlink() +{ + REG_GL_EXT_FUN( PFNGLDELETEFRAMEBUFFERSEXTPROC, glDeleteFramebuffersEXT ); + REG_GL_EXT_FUN( PFNGLDELETERENDERBUFFERSEXTPROC, glDeleteRenderbuffersEXT ); + glDeleteFramebuffersEXT(1, &mFBOId); + glDeleteRenderbuffersEXT(1, &mRBOId); +} + +bool ImagePerceptor::Percept(boost::shared_ptr<PredicateList> predList) +{ + if ( !Render() ) + return false; + + Predicate &predicate = predList->AddPredicate(); + predicate.name = "Image"; + predicate.parameter.Clear(); + + // ParameterList &sizeElement = predicate.parameter.AddList(); + // sizeElement.AddValue(std::string("s")); + // sizeElement.AddValue(mCamera->GetViewportWidth()); + // sizeElement.AddValue(mCamera->GetViewportHeight()); + + predicate.parameter.AddValue(mData); + return true; +} + +bool ImagePerceptor::Render() +{ + if ( + (mOpenGLServer.expired()) || + (mRenderServer.expired()) + ) + { + return false; + } + + int w = mCamera->GetViewportWidth(); + int h = mCamera->GetViewportHeight(); + +#ifdef USE_FBO + REG_GL_EXT_FUN( PFNGLBINDFRAMEBUFFEREXTPROC, glBindFramebufferEXT ); + REG_GL_EXT_FUN( PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC, glFramebufferRenderbufferEXT ); + REG_GL_EXT_FUN( PFNGLRENDERBUFFERSTORAGEEXTPROC, glRenderbufferStorageEXT ); + REG_GL_EXT_FUN( PFNGLBINDRENDERBUFFEREXTPROC, glBindRenderbufferEXT); + REG_GL_EXT_FUN( PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC, glCheckFramebufferStatusEXT ); + + + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mFBOId); + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mRBOId); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, w, h); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, + GL_RENDERBUFFER_EXT, mRBOId); + + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mDepthBuffer); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, w, h); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, mDepthBuffer); + + + // check FBO status + GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); + if(status != GL_FRAMEBUFFER_COMPLETE_EXT){ + GetLog()->Error()<<"fbo error!\n"; + } +#endif + + // setup the camera + boost::shared_ptr<Camera> oldCamera = mRenderServer->GetCamera(); + mRenderServer->SetCamera(mCamera); + mRenderServer->Render(); + +#ifdef USE_FBO +#else + glReadBuffer(GL_BACK); +#endif + int size = 3*w*h; + if ( mData.size() != size ) + mData.resize(size); + glReadPixels(0, 0, + w, h, + GL_RGB, + GL_UNSIGNED_BYTE, + const_cast<char*>(mData.data())); + + ++mFramesRendered; +#ifdef USE_FBO + // unbind FBO + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); +#endif + mRenderServer->SetCamera(oldCamera); + + return true; +} + +void ImagePerceptor::SetViewport(unsigned int x, unsigned int y, unsigned int w, unsigned int h) +{ + if ( 0!= mCamera ){ + mCamera->SetViewport(x,y,w,h); + } +} + +void ImagePerceptor::SetFOV(float fov) +{ + if ( 0!= mCamera ){ + mCamera->SetFOV(fov); + } +} + +void ImagePerceptor::SetZNear(float zNear) +{ + if ( 0!= mCamera ){ + mCamera->SetZNear(zNear); + } +} + +void ImagePerceptor::SetZFar(float zFar) +{ + if ( 0!= mCamera ){ + mCamera->SetZFar(zFar); + } +} Added: trunk/spark/plugin/imageperceptor/imageperceptor.h =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor.h (rev 0) +++ trunk/spark/plugin/imageperceptor/imageperceptor.h 2009-01-22 11:21:46 UTC (rev 30) @@ -0,0 +1,73 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef IMAGEPERCEPTOR_H +#define IMAGEPERCEPTOR_H + +#include <oxygen/agentaspect/perceptor.h> +#include <oxygen/sceneserver/camera.h> +#include <oxygen/sceneserver/sceneserver.h> +#include <kerosin/renderserver/baserenderserver.h> +#include <kerosin/openglserver/openglserver.h> + +class ImagePerceptor : public oxygen::Perceptor +{ +public: + ImagePerceptor(); + virtual ~ImagePerceptor(); + + //! \return true, if valid data is available and false otherwise. + bool Percept(boost::shared_ptr<oxygen::PredicateList> predList); + + bool Render(); + + virtual void OnLink(); + virtual void OnUnlink(); + + void SetViewport(unsigned int x, unsigned int y, unsigned int w, unsigned int h); + + void SetFOV(float fov); + + void SetZNear(float zNear); + + void SetZFar(float zFar); + +private: + boost::shared_ptr<oxygen::Camera> mCamera; + + /** cached reference to the RenderServer */ + CachedPath<kerosin::BaseRenderServer> mRenderServer; + + /** cached reference to the OpenGLServer */ + CachedPath<kerosin::OpenGLServer> mOpenGLServer; + + /** total frames rendered */ + int mFramesRendered; + + std::string mData; + + unsigned int mFBOId; + unsigned int mRBOId; + unsigned int mDepthBuffer; +}; + +DECLARE_CLASS(ImagePerceptor); + +#endif //IMAGEPERCEPTOR_H Added: trunk/spark/plugin/imageperceptor/imageperceptor_c.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor_c.cpp (rev 0) +++ trunk/spark/plugin/imageperceptor/imageperceptor_c.cpp 2009-01-22 11:21:46 UTC (rev 30) @@ -0,0 +1,100 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "imageperceptor.h" + +using namespace boost; +using namespace oxygen; + +FUNCTION(ImagePerceptor, setViewport) +{ + unsigned int x,y,w,h; + + if ( + (in.GetSize() != 4) || + (! in.GetValue(in[0], x) ) || + (! in.GetValue(in[1], y) ) || + (! in.GetValue(in[2], w) ) || + (! in.GetValue(in[3], h) ) + ) + { + return false; + } + + obj->SetViewport(x, y, w, h); + return true; +} + +FUNCTION(ImagePerceptor, setFOV) +{ + float fov; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in[0], fov) ) + ) + { + return false; + } + + obj->SetFOV(fov); + return true; +} + +FUNCTION(ImagePerceptor, setZNear) +{ + float zNear; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in[0], zNear) ) + ) + { + return false; + } + + obj->SetZNear(zNear); + return true; +} + +FUNCTION(ImagePerceptor, setZFar) +{ + float zFar; + + if ( + (in.GetSize() != 1) || + (! in.GetValue(in[0], zFar) ) + ) + { + return false; + } + + obj->SetZFar(zFar); + return true; +} + +void CLASS(ImagePerceptor)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/Perceptor); + DEFINE_FUNCTION(setViewport); + DEFINE_FUNCTION(setFOV); + DEFINE_FUNCTION(setZNear); + DEFINE_FUNCTION(setZFar); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-02-06 02:05:29
|
Revision: 41 http://simspark.svn.sourceforge.net/simspark/?rev=41&view=rev Author: marianbuchta Date: 2009-02-06 02:05:26 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Added paths to check for Windows libraries Added #define HAVE_IL_IL_H 1 Added include SDL header files because Windows version of SDL library has header files in "include" directory not in "SDL" directory Modified Paths: -------------- trunk/spark/cmake/FindDevIL.cmake trunk/spark/cmake/FindODE.cmake trunk/spark/plugin/inputsdl/inputdevicesdl.h trunk/spark/plugin/inputsdl/inputsystemsdl.cpp trunk/spark/plugin/inputsdl/inputsystemsdl.h trunk/spark/plugin/openglsyssdl/openglsystemsdl.cpp trunk/spark/test/fonttest/main.cpp trunk/spark/test/inputtest/main.cpp trunk/spark/test/scenetest/main.cpp trunk/spark/windows/sparkconfig.h Added Paths: ----------- trunk/spark/cmake/FindBoost.cmake trunk/spark/cmake/FindFreetype.cmake trunk/spark/cmake/FindRuby.cmake trunk/spark/cmake/FindSDL.cmake Added: trunk/spark/cmake/FindBoost.cmake =================================================================== --- trunk/spark/cmake/FindBoost.cmake (rev 0) +++ trunk/spark/cmake/FindBoost.cmake 2009-02-06 02:05:26 UTC (rev 41) @@ -0,0 +1,640 @@ +# - Try to find Boost include dirs and libraries +# Usage of this module as follows: +# +# SET(Boost_USE_STATIC_LIBS ON) +# SET(Boost_USE_MULTITHREAD OFF) +# FIND_PACKAGE( Boost 1.34.1 COMPONENTS date_time filesystem iostreams ... ) +# +# The Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of +# boost version numbers that should be taken into account when searching +# for the libraries. Unfortunately boost puts the version number into the +# actual filename for the libraries, so this might be needed in the future +# when new Boost versions are released. +# +# Currently this module searches for the following version numbers: +# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, 1.36, +# 1.36.0, 1.36.1 +# +# The components list needs to be the actual names of boost libraries, that is +# the part of the actual library files that differ on different libraries. So +# its "date_time" for "libboost_date_time...". Anything else will result in +# errors +# +# You can provide a minimum version number that should be used. If you provide this +# version number and specify the REQUIRED attribute, this module will fail if it +# can't find the specified or a later version. If you specify a version number this is +# automatically put into the considered list of version numbers and thus doesn't need +# to be specified in the Boost_ADDITIONAL_VERSIONS variable +# +# Variables used by this module, they can change the default behaviour and need to be set +# before calling find_package: +# Boost_USE_MULTITHREAD Can be set to OFF to use the non-multithreaded +# boost libraries. Defaults to ON. +# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static +# boost libraries. Defaults to OFF. +# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching +# the boost include directory. The default list +# of version numbers is: +# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, +# 1.35, 1.35.0, 1.35.1, 1.36, 1.36.0, 1.36.1 +# If you want to look for an older or newer +# version set this variable to a list of +# strings, where each string contains a number, i.e. +# SET(Boost_ADDITIONAL_VERSIONS "0.99.0" "1.35.0") +# BOOST_ROOT or BOOSTROOT Preferred installation prefix for searching for Boost, +# set this if the module has problems finding the proper Boost installation +# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the +# module has problems finding the proper Boost installation +# BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the +# module has problems finding the proper Boost installation +# +# The last three variables are available also as environment variables +# +# +# Variables defined by this module: +# +# Boost_FOUND System has Boost, this means the include dir was found, +# as well as all the libraries specified in the COMPONENTS list +# Boost_INCLUDE_DIRS Boost include directories, not cached +# Boost_INCLUDE_DIR This is almost the same as above, but this one is cached and may be +# modified by advanced users +# Boost_LIBRARIES Link these to use the Boost libraries that you specified, not cached +# Boost_LIBRARY_DIRS The path to where the Boost library files are. +# Boost_VERSION The version number of the boost libraries that have been found, +# same as in version.hpp from Boost +# Boost_LIB_VERSION The version number in filename form as its appended to the library filenames +# Boost_MAJOR_VERSION major version number of boost +# Boost_MINOR_VERSION minor version number of boost +# Boost_SUBMINOR_VERSION subminor version number of boost +# Boost_LIB_DIAGNOSTIC_DEFINITIONS Only set on windows. Can be used with add_definitions +# to print diagnostic information about the automatic +# linking done on windows. + +# For each component you list the following variables are set. +# ATTENTION: The component names need to be in lower case, just as the boost +# library names however the cmake variables use upper case for the component +# part. So you'd get Boost_SERIALIZATION_FOUND for example. +# +# Boost_${COMPONENT}_FOUND True IF the Boost library "component" was found. +# Boost_${COMPONENT}_LIBRARY The absolute path of the Boost library "component". +# Boost_${COMPONENT}_LIBRARY_DEBUG The absolute path of the debug version of the +# Boost library "component". +# Boost_${COMPONENT}_LIBRARY_RELEASE The absolute path of the release version of the +# Boost library "component" +# +# Copyright (c) 2006-2008 Andreas Schneider <ma...@cy...> +# Copyright (c) 2007 Wengo +# Copyright (c) 2007 Mike Jackson +# Copyright (c) 2008 Andreas Pakulat <ap...@gm...> +# +# Redistribution AND use is allowed according to the terms of the New +# BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# +OPTION(Boost_USE_MULTITHREADED + "Use the multithreaded versions of the Boost libraries" ON) + +if (Boost_FIND_VERSION_EXACT) + if (Boost_FIND_VERSION_PATCH) + set( _boost_TEST_VERSIONS + "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}") + else (Boost_FIND_VERSION_PATCH) + set( _boost_TEST_VERSIONS + "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.0" + "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") + endif (Boost_FIND_VERSION_PATCH) +else (Boost_FIND_VERSION_EXACT) + set( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} + "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" + "1.34" "1.33.1" "1.33.0" "1.33" ) +endif (Boost_FIND_VERSION_EXACT) + +# The reason that we failed to find Boost. This will be set to a +# user-friendly message when we fail to find some necessary piece of +# Boost. +set(Boost_ERROR_REASON) + +############################################ +# +# Check the existence of the libraries. +# +############################################ +# This macro was taken directly from the FindQt4.cmake file that is included +# with the CMake distribution. This is NOT my work. All work was done by the +# original authors of the FindQt4.cmake file. Only minor modifications were +# made to remove references to Qt and make this file more generally applicable +######################################################################### + +MACRO (_Boost_ADJUST_LIB_VARS basename) + IF (Boost_INCLUDE_DIR ) + IF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE) + # if the generator supports configuration types then set + # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value + IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) + ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + # if there are no configuration types and CMAKE_BUILD_TYPE has no value + # then just use the release libraries + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} ) + ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) + ENDIF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE) + + # if only the release version was found, set the debug variable also to the release version + IF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG) + SET(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE}) + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE}) + SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE}) + ENDIF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG) + + # if only the debug version was found, set the release variable also to the debug version + IF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) + SET(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG}) + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG}) + SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG}) + ENDIF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) + + IF (Boost_${basename}_LIBRARY) + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library") + GET_FILENAME_COMPONENT(Boost_LIBRARY_DIRS "${Boost_${basename}_LIBRARY}" PATH) + SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory") + SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found") + ENDIF (Boost_${basename}_LIBRARY) + + ENDIF (Boost_INCLUDE_DIR ) + # Make variables changeble to the advanced user + MARK_AS_ADVANCED( + Boost_${basename}_LIBRARY + Boost_${basename}_LIBRARY_RELEASE + Boost_${basename}_LIBRARY_DEBUG + ) +ENDMACRO (_Boost_ADJUST_LIB_VARS) + +#------------------------------------------------------------------------------- + + +SET( _boost_IN_CACHE TRUE) +IF(Boost_INCLUDE_DIR) + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} COMPONENT) + IF(NOT Boost_${COMPONENT}_FOUND) + SET( _boost_IN_CACHE FALSE) + ENDIF(NOT Boost_${COMPONENT}_FOUND) + ENDFOREACH(COMPONENT) +ELSE(Boost_INCLUDE_DIR) + SET( _boost_IN_CACHE FALSE) +ENDIF(Boost_INCLUDE_DIR) + +IF (_boost_IN_CACHE) + # in cache already + SET(Boost_FOUND TRUE) + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} COMPONENT) + _Boost_ADJUST_LIB_VARS( ${COMPONENT} ) + SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${COMPONENT}_LIBRARY}) + ENDFOREACH(COMPONENT) + SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR}) + IF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") + MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") + MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") + MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") + ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") +ELSE (_boost_IN_CACHE) + # Need to search for boost + + IF(WIN32) + # In windows, automatic linking is performed, so you do not have + # to specify the libraries. If you are linking to a dynamic + # runtime, then you can choose to link to either a static or a + # dynamic Boost library, the default is to do a static link. You + # can alter this for a specific library "whatever" by defining + # BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to be + # linked dynamically. Alternatively you can force all Boost + # libraries to dynamic link by defining BOOST_ALL_DYN_LINK. + + # This feature can be disabled for Boost library "whatever" by + # defining BOOST_WHATEVER_NO_LIB, or for all of Boost by defining + # BOOST_ALL_NO_LIB. + + # If you want to observe which libraries are being linked against + # then defining BOOST_LIB_DIAGNOSTIC will cause the auto-linking + # code to emit a #pragma message each time a library is selected + # for linking. + SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS + "-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define") + ENDIF(WIN32) + + SET(_boost_INCLUDE_SEARCH_DIRS + "$ENV{ProgramFiles}/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}" + "$ENV{ProgramFiles}/Boost" + C:/library/boost + "C:/Program Files/boost" + C:/boost + /sw/local/include + ) + + SET(_boost_LIBRARIES_SEARCH_DIRS + "$ENV{ProgramFiles}/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}/lib" + "$ENV{ProgramFiles}/Boost" + C:/library/boost/stage/lib + "C:/Program Files/boost/stage/lib" + C:/boost/lib + /sw/local/lib + ) + + # If BOOST_ROOT was defined in the environment, use it. + if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") + set(BOOST_ROOT $ENV{BOOST_ROOT}) + endif(NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") + + # If BOOSTROOT was defined in the environment, use it. + if (NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "") + set(BOOST_ROOT $ENV{BOOSTROOT}) + endif(NOT BOOST_ROOT AND NOT $ENV{BOOSTROOT} STREQUAL "") + + # If BOOST_INCLUDEDIR was defined in the environment, use it. + IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) + set(BOOST_INCLUDEDIR $ENV{BOOST_INCLUDEDIR}) + ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) + + # If BOOST_LIBRARYDIR was defined in the environment, use it. + IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) + set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR}) + ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) + + IF( BOOST_ROOT ) + file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT) + SET(_boost_INCLUDE_SEARCH_DIRS + ${BOOST_ROOT}/include + ${BOOST_ROOT} + ${_boost_INCLUDE_SEARCH_DIRS}) + SET(_boost_LIBRARIES_SEARCH_DIRS + ${BOOST_ROOT}/lib + ${BOOST_ROOT}/stage/lib + ${_boost_LIBRARIES_SEARCH_DIRS}) + ENDIF( BOOST_ROOT ) + + IF( BOOST_INCLUDEDIR ) + file(TO_CMAKE_PATH ${BOOST_INCLUDEDIR} BOOST_INCLUDEDIR) + SET(_boost_INCLUDE_SEARCH_DIRS + ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS}) + ENDIF( BOOST_INCLUDEDIR ) + + IF( BOOST_LIBRARYDIR ) + file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR) + SET(_boost_LIBRARIES_SEARCH_DIRS + ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS}) + ENDIF( BOOST_LIBRARYDIR ) + + # Try to find Boost by stepping backwards through the Boost versions + # we know about. + IF( NOT Boost_INCLUDE_DIR ) + # Build a list of path suffixes for each version. + SET(_boost_PATH_SUFFIXES) + FOREACH(_boost_VER ${_boost_TEST_VERSIONS}) + # Add in a path suffix, based on the required version, ideally + # we could read this from version.hpp, but for that to work we'd + # need to know the include dir already + if (WIN32 AND NOT CYGWIN) + set(_boost_PATH_SUFFIX boost_${_boost_VER}) + else (WIN32 AND NOT CYGWIN) + set(_boost_PATH_SUFFIX boost-${_boost_VER}) + endif (WIN32 AND NOT CYGWIN) + + IF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" + _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX}) + ELSEIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" + _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX}) + ENDIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") + LIST(APPEND _boost_PATH_SUFFIXES "${_boost_PATH_SUFFIX}") + ENDFOREACH(_boost_VER) + + # Look for a standard boost header file. + FIND_PATH(Boost_INCLUDE_DIR + NAMES boost/config.hpp + HINTS ${_boost_INCLUDE_SEARCH_DIRS} + PATH_SUFFIXES ${_boost_PATH_SUFFIXES} + ) + ENDIF( NOT Boost_INCLUDE_DIR ) + + IF(Boost_INCLUDE_DIR) + # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp + # Read the whole file: + # + SET(BOOST_VERSION 0) + SET(BOOST_LIB_VERSION "") + FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS) + + STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}") + STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}") + + SET(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries") + SET(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries") + + IF(NOT "${Boost_VERSION}" STREQUAL "0") + MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") + MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") + MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") + + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}") + ENDIF(NOT "${Boost_VERSION}" STREQUAL "0") + ELSE(Boost_INCLUDE_DIR) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.") + ENDIF(Boost_INCLUDE_DIR) + + # Setting some more suffixes for the library + SET (Boost_LIB_PREFIX "") + IF ( WIN32 AND Boost_USE_STATIC_LIBS ) + SET (Boost_LIB_PREFIX "lib") + ENDIF ( WIN32 AND Boost_USE_STATIC_LIBS ) + SET (_boost_COMPILER "-gcc") + IF (MSVC90) + SET (_boost_COMPILER "-vc90") + ELSEIF (MSVC80) + SET (_boost_COMPILER "-vc80") + ELSEIF (MSVC71) + SET (_boost_COMPILER "-vc71") + ENDIF(MSVC90) + IF (MINGW) + EXEC_PROGRAM(${CMAKE_CXX_COMPILER} + ARGS -dumpversion + OUTPUT_VARIABLE _boost_COMPILER_VERSION + ) + STRING(REGEX REPLACE "([0-9])\\.([0-9])\\.[0-9]" "\\1\\2" + _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) + SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}") + ENDIF(MINGW) + IF (UNIX) + IF (NOT CMAKE_COMPILER_IS_GNUCC) + # We assume that we have the Intel compiler. + SET (_boost_COMPILER "-il") + ELSE (NOT CMAKE_COMPILER_IS_GNUCC) + # Determine which version of GCC we have. + EXEC_PROGRAM(${CMAKE_CXX_COMPILER} + ARGS -dumpversion + OUTPUT_VARIABLE _boost_COMPILER_VERSION + ) + STRING(REGEX REPLACE "([0-9])\\.([0-9])\\.[0-9]" "\\1\\2" + _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) + IF(APPLE) + IF(Boost_MINOR_VERSION) + IF(${Boost_MINOR_VERSION} GREATER 35) + # In Boost 1.36.0 and newer, the mangled compiler name used + # on Mac OS X/Darwin is "xgcc". + SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}") + ELSE(${Boost_MINOR_VERSION} GREATER 35) + # In Boost <= 1.35.0, there is no mangled compiler name for + # the Mac OS X/Darwin version of GCC. + SET(_boost_COMPILER "") + ENDIF(${Boost_MINOR_VERSION} GREATER 35) + ELSE(Boost_MINOR_VERSION) + # We don't know the Boost version, so assume it's + # pre-1.36.0. + SET(_boost_COMPILER "") + ENDIF(Boost_MINOR_VERSION) + ELSE() + SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}") + ENDIF() + ENDIF (NOT CMAKE_COMPILER_IS_GNUCC) + ENDIF(UNIX) + + SET (_boost_MULTITHREADED "-mt") + + IF( NOT Boost_USE_MULTITHREADED ) + SET (_boost_MULTITHREADED "") + ENDIF( NOT Boost_USE_MULTITHREADED ) + + SET( _boost_STATIC_TAG "") + IF (WIN32) + IF(MSVC) + SET (_boost_ABI_TAG "g") + ENDIF(MSVC) + IF( Boost_USE_STATIC_LIBS ) + SET( _boost_STATIC_TAG "-s") + ENDIF( Boost_USE_STATIC_LIBS ) + ENDIF(WIN32) + SET (_boost_ABI_TAG "${_boost_ABI_TAG}d") + + # ------------------------------------------------------------------------ + # Begin finding boost libraries + # ------------------------------------------------------------------------ + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) + SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" ) + SET( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" ) + SET( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND") + + # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES + IF( Boost_USE_STATIC_LIBS ) + SET( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + IF(WIN32) + SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + ELSE(WIN32) + SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + ENDIF(WIN32) + ENDIF( Boost_USE_STATIC_LIBS ) + + FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE + NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT} + HINTS ${_boost_LIBRARIES_SEARCH_DIRS} + ) + + FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG + NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG} + HINTS ${_boost_LIBRARIES_SEARCH_DIRS} + ) + + _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT}) + IF( Boost_USE_STATIC_LIBS ) + SET(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) + ENDIF( Boost_USE_STATIC_LIBS ) + ENDFOREACH(COMPONENT) + # ------------------------------------------------------------------------ + # End finding boost libraries + # ------------------------------------------------------------------------ + + SET(Boost_INCLUDE_DIRS + ${Boost_INCLUDE_DIR} + ) + + SET(Boost_FOUND FALSE) + IF(Boost_INCLUDE_DIR) + SET( Boost_FOUND TRUE ) + + # Check the version of Boost against the requested version. + if (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR) + message(SEND_ERROR "When requesting a specific version of Boost, you must provide at least the major and minor version numbers, e.g., 1.34") + endif (Boost_FIND_VERSION AND NOT Boost_FIND_VERSION_MINOR) + if(Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) + set( Boost_FOUND FALSE ) + set(_Boost_VERSION_AGE "old") + elseif(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) + if(Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) + set( Boost_FOUND FALSE ) + set(_Boost_VERSION_AGE "old") + elseif(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) + if( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) + set( Boost_FOUND FALSE ) + set(_Boost_VERSION_AGE "old") + endif( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) + endif( Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) + endif( Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) + + if (Boost_FOUND AND Boost_FIND_VERSION_EXACT) + # If the user requested an exact version of Boost, check + # that. We already know that the Boost version we have is >= the + # requested version. + set(_Boost_VERSION_AGE "new") + + # If the user didn't specify a patchlevel, it's 0. + if (NOT Boost_FIND_VERSION_PATCH) + set(Boost_FIND_VERSION_PATCH 0) + endif (NOT Boost_FIND_VERSION_PATCH) + + # We'll set Boost_FOUND true again if we have an exact version match. + set(Boost_FOUND FALSE) + if(Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) + if(Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) + if(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" ) + set( Boost_FOUND TRUE ) + endif(Boost_SUBMINOR_VERSION EQUAL "${Boost_FIND_VERSION_PATCH}" ) + endif( Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) + endif( Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) + endif (Boost_FOUND AND Boost_FIND_VERSION_EXACT) + + if(NOT Boost_FOUND) + # State that we found a version of Boost that is too new or too old. + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}\nDetected version of Boost is too ${_Boost_VERSION_AGE}. Requested version was ${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") + if (Boost_FIND_VERSION_PATCH) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}.${Boost_FIND_VERSION_PATCH}") + endif (Boost_FIND_VERSION_PATCH) + if (NOT Boost_FIND_VERSION_EXACT) + set(Boost_ERROR_REASON "${Boost_ERROR_REASON} (or newer)") + endif (NOT Boost_FIND_VERSION_EXACT) + set(Boost_ERROR_REASON "${Boost_ERROR_REASON}.") + endif (NOT Boost_FOUND) + + if (Boost_FOUND) + set(_boost_CHECKED_COMPONENT FALSE) + set(_Boost_MISSING_COMPONENTS) + foreach(COMPONENT ${Boost_FIND_COMPONENTS}) + string(TOUPPER ${COMPONENT} COMPONENT) + set(_boost_CHECKED_COMPONENT TRUE) + if(NOT Boost_${COMPONENT}_FOUND) + string(TOLOWER ${COMPONENT} COMPONENT) + list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT}) + set( Boost_FOUND FALSE) + endif(NOT Boost_${COMPONENT}_FOUND) + endforeach(COMPONENT) + endif (Boost_FOUND) + + if (_Boost_MISSING_COMPONENTS) + # We were unable to find some libraries, so generate a sensible + # error message that lists the libraries we were unable to find. + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}\nThe following Boost libraries could not be found:\n") + foreach(COMPONENT ${_Boost_MISSING_COMPONENTS}) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON} boost_${COMPONENT}\n") + endforeach(COMPONENT) + + list(LENGTH Boost_FIND_COMPONENTS Boost_NUM_COMPONENTS_WANTED) + list(LENGTH _Boost_MISSING_COMPONENTS Boost_NUM_MISSING_COMPONENTS) + if (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}No Boost libraries were found. You may need to set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") + else (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) + set(Boost_ERROR_REASON + "${Boost_ERROR_REASON}Some (but not all) of the required Boost libraries were found. You may need to install these additional Boost libraries. Alternatively, set Boost_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost.") + endif (${Boost_NUM_COMPONENTS_WANTED} EQUAL ${Boost_NUM_MISSING_COMPONENTS}) + endif (_Boost_MISSING_COMPONENTS) + + IF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) + # Compatibility Code for backwards compatibility with CMake + # 2.4's FindBoost module. + + # Look for the boost library path. + # Note that the user may not have installed any libraries + # so it is quite possible the Boost_LIBRARY_PATH may not exist. + SET(_boost_LIB_DIR ${Boost_INCLUDE_DIR}) + + IF("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") + GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) + ENDIF ("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") + + IF("${_boost_LIB_DIR}" MATCHES "/include$") + # Strip off the trailing "/include" in the path. + GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) + ENDIF("${_boost_LIB_DIR}" MATCHES "/include$") + + IF(EXISTS "${_boost_LIB_DIR}/lib") + SET (_boost_LIB_DIR ${_boost_LIB_DIR}/lib) + ELSE(EXISTS "${_boost_LIB_DIR}/lib") + IF(EXISTS "${_boost_LIB_DIR}/stage/lib") + SET(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib) + ELSE(EXISTS "${_boost_LIB_DIR}/stage/lib") + SET(_boost_LIB_DIR "") + ENDIF(EXISTS "${_boost_LIB_DIR}/stage/lib") + ENDIF(EXISTS "${_boost_LIB_DIR}/lib") + + IF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") + SET(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory") + ENDIF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") + + ENDIF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) + + ELSE(Boost_INCLUDE_DIR) + SET( Boost_FOUND FALSE) + ENDIF(Boost_INCLUDE_DIR) + + IF (Boost_FOUND) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") + ENDIF(NOT Boost_FIND_QUIETLY) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE(STATUS "Found the following Boost libraries:") + ENDIF(NOT Boost_FIND_QUIETLY) + FOREACH ( COMPONENT ${Boost_FIND_COMPONENTS} ) + STRING( TOUPPER ${COMPONENT} UPPERCOMPONENT ) + IF ( Boost_${UPPERCOMPONENT}_FOUND ) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE (STATUS " ${COMPONENT}") + ENDIF(NOT Boost_FIND_QUIETLY) + SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY}) + ENDIF ( Boost_${UPPERCOMPONENT}_FOUND ) + ENDFOREACH(COMPONENT) + ELSE (Boost_FOUND) + IF (Boost_FIND_REQUIRED) + message(SEND_ERROR "Unable to find the requested Boost libraries.\n${Boost_ERROR_REASON}") + ENDIF(Boost_FIND_REQUIRED) + ENDIF(Boost_FOUND) + + # Under Windows, automatic linking is performed, so no need to specify the libraries. + IF (WIN32) + IF (NOT MINGW) + SET(Boost_LIBRARIES "") + ENDIF (NOT MINGW) + ENDIF(WIN32) + + # show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view + MARK_AS_ADVANCED(Boost_INCLUDE_DIR + Boost_INCLUDE_DIRS + Boost_LIBRARY_DIRS + Boost_USE_MULTITHREADED + ) +ENDIF(_boost_IN_CACHE) + Modified: trunk/spark/cmake/FindDevIL.cmake =================================================================== --- trunk/spark/cmake/FindDevIL.cmake 2009-01-31 19:34:48 UTC (rev 40) +++ trunk/spark/cmake/FindDevIL.cmake 2009-02-06 02:05:26 UTC (rev 41) @@ -31,6 +31,9 @@ /usr/ /opt/net/gcc41/DevIL /opt/net/gcc33/DevIL + C:/library/DevIL + "C:/Program Files/DevIL" + C:/DevIL ) # appended @@ -40,7 +43,7 @@ SET(DevIL_POSSIBLE_LIBDIR_SUFFIXES lib lib64 - DevIL/lib ) + ) Added: trunk/spark/cmake/FindFreetype.cmake =================================================================== --- trunk/spark/cmake/FindFreetype.cmake (rev 0) +++ trunk/spark/cmake/FindFreetype.cmake 2009-02-06 02:05:26 UTC (rev 41) @@ -0,0 +1,91 @@ +# - Locate FreeType library +# This module defines +# FREETYPE_LIBRARIES, the library to link against +# FREETYPE_FOUND, if false, do not try to link to FREETYPE +# FREETYPE_INCLUDE_DIRS, where to find headers. +# This is the concatenation of the paths: +# FREETYPE_INCLUDE_DIR_ft2build +# FREETYPE_INCLUDE_DIR_freetype2 +# +# $FREETYPE_DIR is an environment variable that would +# correspond to the ./configure --prefix=$FREETYPE_DIR +# used in building FREETYPE. + +# Created by Eric Wing. +# Modifications by Alexander Neundorf. +# This file has been renamed to "FindFreetype.cmake" instead of the correct +# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex. + +# Ugh, FreeType seems to use some #include trickery which +# makes this harder than it should be. It looks like they +# put ft2build.h in a common/easier-to-find location which +# then contains a #include to a more specific header in a +# more specific location (#include <freetype/config/ftheader.h>). +# Then from there, they need to set a bunch of #define's +# so you can do something like: +# #include FT_FREETYPE_H +# Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES() +# wants explicit full paths and this trickery doesn't work too well. +# I'm going to attempt to cut out the middleman and hope +# everything still works. +FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h + HINTS + $ENV{FREETYPE_DIR} + PATH_SUFFIXES include + PATHS + /usr/local/X11R6/include + /usr/local/X11/include + /usr/X11/include + /sw/include + /opt/local/include + /usr/freeware/include + C:/library/GnuWin32/include + "C:/Program Files/GnuWin32/include" + C:/GnuWin32/include +) + +FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h + HINTS + $ENV{FREETYPE_DIR}/include/freetype2 + PATHS + /usr/local/X11R6/include + /usr/local/X11/include + /usr/X11/include + /sw/include + /opt/local/include + /usr/freeware/include + C:/library/GnuWin32/include/freetype2 + "C:/Program Files/GnuWin32/include/freetype2" + C:/GnuWin32/include/freetype2 + PATH_SUFFIXES freetype2 +) + +FIND_LIBRARY(FREETYPE_LIBRARY + NAMES freetype libfreetype freetype219 + HINTS + $ENV{FREETYPE_DIR} + PATH_SUFFIXES lib64 lib + PATHS + /usr/local/X11R6 + /usr/local/X11 + /usr/X11 + /sw + /usr/freeware + C:/library/GnuWin32/lib + "C:/Program Files/GnuWin32/lib" + C:/GnuWin32/lib +) + +# set the user variables +IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) + SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") +ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) +SET(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") + +# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype DEFAULT_MSG FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) + + +MARK_AS_ADVANCED(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build) \ No newline at end of file Modified: trunk/spark/cmake/FindODE.cmake =================================================================== --- trunk/spark/cmake/FindODE.cmake 2009-01-31 19:34:48 UTC (rev 40) +++ trunk/spark/cmake/FindODE.cmake 2009-02-06 02:05:26 UTC (rev 41) @@ -12,6 +12,9 @@ /usr/local/include $ENV{OGRE_HOME}/include # OGRE SDK on WIN32 $ENV{INCLUDE} + C:/library/ode/include + "C:/Program Files/ode/include" + C:/ode/include ) FIND_LIBRARY(ODE_LIBRARY NAMES ode @@ -20,6 +23,9 @@ /usr/lib64 /usr/local/lib $ENV{OGRE_HOME}/lib # OGRE SDK on WIN32 + C:/library/ode/lib/releaselib + "C:/Program Files/ode/lib/releaselib" + C:/ode/lib/releaselib ) IF(ODE_INCLUDE_DIR) Added: trunk/spark/cmake/FindRuby.cmake =================================================================== --- trunk/spark/cmake/FindRuby.cmake (rev 0) +++ trunk/spark/cmake/FindRuby.cmake 2009-02-06 02:05:26 UTC (rev 41) @@ -0,0 +1,111 @@ +# - Find Ruby +# This module finds if Ruby is installed and determines where the include files +# and libraries are. It also determines what the name of the library is. This +# code sets the following variables: +# +# RUBY_INCLUDE_PATH = path to where ruby.h can be found +# RUBY_EXECUTABLE = full path to the ruby binary +# RUBY_LIBRARY = full path to the ruby library + +# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. +# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + +# RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'` +# RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'` +# RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'` +# RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'` +# RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` + +FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby ruby1.8 ruby18 ruby1.9 ruby19) + + +IF(RUBY_EXECUTABLE AND NOT RUBY_ARCH_DIR) + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['archdir']" + OUTPUT_VARIABLE RUBY_ARCH_DIR) + + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['libdir']" + OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_DIR) + + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['rubylibdir']" + OUTPUT_VARIABLE RUBY_RUBY_LIB_DIR) + + # site_ruby + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['sitearchdir']" + OUTPUT_VARIABLE RUBY_SITEARCH_DIR) + + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['sitelibdir']" + OUTPUT_VARIABLE RUBY_SITELIB_DIR) + + # vendor_ruby available ? + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r vendor-specific -e "print 'true'" + OUTPUT_VARIABLE RUBY_HAS_VENDOR_RUBY ERROR_QUIET) + + IF(RUBY_HAS_VENDOR_RUBY) + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['vendorlibdir']" + OUTPUT_VARIABLE RUBY_VENDORLIB_DIR) + + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['vendorarchdir']" + OUTPUT_VARIABLE RUBY_VENDORARCH_DIR) + ENDIF(RUBY_HAS_VENDOR_RUBY) + + # save the results in the cache so we don't have to run ruby the next time again + SET(RUBY_ARCH_DIR ${RUBY_ARCH_DIR} CACHE PATH "The Ruby arch dir") + SET(RUBY_POSSIBLE_LIB_DIR ${RUBY_POSSIBLE_LIB_DIR} CACHE PATH "The Ruby lib dir") + SET(RUBY_RUBY_LIB_DIR ${RUBY_RUBY_LIB_DIR} CACHE PATH "The Ruby ruby-lib dir") + SET(RUBY_SITEARCH_DIR ${RUBY_SITEARCH_DIR} CACHE PATH "The Ruby site arch dir") + SET(RUBY_SITELIB_DIR ${RUBY_SITELIB_DIR} CACHE PATH "The Ruby site lib dir") + SET(RUBY_HAS_VENDOR_RUBY ${RUBY_HAS_VENDOR_RUBY} CACHE BOOL "Vendor Ruby is available") + SET(RUBY_VENDORARCH_DIR ${RUBY_VENDORARCH_DIR} CACHE PATH "The Ruby vendor arch dir") + SET(RUBY_VENDORLIB_DIR ${RUBY_VENDORLIB_DIR} CACHE PATH "The Ruby vendor lib dir") + +ENDIF(RUBY_EXECUTABLE AND NOT RUBY_ARCH_DIR) + +# for compatibility +SET(RUBY_POSSIBLE_LIB_PATH ${RUBY_POSSIBLE_LIB_DIR}) +SET(RUBY_RUBY_LIB_PATH ${RUBY_RUBY_LIB_DIR}) + + +FIND_PATH(RUBY_INCLUDE_PATH + NAMES ruby.h + PATHS + ${RUBY_ARCH_DIR} + /usr/lib/ruby/1.8/i586-linux-gnu/ + # for ruby 1.8 + c:/library/ruby/lib/ruby/1.8/i386-mswin32 + "c:/Program Files/ruby/lib/ruby/1.8/i386-mswin32" + c:/ruby/lib/ruby/1.8/i386-mswin32 + + # for ruby 1.9 + c:/library/ruby/include/ruby-1.9.1 + "c:/Program Files/ruby/include/ruby-1.9.1" + c:/ruby/include/ruby-1.9.1 + c:/library/ruby/include/ruby-1.9.1/i386-mswin32 + "c:/Program Files/ruby/include/ruby-1.9.1/i386-mswin32" + c:/ruby/include/ruby-1.9.1/i386-mswin32 + + ) + +# search the ruby library, the version for MSVC can have the "msvc" prefix and the "static" suffix +FIND_LIBRARY(RUBY_LIBRARY + NAMES ruby ruby1.8 ruby1.9 + msvcrt-ruby18 msvcrt-ruby19 msvcrt-ruby18-static msvcrt-ruby19-static + PATHS ${RUBY_POSSIBLE_LIB_DIR} + c:/library/ruby/lib/ + "c:/Program Files/ruby/lib/" + c:/ruby/lib/ + ) + +MARK_AS_ADVANCED( + RUBY_EXECUTABLE + RUBY_LIBRARY + RUBY_INCLUDE_PATH + RUBY_ARCH_DIR + RUBY_POSSIBLE_LIB_DIR + RUBY_RUBY_LIB_DIR + RUBY_SITEARCH_DIR + RUBY_SITELIB_DIR + RUBY_HAS_VENDOR_RUBY + RUBY_VENDORARCH_DIR + RUBY_VENDORLIB_DIR + ) Added: trunk/spark/cmake/FindSDL.cmake =================================================================== --- trunk/spark/cmake/FindSDL.cmake (rev 0) +++ trunk/spark/cmake/FindSDL.cmake 2009-02-06 02:05:26 UTC (rev 41) @@ -0,0 +1,185 @@ +# Locate SDL library +# This module defines +# SDL_LIBRARY, the name of the library to link against +# SDL_FOUND, if false, do not try to link to SDL +# SDL_INCLUDE_DIR, where to find SDL.h +# +# This module responds to the the flag: +# SDL_BUILDING_LIBRARY +# If this is defined, then no SDL_main will be linked in because +# only applications need main(). +# Otherwise, it is assumed you are building an application and this +# module will attempt to locate and set the the proper link flags +# as part of the returned SDL_LIBRARY variable. +# +# Don't forget to include SDLmain.h and SDLmain.m your project for the +# OS X framework based version. (Other versions link to -lSDLmain which +# this module will try to find on your behalf.) Also for OS X, this +# module will automatically add the -framework Cocoa on your behalf. +# +# +# Additional Note: If you see an empty SDL_LIBRARY_TEMP in your configuration +# and no SDL_LIBRARY, it means CMake did not find your SDL library +# (SDL.dll, libsdl.so, SDL.framework, etc). +# Set SDL_LIBRARY_TEMP to point to your SDL library, and configure again. +# Similarly, if you see an empty SDLMAIN_LIBRARY, you should set this value +# as appropriate. These values are used to generate the final SDL_LIBRARY +# variable, but when these values are unset, SDL_LIBRARY does not get created. +# +# +# $SDLDIR is an environment variable that would +# correspond to the ./configure --prefix=$SDLDIR +# used in building SDL. +# l.e.galup 9-20-02 +# +# Modified by Eric Wing. +# Added code to assist with automated building by using environmental variables +# and providing a more controlled/consistent search behavior. +# Added new modifications to recognize OS X frameworks and +# additional Unix paths (FreeBSD, etc). +# Also corrected the header search path to follow "proper" SDL guidelines. +# Added a search for SDLmain which is needed by some platforms. +# Added a search for threads which is needed by some platforms. +# Added needed compile switches for MinGW. +# +# On OSX, this will prefer the Framework version (if found) over others. +# People will have to manually change the cache values of +# SDL_LIBRARY to override this selection or set the CMake environment +# CMAKE_INCLUDE_PATH to modify the search paths. +# +# Note that the header path has changed from SDL/SDL.h to just SDL.h +# This needed to change because "proper" SDL convention +# is #include "SDL.h", not <SDL/SDL.h>. This is done for portability +# reasons because not all systems place things in SDL/ (see FreeBSD). + +FIND_PATH(SDL_INCLUDE_DIR SDL.h + HINTS + $ENV{SDLDIR} + PATH_SUFFIXES include + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local/include/SDL + /usr/include/SDL + /usr/local/include/SDL12 + /usr/local/include/SDL11 # FreeBSD ports + /usr/include/SDL12 + /usr/include/SDL11 + /usr/local/include + /usr/include + /sw/include/SDL # Fink + /sw/include + /opt/local/include/SDL # DarwinPorts + /opt/local/include + /opt/csw/include/SDL # Blastwave + /opt/csw/include + /opt/include/SDL + /opt/include + C:/library/SDL/include + "C:/Program Files/SDL/include" + C:/SDL/include +) +#MESSAGE("SDL_INCLUDE_DIR is ${SDL_INCLUDE_DIR}") + +# SDL-1.1 is the name used by FreeBSD ports... +# don't confuse it for the version number. +FIND_LIBRARY(SDL_LIBRARY_TEMP + NAMES SDL SDL-1.1 + HINTS + $ENV{SDLDIR} + PATH_SUFFIXES lib64 lib + PATHS + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + C:/library/SDL/lib + "C:/Program Files/SDL/lib" + C:/SDL/lib +) + +#MESSAGE("SDL_LIBRARY_TEMP is ${SDL_LIBRARY_TEMP}") + +IF(NOT SDL_BUILDING_LIBRARY) + IF(NOT ${SDL_INCLUDE_DIR} MATCHES ".framework") + # Non-OS X framework versions expect you to also dynamically link to + # SDLmain. This is mainly for Windows and OS X. Other (Unix) platforms + # seem to provide SDLmain for compatibility even though they don't + # necessarily need it. + FIND_LIBRARY(SDLMAIN_LIBRARY + NAMES SDLmain SDLmain-1.1 + HINTS + $ENV{SDLDIR} + PATH_SUFFIXES lib64 lib + PATHS + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + C:/library/SDL + "C:/Program Files/SDL" + C:/SDL + ) + ENDIF(NOT ${SDL_INCLUDE_DIR} MATCHES ".framework") +ENDIF(NOT SDL_BUILDING_LIBRARY) + +# SDL may require threads on your system. +# The Apple build may not need an explicit flag because one of the +# frameworks may already provide it. +# But for non-OSX systems, I will use the CMake Threads package. +IF(NOT APPLE) + FIND_PACKAGE(Threads) +ENDIF(NOT APPLE) + +# MinGW needs an additional library, mwindows +# It's total link flags should look like -lmingw32 -lSDLmain -lSDL -lmwindows +# (Actually on second look, I think it only needs one of the m* libraries.) +IF(MINGW) + SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW") +ENDIF(MINGW) + +SET(SDL_FOUND "NO") +IF(SDL_LIBRARY_TEMP) + # For SDLmain + IF(NOT SDL_BUILDING_LIBRARY) + IF(SDLMAIN_LIBRARY) + SET(SDL_LIBRARY_TEMP ${SDLMAIN_LIBRARY} ${SDL_LIBRARY_TEMP}) + ENDIF(SDLMAIN_LIBRARY) + ENDIF(NOT SDL_BUILDING_LIBRARY) + + # For OS X, SDL uses Cocoa as a backend so it must link to Cocoa. + # CMake doesn't display the -framework Cocoa string in the UI even + # though it actually is there if I modify a pre-used variable. + # I think it has something to do with the CACHE STRING. + # So I use a temporary variable until the end so I can set the + # "real" variable in one-shot. + IF(APPLE) + SET(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} "-framework Cocoa") + ENDIF(APPLE) + + # For threads, as mentioned Apple doesn't need this. + # In fact, there seems to be a problem if I used the Threads package + # and try using this line, so I'm just skipping it entirely for OS X. + IF(NOT APPLE) + SET(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT}) + ENDIF(NOT APPLE) + + # For MinGW library + IF(MINGW) + SET(SDL_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL_LIBRARY_TEMP}) + ENDIF(MINGW) + + # Set the final string here so the GUI reflects the final state. + SET(SDL_LIBRARY ${SDL_LIBRARY_TEMP} CACHE STRING "Where the SDL Library can be found") + # Set the temp variable to INTERNAL so it is not seen in the CMake GUI + SET(SDL_LIBRARY_TEMP "${SDL_LIBRARY_TEMP}" CACHE INTERNAL "") + + SET(SDL_FOUND "YES") +ENDIF(SDL_LIBRARY_TEMP) + +#MESSAGE("SDL_LIBRARY is ${SDL_LIBRARY}") + Modified: trunk/spark/plugin/inputsdl/inputdevicesdl.h =================================================================== --- trunk/spark/plugin/inputsdl/inputdevicesdl.h 2009-01-31 19:34:48 UTC (rev 40) +++ trunk/spark/plugin/inputsdl/inputdevicesdl.h 2009-02-06 02:05:26 UTC (rev 41) @@ -29,7 +29,12 @@ #include <kerosin/inputserver/inputdevice.h> #include <kerosin/inputserver/inputserver.h> + +#ifndef WIN32 #include <SDL/SDL.h> +#else +#include <include/SDL.h> +#endif /** \class InputDeviceSDL This class introduces SDL-specific callback functions for the event filtering. Modified: trunk/spark/plugin/inputsdl/inputsystemsdl.cpp =================================================================== --- trunk/spark/plugin/inputsdl/inputsystemsdl.cpp 2009-01-31 19:34:48 UTC (rev 40) +++ trunk/spark/plugin/inputsdl/inputsystemsdl.cpp 2009-02-06 02:05:26 UTC (rev 41) @@ -24,8 +24,14 @@ #include "inputdevicesdl.h" #include <kerosin/inputserver/inputserver.h> #include <zeitgeist/logserver/logserver.h> +#ifndef WIN32 #include <SDL/SDL_thread.h> #include <SDL/SDL_syswm.h> +#else +#include <include/SDL_thread.h> +#include <include/SDL_syswm.h> +#endif + #include "timersdl.h" using namespace boost; Modified: trunk/spark/plugin/inputsdl/inputsystemsdl.h =================================================================== --- trunk/spark/plugin/inputsdl/inputsystemsdl.h 2009-01-31 19:34:48 UTC (rev 40) +++ trunk/spark/plugin/inputsdl/inputsystemsdl.h 2009-02-06 02:05:26 UTC (rev 41) @@ -30,7 +30,12 @@ #include <kerosin/inputserver/inputsystem.h> #include <kerosin/inputserver/inputserver.h> #include <kerosin/openglserver/openglserver.h> + +#ifndef WIN32 #include <SDL/SDL.h> +#else +#include <include/SDL.h> +#endif struct SDL_mutex; Modified: trunk/spark/plugin/openglsyssdl/openglsystemsdl.cpp =================================================================== --- trunk/spark/plugin/openglsyssdl/openglsystemsdl.cpp 2009-01-31 19:34:48 UTC (rev 40) +++ trunk/spark/plugin/openglsyssdl/openglsystemsdl.cpp 2009-02-06 02:05:26 UTC (rev 41) @@ -24,7 +24,11 @@ #include <zeitgeist/logserver/logserver.h> #include <zeitgeist/scriptserver/scriptserver.h> #include <kerosin/openglserver/openglwrapper.h> +#ifndef WIN32 #include <SDL/SDL.h> +#else +#include <include/SDL.h> +#endif using namespace std; using namespace boost; Modified: trunk/spark/test/fonttest/main.cpp =================================================================== --- trunk/spark/test/fonttest/main.cpp 2009-01-31 19:34:48 UTC (rev 40) +++ trunk/spark/test/fonttest/main.cpp 2009-02-06 02:05:26 UTC (rev 41) @@ -1,6 +1,10 @@ #include <zeitgeist/zeitgeist.h> #include <kerosin/kerosin.h> -#include <SDL.h> +#ifndef WIN32 +#include <SDL/SDL.h> +#else +#include <include/SDL.h> +#endif #ifdef _WIN32 #include <windows.h> #endif Modified: trunk/spark/test/inputtest/main.cpp =================================================================== --- trunk/spark/test/inputtest/main.cpp 2009-01-31 19:34:48 UTC (rev 40) +++ trunk/spark/test/inputtest/main.cpp 2009-02-06 02:05:26 UTC (rev 41) @@ -1,6 +1,10 @@ #include <zeitgeist/zeitgeist.h> #include <kerosin/kerosin.h> -#include <SDL.h> +#ifndef WIN32 +#include <SDL/SDL.h> +#else +#include <include/SDL.h> +#endif #ifdef _WIN32 #include <windows.h> #endif Modified: trunk/spark/test/scenetest/main.cpp =================================================================== --- trunk/spark/test/scenetest/main.cpp 2009-01-31 19:34:48 UTC (rev 40) +++ trunk/spark/test/scenetest/main.cpp 2009-02-06 02:05:26 UTC (rev 41) @@ -1,7 +1,11 @@ #include <zeitgeist/zeitgeist.h> #include <kerosin/kerosin.h> #include <oxygen/oxygen.h> -#include <SDL.h> +#ifndef WIN32 +#include <SDL/SDL.h> +#else +#include <include/SDL.h> +#endif #include <zeitgeist/fileserver/fileserver.h> using namespace boost; Modified: trunk/spark/windows/sparkconfig.h =================================================================== --- trunk/spark/windows/sparkconfig.h 2009-01-31 19:34:48 UTC (rev 40) +++ trunk/spark/windows/sparkconfig.h 2009-02-06 02:05:26 UTC (rev 41) @@ -8,3 +8,4 @@ #define HAVE_WINSOCK2_H 1 #define HAVE_SOCKET 1 #define HAVE_SOCKETTYPE 1 +#define HAVE_IL_IL_H 1 \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-02-15 12:09:51
|
Revision: 50 http://simspark.svn.sourceforge.net/simspark/?rev=50&view=rev Author: marianbuchta Date: 2009-02-15 12:09:44 +0000 (Sun, 15 Feb 2009) Log Message: ----------- -add new version of FindBoost.cmake (from CMake 2.7.20090210),which fixed boost library path issue in Windows -add FindZLIB.cmake -fixed finding SDL library path -change include path for SDL header files -fixed fatal error C1021, because VS don't recognize warning macro Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/cmake/FindBoost.cmake trunk/spark/cmake/FindSDL.cmake trunk/spark/lib/zeitgeist/CMakeLists.txt trunk/spark/plugin/imageperceptor/imageperceptor.cpp trunk/spark/plugin/inputsdl/inputdevicesdl.h trunk/spark/plugin/inputsdl/inputsystemsdl.cpp trunk/spark/plugin/inputsdl/inputsystemsdl.h trunk/spark/plugin/openglsyssdl/openglsystemsdl.cpp trunk/spark/test/fonttest/main.cpp trunk/spark/test/inputtest/main.cpp trunk/spark/test/scenetest/main.cpp trunk/spark/test/scenetest/md5mesh.cpp Added Paths: ----------- trunk/spark/cmake/FindZLIB.cmake Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/CMakeLists.txt 2009-02-15 12:09:44 UTC (rev 50) @@ -25,6 +25,10 @@ HAVE_COREFOUNDATION_COREFOUNDATION_H) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) +if(WIN32) + find_package(zlib REQUIRED) + set(Boost_USE_STATIC_LIBS ON) +endif(WIN32) find_package(Ruby REQUIRED) find_package(Freetype REQUIRED) find_package(DevIL REQUIRED) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/ChangeLog 2009-02-15 12:09:44 UTC (rev 50) @@ -1,3 +1,36 @@ +2009-02-15 Marian Buchta <mar...@gm...> + + * CMakeLists.txt + - add macro for finding boost static library (Windows platform) + - add macro for finding zlib library + + * cmake/FindBoost.cmake + - add new version of findboost from cmake2.7,which fixed boost library path issue in Windows (find 2 components but add path only one of them) + + * cmake/FindSDL.cmake + - fixed library path + + * cmake/FindZLIB.cmake + - add macro for finding ZLIB library + + * lib/zeitgeist/CMakeLists.txt + - fixed missing correct extension (from #telnetserver/telnetsession.c to #telnetserver/telnetsession.cpp) + + * plugin/imageperceptor/imageperceptor.cpp + - add include files only for Windows platform + + * plugin/inputsdl/inputdevicesdl.h + * plugin/inputsdl/inputsystemsdl.cpp + * plugin/inputsdl/inputsystemsdl.h + * plugin/openglsyssdl/openglsystemsdl.cpp + * test/fonttest/main.cpp + * test/inputtest/main.cpp + * test/scenetest/main.cpp + - change include path for SDL header files because of FindSDL.cmake script + + * test/scenetest/md5mesh.cpp + - fixed fatal error C1021 - invalid preprocessor command (Windows platform) + 2009-01-29 Hedayat Vatankhah <he...@gr...> * README: Modified: trunk/spark/cmake/FindBoost.cmake =================================================================== --- trunk/spark/cmake/FindBoost.cmake 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/cmake/FindBoost.cmake 2009-02-15 12:09:44 UTC (rev 50) @@ -1,78 +1,145 @@ # - Try to find Boost include dirs and libraries # Usage of this module as follows: # -# SET(Boost_USE_STATIC_LIBS ON) -# SET(Boost_USE_MULTITHREAD OFF) -# FIND_PACKAGE( Boost 1.34.1 COMPONENTS date_time filesystem iostreams ... ) +# == Using Header-Only libraries from within Boost: == # -# The Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of -# boost version numbers that should be taken into account when searching -# for the libraries. Unfortunately boost puts the version number into the -# actual filename for the libraries, so this might be needed in the future -# when new Boost versions are released. +# find_package( Boost 1.36.0 ) +# if(Boost_FOUND) +# include_directories(${Boost_INCLUDE_DIRS}) +# add_executable(foo foo.cc) +# endif() # -# Currently this module searches for the following version numbers: -# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, 1.36, -# 1.36.0, 1.36.1 # -# The components list needs to be the actual names of boost libraries, that is -# the part of the actual library files that differ on different libraries. So -# its "date_time" for "libboost_date_time...". Anything else will result in -# errors +# == Using actual libraries from within Boost: == # -# You can provide a minimum version number that should be used. If you provide this +# set(Boost_USE_STATIC_LIBS ON) +# set(Boost_USE_MULTITHREADED ON) +# find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... ) +# +# if(Boost_FOUND) +# include_directories(${Boost_INCLUDE_DIRS}) +# add_executable(foo foo.cc) +# target_link_libraries(foo ${Boost_LIBRARIES}) +# endif() +# +# +# The components list needs to contain actual names of boost libraries only, +# such as "date_time" for "libboost_date_time". If you're using parts of +# Boost that contain header files only (e.g. foreach) you do not need to +# specify COMPONENTS. +# +# You should provide a minimum version number that should be used. If you provide this # version number and specify the REQUIRED attribute, this module will fail if it # can't find the specified or a later version. If you specify a version number this is # automatically put into the considered list of version numbers and thus doesn't need -# to be specified in the Boost_ADDITIONAL_VERSIONS variable +# to be specified in the Boost_ADDITIONAL_VERSIONS variable (see below). # +# NOTE for Visual Studio Users: +# Automatic linking is used on MSVC & Borland compilers by default when +# #including things in Boost. It's important to note that setting +# Boost_USE_STATIC_LIBS to OFF is NOT enough to get you dynamic linking, +# should you need this feature. Automatic linking typically uses static +# libraries with a few exceptions (Boost.Python is one). +# +# Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for +# more details. Adding a TARGET_LINK_LIBRARIES() as shown in the example +# above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS +# gets set to OFF. It is suggested you avoid automatic linking since it +# will make your application less portable. +# +# =========== The mess that is Boost_ADDITIONAL_VERSIONS (sorry?) ============ +# +# OK, so the Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of +# boost version numbers that should be taken into account when searching +# for Boost. Unfortunately boost puts the version number into the +# actual filename for the libraries, so this variable will certainly be needed +# in the future when new Boost versions are released. +# +# Currently this module searches for the following version numbers: +# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, +# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0 +# +# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should +# add both 1.x and 1.x.0 as shown above. Official Boost include directories +# omit the 3rd version number from include paths if it is 0 although not all +# binary Boost releases do so. +# +# SET(Boost_ADDITIONAL_VERSIONS "0.99" "0.99.0" "1.78" "1.78.0") +# +# ============================================================================ +# # Variables used by this module, they can change the default behaviour and need to be set # before calling find_package: -# Boost_USE_MULTITHREAD Can be set to OFF to use the non-multithreaded -# boost libraries. Defaults to ON. +# +# Boost_USE_MULTITHREADED Can be set to OFF to use the non-multithreaded +# boost libraries. If not specified, defaults +# to ON. +# # Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static # boost libraries. Defaults to OFF. +# +# Other Variables used by this module which you may want to set. +# # Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching -# the boost include directory. The default list -# of version numbers is: -# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, -# 1.35, 1.35.0, 1.35.1, 1.36, 1.36.0, 1.36.1 -# If you want to look for an older or newer -# version set this variable to a list of -# strings, where each string contains a number, i.e. -# SET(Boost_ADDITIONAL_VERSIONS "0.99.0" "1.35.0") -# BOOST_ROOT or BOOSTROOT Preferred installation prefix for searching for Boost, -# set this if the module has problems finding the proper Boost installation +# the boost include directory. Please see +# the documentation above regarding this +# annoying, but necessary variable :( +# +# Boost_DEBUG Set this to TRUE to enable debugging output +# of FindBoost.cmake if you are having problems. +# Please enable this before filing any bug +# reports. +# +# Boost_COMPILER Set this to the compiler suffix used by Boost +# (e.g. "-gcc43") if FindBoods has problems finding +# the proper Boost installation +# +# These last three variables are available also as environment variables: +# +# BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for +# Boost. Set this if the module has problems finding +# the proper Boost installation. +# # BOOST_INCLUDEDIR Set this to the include directory of Boost, if the # module has problems finding the proper Boost installation +# # BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the # module has problems finding the proper Boost installation # -# The last three variables are available also as environment variables +# Variables defined by this module: # +# Boost_FOUND System has Boost, this means the include dir was +# found, as well as all the libraries specified in +# the COMPONENTS list. # -# Variables defined by this module: +# Boost_INCLUDE_DIRS Boost include directories: not cached # -# Boost_FOUND System has Boost, this means the include dir was found, -# as well as all the libraries specified in the COMPONENTS list -# Boost_INCLUDE_DIRS Boost include directories, not cached -# Boost_INCLUDE_DIR This is almost the same as above, but this one is cached and may be -# modified by advanced users -# Boost_LIBRARIES Link these to use the Boost libraries that you specified, not cached +# Boost_INCLUDE_DIR This is almost the same as above, but this one is +# cached and may be modified by advanced users +# +# Boost_LIBRARIES Link these to use the Boost libraries that you +# specified: not cached +# # Boost_LIBRARY_DIRS The path to where the Boost library files are. -# Boost_VERSION The version number of the boost libraries that have been found, -# same as in version.hpp from Boost -# Boost_LIB_VERSION The version number in filename form as its appended to the library filenames +# +# Boost_VERSION The version number of the boost libraries that +# have been found, same as in version.hpp from Boost +# +# Boost_LIB_VERSION The version number in filename form as +# it's appended to the library filenames +# # Boost_MAJOR_VERSION major version number of boost # Boost_MINOR_VERSION minor version number of boost # Boost_SUBMINOR_VERSION subminor version number of boost -# Boost_LIB_DIAGNOSTIC_DEFINITIONS Only set on windows. Can be used with add_definitions -# to print diagnostic information about the automatic -# linking done on windows. - +# +# Boost_LIB_DIAGNOSTIC_DEFINITIONS [WIN32 Only] You can call +# add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINTIIONS}) +# to have diagnostic information about Boost's +# automatic linking outputted during compilation time. +# # For each component you list the following variables are set. # ATTENTION: The component names need to be in lower case, just as the boost -# library names however the cmake variables use upper case for the component +# library names however the CMake variables use upper case for the component # part. So you'd get Boost_SERIALIZATION_FOUND for example. # # Boost_${COMPONENT}_FOUND True IF the Boost library "component" was found. @@ -91,24 +158,44 @@ # BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # -OPTION(Boost_USE_MULTITHREADED - "Use the multithreaded versions of the Boost libraries" ON) -if (Boost_FIND_VERSION_EXACT) - if (Boost_FIND_VERSION_PATCH) - set( _boost_TEST_VERSIONS - "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}") - else (Boost_FIND_VERSION_PATCH) - set( _boost_TEST_VERSIONS - "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.0" - "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") - endif (Boost_FIND_VERSION_PATCH) -else (Boost_FIND_VERSION_EXACT) - set( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} - "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" - "1.34" "1.33.1" "1.33.0" "1.33" ) -endif (Boost_FIND_VERSION_EXACT) +IF(NOT DEFINED Boost_USE_MULTITHREADED) + SET(Boost_USE_MULTITHREADED TRUE) +ENDIF() +if(Boost_FIND_VERSION_EXACT) + # The version may appear in a directory with or without the patch + # level, even when the patch level is non-zero. + set(_boost_TEST_VERSIONS + "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}" + "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") +else(Boost_FIND_VERSION_EXACT) + # The user has not requested an exact version. Among known + # versions, find those that are acceptable to the user request. + set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} + "1.38.0" "1.38" "1.37.0" "1.37" + "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" + "1.34" "1.33.1" "1.33.0" "1.33") + set(_boost_TEST_VERSIONS) + if(Boost_FIND_VERSION) + set(_Boost_FIND_VERSION_SHORT "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") + # Select acceptable versions. + foreach(version ${_Boost_KNOWN_VERSIONS}) + if(NOT "${version}" VERSION_LESS "${Boost_FIND_VERSION}") + # This version is high enough. + list(APPEND _boost_TEST_VERSIONS "${version}") + elseif("${version}.99" VERSION_EQUAL "${_Boost_FIND_VERSION_SHORT}.99") + # This version is a short-form for the requested version with + # the patch level dropped. + list(APPEND _boost_TEST_VERSIONS "${version}") + endif() + endforeach(version) + else(Boost_FIND_VERSION) + # Any version is acceptable. + set(_boost_TEST_VERSIONS "${_Boost_KNOWN_VERSIONS}") + endif(Boost_FIND_VERSION) +endif(Boost_FIND_VERSION_EXACT) + # The reason that we failed to find Boost. This will be set to a # user-friendly message when we fail to find some necessary piece of # Boost. @@ -155,9 +242,17 @@ ENDIF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) IF (Boost_${basename}_LIBRARY) - SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library") - GET_FILENAME_COMPONENT(Boost_LIBRARY_DIRS "${Boost_${basename}_LIBRARY}" PATH) - SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory") + set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library") + + # Remove superfluous "debug" / "optimized" keywords from + # Boost_LIBRARY_DIRS + FOREACH(_boost_my_lib ${Boost_${basename}_LIBRARY}) + GET_FILENAME_COMPONENT(_boost_my_lib_path "${_boost_my_lib}" PATH) + LIST(APPEND Boost_LIBRARY_DIRS ${_boost_my_lib_path}) + ENDFOREACH() + LIST(REMOVE_DUPLICATES Boost_LIBRARY_DIRS) + + set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory") SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found") ENDIF (Boost_${basename}_LIBRARY) @@ -170,6 +265,23 @@ ) ENDMACRO (_Boost_ADJUST_LIB_VARS) +# +# Runs compiler with "-dumpversion" and parses major/minor +# version with a regex. +# +FUNCTION(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION) + + EXEC_PROGRAM(${CMAKE_CXX_COMPILER} + ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion + OUTPUT_VARIABLE _boost_COMPILER_VERSION + ) + STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" + _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) + + SET(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE) +ENDFUNCTION() + + #------------------------------------------------------------------------------- @@ -199,8 +311,24 @@ MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} " + "is already in the cache. For debugging messages, please clear the cache.") + endif() ELSE (_boost_IN_CACHE) # Need to search for boost + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost not in cache") + # Output some of their choices + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}") + endif() IF(WIN32) # In windows, automatic linking is performed, so you do not have @@ -225,23 +353,14 @@ ENDIF(WIN32) SET(_boost_INCLUDE_SEARCH_DIRS - "$ENV{ProgramFiles}/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}" - "$ENV{ProgramFiles}/Boost" + C:/boost/include + C:/boost + "$ENV{ProgramFiles}/boost" C:/library/boost "C:/Program Files/boost" - C:/boost /sw/local/include ) - SET(_boost_LIBRARIES_SEARCH_DIRS - "$ENV{ProgramFiles}/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}/lib" - "$ENV{ProgramFiles}/Boost" - C:/library/boost/stage/lib - "C:/Program Files/boost/stage/lib" - C:/boost/lib - /sw/local/lib - ) - # If BOOST_ROOT was defined in the environment, use it. if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") set(BOOST_ROOT $ENV{BOOST_ROOT}) @@ -256,22 +375,34 @@ IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) set(BOOST_INCLUDEDIR $ENV{BOOST_INCLUDEDIR}) ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) - + # If BOOST_LIBRARYDIR was defined in the environment, use it. IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR}) ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) + + IF( BOOST_ROOT ) + file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT) + ENDIF( BOOST_ROOT ) + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Declared as CMake or Environmental Variables:") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " BOOST_ROOT = ${BOOST_ROOT}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}") + endif() + IF( BOOST_ROOT ) - file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT) SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_ROOT}/include ${BOOST_ROOT} ${_boost_INCLUDE_SEARCH_DIRS}) - SET(_boost_LIBRARIES_SEARCH_DIRS - ${BOOST_ROOT}/lib - ${BOOST_ROOT}/stage/lib - ${_boost_LIBRARIES_SEARCH_DIRS}) ENDIF( BOOST_ROOT ) IF( BOOST_INCLUDEDIR ) @@ -280,12 +411,9 @@ ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS}) ENDIF( BOOST_INCLUDEDIR ) - IF( BOOST_LIBRARYDIR ) - file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR) - SET(_boost_LIBRARIES_SEARCH_DIRS - ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS}) - ENDIF( BOOST_LIBRARYDIR ) - + # ------------------------------------------------------------------------ + # Search for Boost include DIR + # ------------------------------------------------------------------------ # Try to find Boost by stepping backwards through the Boost versions # we know about. IF( NOT Boost_INCLUDE_DIR ) @@ -295,21 +423,33 @@ # Add in a path suffix, based on the required version, ideally # we could read this from version.hpp, but for that to work we'd # need to know the include dir already - if (WIN32 AND NOT CYGWIN) - set(_boost_PATH_SUFFIX boost_${_boost_VER}) - else (WIN32 AND NOT CYGWIN) - set(_boost_PATH_SUFFIX boost-${_boost_VER}) - endif (WIN32 AND NOT CYGWIN) + set(_boost_BOOSTIFIED_VERSION) - IF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") + # Transform 1.35 => 1_35 and 1.36.0 => 1_36_0 + IF(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" - _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX}) - ELSEIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+") + _boost_BOOSTIFIED_VERSION ${_boost_VER}) + ELSEIF(_boost_VER MATCHES "[0-9]+\\.[0-9]+") STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" - _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX}) - ENDIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") - LIST(APPEND _boost_PATH_SUFFIXES "${_boost_PATH_SUFFIX}") + _boost_BOOSTIFIED_VERSION ${_boost_VER}) + ENDIF() + + list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}") + if(WIN32) + # For BoostPro's underscores (and others?) + list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}") + endif() + ENDFOREACH(_boost_VER) + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "Include debugging info:") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " _boost_INCLUDE_SEARCH_DIRS = ${_boost_INCLUDE_SEARCH_DIRS}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + " _boost_PATH_SUFFIXES = ${_boost_PATH_SUFFIXES}") + endif() # Look for a standard boost header file. FIND_PATH(Boost_INCLUDE_DIR @@ -318,6 +458,10 @@ PATH_SUFFIXES ${_boost_PATH_SUFFIXES} ) ENDIF( NOT Boost_INCLUDE_DIR ) + + # ------------------------------------------------------------------------ + # Extract version information from version.hpp + # ------------------------------------------------------------------------ IF(Boost_INCLUDE_DIR) # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp @@ -326,6 +470,10 @@ SET(BOOST_VERSION 0) SET(BOOST_LIB_VERSION "") FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS) + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp") + endif() STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}") STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}") @@ -341,74 +489,109 @@ set(Boost_ERROR_REASON "${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}") ENDIF(NOT "${Boost_VERSION}" STREQUAL "0") + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "version.hpp reveals boost " + "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") + endif() ELSE(Boost_INCLUDE_DIR) set(Boost_ERROR_REASON "${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.") ENDIF(Boost_INCLUDE_DIR) + + # ------------------------------------------------------------------------ + # Suffix initialization and compiler suffix detection. + # ------------------------------------------------------------------------ # Setting some more suffixes for the library SET (Boost_LIB_PREFIX "") - IF ( WIN32 AND Boost_USE_STATIC_LIBS ) + if ( MSVC AND Boost_USE_STATIC_LIBS ) SET (Boost_LIB_PREFIX "lib") - ENDIF ( WIN32 AND Boost_USE_STATIC_LIBS ) - SET (_boost_COMPILER "-gcc") - IF (MSVC90) - SET (_boost_COMPILER "-vc90") - ELSEIF (MSVC80) - SET (_boost_COMPILER "-vc80") - ELSEIF (MSVC71) - SET (_boost_COMPILER "-vc71") - ENDIF(MSVC90) - IF (MINGW) - EXEC_PROGRAM(${CMAKE_CXX_COMPILER} - ARGS -dumpversion - OUTPUT_VARIABLE _boost_COMPILER_VERSION - ) - STRING(REGEX REPLACE "([0-9])\\.([0-9])\\.[0-9]" "\\1\\2" - _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) - SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}") - ENDIF(MINGW) - IF (UNIX) - IF (NOT CMAKE_COMPILER_IS_GNUCC) - # We assume that we have the Intel compiler. - SET (_boost_COMPILER "-il") - ELSE (NOT CMAKE_COMPILER_IS_GNUCC) - # Determine which version of GCC we have. - EXEC_PROGRAM(${CMAKE_CXX_COMPILER} - ARGS -dumpversion - OUTPUT_VARIABLE _boost_COMPILER_VERSION - ) - STRING(REGEX REPLACE "([0-9])\\.([0-9])\\.[0-9]" "\\1\\2" - _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) - IF(APPLE) - IF(Boost_MINOR_VERSION) - IF(${Boost_MINOR_VERSION} GREATER 35) - # In Boost 1.36.0 and newer, the mangled compiler name used - # on Mac OS X/Darwin is "xgcc". - SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}") - ELSE(${Boost_MINOR_VERSION} GREATER 35) - # In Boost <= 1.35.0, there is no mangled compiler name for - # the Mac OS X/Darwin version of GCC. - SET(_boost_COMPILER "") - ENDIF(${Boost_MINOR_VERSION} GREATER 35) - ELSE(Boost_MINOR_VERSION) - # We don't know the Boost version, so assume it's - # pre-1.36.0. - SET(_boost_COMPILER "") - ENDIF(Boost_MINOR_VERSION) - ELSE() - SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}") - ENDIF() - ENDIF (NOT CMAKE_COMPILER_IS_GNUCC) - ENDIF(UNIX) + endif() + if (Boost_COMPILER) + set(_boost_COMPILER ${Boost_COMPILER}) + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "using user-specified Boost_COMPILER = ${_boost_COMPILER}") + endif() + else(Boost_COMPILER) + # Attempt to guess the compiler suffix + # NOTE: this is not perfect yet, if you experience any issues + # please report them and use the Boost_COMPILER variable + # to work around the problems. + if (MSVC90) + SET (_boost_COMPILER "-vc90") + elseif (MSVC80) + SET (_boost_COMPILER "-vc80") + elseif (MSVC71) + SET (_boost_COMPILER "-vc71") + elseif (MSVC70) # Good luck! + SET (_boost_COMPILER "-vc7") # yes, this is correct + elseif (MSVC60) # Good luck! + SET (_boost_COMPILER "-vc6") # yes, this is correct + elseif (BORLAND) + SET (_boost_COMPILER "-bcb") + elseif("${CMAKE_CXX_COMPILER}" MATCHES "icl" + OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc") + if(WIN32) + set (_boost_COMPILER "-iw") + else() + set (_boost_COMPILER "-il") + endif() + elseif (MINGW) + if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) + SET(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34 + else() + _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) + SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}") + endif() + elseif (UNIX) + if (CMAKE_COMPILER_IS_GNUCXX) + if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) + SET(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34 + else() + _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION) + # Determine which version of GCC we have. + IF(APPLE) + IF(Boost_MINOR_VERSION) + IF(${Boost_MINOR_VERSION} GREATER 35) + # In Boost 1.36.0 and newer, the mangled compiler name used + # on Mac OS X/Darwin is "xgcc". + SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}") + ELSE(${Boost_MINOR_VERSION} GREATER 35) + # In Boost <= 1.35.0, there is no mangled compiler name for + # the Mac OS X/Darwin version of GCC. + SET(_boost_COMPILER "") + ENDIF(${Boost_MINOR_VERSION} GREATER 35) + ELSE(Boost_MINOR_VERSION) + # We don't know the Boost version, so assume it's + # pre-1.36.0. + SET(_boost_COMPILER "") + ENDIF(Boost_MINOR_VERSION) + ELSE() + SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}") + ENDIF() + endif() + endif (CMAKE_COMPILER_IS_GNUCXX) + endif() + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "guessed _boost_COMPILER = ${_boost_COMPILER}") + endif() + endif(Boost_COMPILER) + SET (_boost_MULTITHREADED "-mt") + if( NOT Boost_USE_MULTITHREADED ) + set (_boost_MULTITHREADED "") + endif() + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_MULTITHREADED = ${_boost_MULTITHREADED}") + endif() - IF( NOT Boost_USE_MULTITHREADED ) - SET (_boost_MULTITHREADED "") - ENDIF( NOT Boost_USE_MULTITHREADED ) - SET( _boost_STATIC_TAG "") + set( _boost_ABI_TAG "") IF (WIN32) IF(MSVC) SET (_boost_ABI_TAG "g") @@ -418,10 +601,45 @@ ENDIF( Boost_USE_STATIC_LIBS ) ENDIF(WIN32) SET (_boost_ABI_TAG "${_boost_ABI_TAG}d") + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_STATIC_TAG = ${_boost_STATIC_TAG}") + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_ABI_TAG = ${_boost_ABI_TAG}") + endif() # ------------------------------------------------------------------------ # Begin finding boost libraries # ------------------------------------------------------------------------ + + SET(_boost_LIBRARIES_SEARCH_DIRS + C:/boost/lib + C:/boost + "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib" + "$ENV{ProgramFiles}/boost" + C:/library/boost/stage/lib + "C:/Program Files/boost/stage/lib" + C:/boost/lib + /sw/local/lib + ) + IF( BOOST_ROOT ) + SET(_boost_LIBRARIES_SEARCH_DIRS + ${BOOST_ROOT}/lib + ${BOOST_ROOT}/stage/lib + ${_boost_LIBRARIES_SEARCH_DIRS}) + ENDIF( BOOST_ROOT ) + + IF( BOOST_LIBRARYDIR ) + file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR) + SET(_boost_LIBRARIES_SEARCH_DIRS + ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS}) + ENDIF( BOOST_LIBRARYDIR ) + + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] " + "_boost_LIBRARIES_SEARCH_DIRS = ${_boost_LIBRARIES_SEARCH_DIRS}") + endif() + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" ) @@ -441,6 +659,8 @@ FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED} ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG} ${Boost_LIB_PREFIX}boost_${COMPONENT} @@ -450,6 +670,8 @@ FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG} ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG} ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG} @@ -542,6 +764,10 @@ endforeach(COMPONENT) endif (Boost_FOUND) + if(Boost_DEBUG) + message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}") + endif() + if (_Boost_MISSING_COMPONENTS) # We were unable to find some libraries, so generate a sensible # error message that lists the libraries we were unable to find. @@ -623,18 +849,10 @@ ENDIF(Boost_FIND_REQUIRED) ENDIF(Boost_FOUND) - # Under Windows, automatic linking is performed, so no need to specify the libraries. - IF (WIN32) - IF (NOT MINGW) - SET(Boost_LIBRARIES "") - ENDIF (NOT MINGW) - ENDIF(WIN32) - # show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view MARK_AS_ADVANCED(Boost_INCLUDE_DIR Boost_INCLUDE_DIRS Boost_LIBRARY_DIRS - Boost_USE_MULTITHREADED ) ENDIF(_boost_IN_CACHE) Modified: trunk/spark/cmake/FindSDL.cmake =================================================================== --- trunk/spark/cmake/FindSDL.cmake 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/cmake/FindSDL.cmake 2009-02-15 12:09:44 UTC (rev 50) @@ -120,9 +120,9 @@ /opt/local /opt/csw /opt - C:/library/SDL - "C:/Program Files/SDL" - C:/SDL + C:/library/SDL/lib + "C:/Program Files/SDL/lib" + C:/SDL/lib ) ENDIF(NOT ${SDL_INCLUDE_DIR} MATCHES ".framework") ENDIF(NOT SDL_BUILDING_LIBRARY) Added: trunk/spark/cmake/FindZLIB.cmake =================================================================== --- trunk/spark/cmake/FindZLIB.cmake (rev 0) +++ trunk/spark/cmake/FindZLIB.cmake 2009-02-15 12:09:44 UTC (rev 50) @@ -0,0 +1,37 @@ +# - Find zlib +# Find the native ZLIB includes and library +# +# ZLIB_INCLUDE_DIR - where to find zlib.h, etc. +# ZLIB_LIBRARIES - List of libraries when using zlib. +# ZLIB_FOUND - True if zlib found. + + +IF (ZLIB_INCLUDE_DIR) + # Already in cache, be silent + SET(ZLIB_FIND_QUIETLY TRUE) +ENDIF (ZLIB_INCLUDE_DIR) + +FIND_PATH(ZLIB_INCLUDE_DIR zlib.h + C:/library/zlib123 + C:/zlib123 + "C:/Program Files/zlib123" +) + +FIND_LIBRARY(ZLIB_LIBRARY zlib1.lib + C:/library/zlib123/projects/visualc6/Win32_DLL_Release + C:/zlib123/projects/visualc6/Win32_DLL_Release + "C:/Program Files/zlib123/projects/visualc6/Win32_DLL_Release" +) + +# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARY ZLIB_INCLUDE_DIR) + +IF(ZLIB_FOUND) + SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} ) +ELSE(ZLIB_FOUND) + SET( ZLIB_LIBRARIES ) +ENDIF(ZLIB_FOUND) + +MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR ) Modified: trunk/spark/lib/zeitgeist/CMakeLists.txt =================================================================== --- trunk/spark/lib/zeitgeist/CMakeLists.txt 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/lib/zeitgeist/CMakeLists.txt 2009-02-15 12:09:44 UTC (rev 50) @@ -51,7 +51,7 @@ #telnetserver/telnetdaemon.cpp #telnetserver/telnetserver.cpp #telnetserver/telnetserver_c.cpp - #telnetserver/telnetsession.c + #telnetserver/telnetsession.cpp ) include_directories(${CMAKE_SOURCE_DIR}/lib ${RUBY_INCLUDE_PATH}) Modified: trunk/spark/plugin/imageperceptor/imageperceptor.cpp =================================================================== --- trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/plugin/imageperceptor/imageperceptor.cpp 2009-02-15 12:09:44 UTC (rev 50) @@ -2,7 +2,7 @@ this file is part of rcssserver3D Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group - $Id:$ + $Id$ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,7 +21,14 @@ // #include <IL/il.h> // #include <IL/ilu.h> // #include <sstream> +#ifndef WIN32 #include <GL/gl.h> +#else +#include <windows.h> +#include <GL/gl.h> +#include <GL/glext.h> +#endif + #include "imageperceptor.h" #include <zeitgeist/logserver/logserver.h> Modified: trunk/spark/plugin/inputsdl/inputdevicesdl.h =================================================================== --- trunk/spark/plugin/inputsdl/inputdevicesdl.h 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/plugin/inputsdl/inputdevicesdl.h 2009-02-15 12:09:44 UTC (rev 50) @@ -33,7 +33,7 @@ #ifndef WIN32 #include <SDL/SDL.h> #else -#include <include/SDL.h> +#include <SDL.h> #endif /** \class InputDeviceSDL Modified: trunk/spark/plugin/inputsdl/inputsystemsdl.cpp =================================================================== --- trunk/spark/plugin/inputsdl/inputsystemsdl.cpp 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/plugin/inputsdl/inputsystemsdl.cpp 2009-02-15 12:09:44 UTC (rev 50) @@ -28,8 +28,8 @@ #include <SDL/SDL_thread.h> #include <SDL/SDL_syswm.h> #else -#include <include/SDL_thread.h> -#include <include/SDL_syswm.h> +#include <SDL_thread.h> +#include <SDL_syswm.h> #endif #include "timersdl.h" Modified: trunk/spark/plugin/inputsdl/inputsystemsdl.h =================================================================== --- trunk/spark/plugin/inputsdl/inputsystemsdl.h 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/plugin/inputsdl/inputsystemsdl.h 2009-02-15 12:09:44 UTC (rev 50) @@ -34,7 +34,7 @@ #ifndef WIN32 #include <SDL/SDL.h> #else -#include <include/SDL.h> +#include <SDL.h> #endif struct SDL_mutex; Modified: trunk/spark/plugin/openglsyssdl/openglsystemsdl.cpp =================================================================== --- trunk/spark/plugin/openglsyssdl/openglsystemsdl.cpp 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/plugin/openglsyssdl/openglsystemsdl.cpp 2009-02-15 12:09:44 UTC (rev 50) @@ -27,7 +27,7 @@ #ifndef WIN32 #include <SDL/SDL.h> #else -#include <include/SDL.h> +#include <SDL.h> #endif using namespace std; Modified: trunk/spark/test/fonttest/main.cpp =================================================================== --- trunk/spark/test/fonttest/main.cpp 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/test/fonttest/main.cpp 2009-02-15 12:09:44 UTC (rev 50) @@ -3,7 +3,7 @@ #ifndef WIN32 #include <SDL/SDL.h> #else -#include <include/SDL.h> +#include <SDL.h> #endif #ifdef _WIN32 #include <windows.h> Modified: trunk/spark/test/inputtest/main.cpp =================================================================== --- trunk/spark/test/inputtest/main.cpp 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/test/inputtest/main.cpp 2009-02-15 12:09:44 UTC (rev 50) @@ -3,7 +3,7 @@ #ifndef WIN32 #include <SDL/SDL.h> #else -#include <include/SDL.h> +#include <SDL.h> #endif #ifdef _WIN32 #include <windows.h> Modified: trunk/spark/test/scenetest/main.cpp =================================================================== --- trunk/spark/test/scenetest/main.cpp 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/test/scenetest/main.cpp 2009-02-15 12:09:44 UTC (rev 50) @@ -4,7 +4,7 @@ #ifndef WIN32 #include <SDL/SDL.h> #else -#include <include/SDL.h> +#include <SDL.h> #endif #include <zeitgeist/fileserver/fileserver.h> Modified: trunk/spark/test/scenetest/md5mesh.cpp =================================================================== --- trunk/spark/test/scenetest/md5mesh.cpp 2009-02-12 08:15:05 UTC (rev 49) +++ trunk/spark/test/scenetest/md5mesh.cpp 2009-02-15 12:09:44 UTC (rev 50) @@ -450,7 +450,11 @@ if (mMeshes!=0) { const salt::Matrix &mat = GetWorldTransform(); + +#ifndef WIN32 #warning "Commented out calls to glProgramLocalParameter4fARB" +#endif + #if 0 glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 0, mat(0,0), mat(0,1), mat(0,2), mat(0,3)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-02-17 11:54:58
|
Revision: 51 http://simspark.svn.sourceforge.net/simspark/?rev=51&view=rev Author: marianbuchta Date: 2009-02-17 11:53:43 +0000 (Tue, 17 Feb 2009) Log Message: ----------- Windows platform compatibility: -add CRT_SECURE_NO_WARNINGS preprocessor definition -add include directories -add missing headers files (OpenGL Extension Registry) Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/lib/kerosin/CMakeLists.txt trunk/spark/plugin/filesystemzip/CMakeLists.txt trunk/spark/plugin/imageperceptor/CMakeLists.txt trunk/spark/plugin/openglsyssdl/CMakeLists.txt trunk/spark/plugin/rosimporter/CMakeLists.txt trunk/spark/spark/CMakeLists.txt trunk/spark/test/fonttest/CMakeLists.txt trunk/spark/test/inputtest/CMakeLists.txt trunk/spark/test/scenetest/CMakeLists.txt trunk/spark/utility/rcssnet/CMakeLists.txt Added Paths: ----------- trunk/spark/windows/include/ trunk/spark/windows/include/GL/ trunk/spark/windows/include/GL/glext.h trunk/spark/windows/include/GL/glxext.h trunk/spark/windows/include/GL/wglext.h Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2009-02-15 12:09:44 UTC (rev 50) +++ trunk/spark/CMakeLists.txt 2009-02-17 11:53:43 UTC (rev 51) @@ -96,6 +96,11 @@ mark_as_advanced(BINDIR LIBDIR DATADIR INCLUDEDIR) +if(WIN32) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) + include_directories(${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR}) +endif(WIN32) + ########## library version numbers ########## set(SALT_SO_VERSION 0) set(SALT_VERSION ${SALT_SO_VERSION}.3.1) Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-02-15 12:09:44 UTC (rev 50) +++ trunk/spark/ChangeLog 2009-02-17 11:53:43 UTC (rev 51) @@ -1,3 +1,26 @@ +2009-02-17 Marian Buchta <mar...@gm...> + + * CMakeLists.txt + - add CRT_SECURE_NO_WARNINGS + - add include directories for Windows platform + + * lib/kerosin/CMakeLists.txt + * plugin/filesystemzip/CMakeLists.txt + * plugin/imageperceptor/CMakeLists.txt + * plugin/openglsyssdl/CMakeLists.txt + * plugin/rosimporter/CMakeLists.txt + * spark/CMakeLists.txt + * test/fonttest/CMakeLists.txt + * test/inputtest/CMakeLists.txt + * test/scenetest/CMakeLists.txt + * utility/rcssnet/CMakeLists.txt + - add include directories for Windows platform + + * windows/include/GL/glext.h + * windows/include/GL/glxext.h + * windows/include/GL/wglext.h + - add missing headers files (OpenGL Extension Registry) + 2009-02-15 Marian Buchta <mar...@gm...> * CMakeLists.txt Modified: trunk/spark/lib/kerosin/CMakeLists.txt =================================================================== --- trunk/spark/lib/kerosin/CMakeLists.txt 2009-02-15 12:09:44 UTC (rev 50) +++ trunk/spark/lib/kerosin/CMakeLists.txt 2009-02-17 11:53:43 UTC (rev 51) @@ -116,8 +116,11 @@ renderserver/customrender_c.cpp ) -include_directories(${CMAKE_SOURCE_DIR}/lib ${FREETYPE_INCLUDE_DIRS} - ${DevIL_INCLUDE_DIR} ${SDL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) +if(WIN32) + include_directories(${CMAKE_SOURCE_DIR}/lib ${FREETYPE_INCLUDE_DIRS} ${DevIL_INCLUDE_DIR} ${SDL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/windows/include) +else(WIN32) + include_directories(${CMAKE_SOURCE_DIR}/lib ${FREETYPE_INCLUDE_DIRS} ${DevIL_INCLUDE_DIR} ${SDL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) +endif(WIN32) add_library(kerosin SHARED ${kerosin_LIB_SRCS} ${kerosin_LIB_HDRS}) Modified: trunk/spark/plugin/filesystemzip/CMakeLists.txt =================================================================== --- trunk/spark/plugin/filesystemzip/CMakeLists.txt 2009-02-15 12:09:44 UTC (rev 50) +++ trunk/spark/plugin/filesystemzip/CMakeLists.txt 2009-02-17 11:53:43 UTC (rev 51) @@ -11,6 +11,10 @@ if (Boost_REGEX_FOUND) add_library(filesystemzip MODULE ${filesystemzip_LIB_SRCS}) + if(WIN32) + include_directories(${ZLIB_INCLUDE_DIR}) + endif(WIN32) + target_link_libraries(filesystemzip ${Boost_REGEX_LIBRARY}) set_target_properties(filesystemzip PROPERTIES VERSION 0.0.0 SOVERSION 0) Modified: trunk/spark/plugin/imageperceptor/CMakeLists.txt =================================================================== --- trunk/spark/plugin/imageperceptor/CMakeLists.txt 2009-02-15 12:09:44 UTC (rev 50) +++ trunk/spark/plugin/imageperceptor/CMakeLists.txt 2009-02-17 11:53:43 UTC (rev 51) @@ -8,6 +8,10 @@ imageperceptor_c.cpp ) +if(WIN32) + include_directories(${CMAKE_SOURCE_DIR}/windows/include) +endif(WIN32) + add_library(imageperceptor MODULE ${imageperceptor_LIB_SRCS}) target_link_libraries(imageperceptor) Modified: trunk/spark/plugin/openglsyssdl/CMakeLists.txt =================================================================== --- trunk/spark/plugin/openglsyssdl/CMakeLists.txt 2009-02-15 12:09:44 UTC (rev 50) +++ trunk/spark/plugin/openglsyssdl/CMakeLists.txt 2009-02-17 11:53:43 UTC (rev 51) @@ -8,6 +8,10 @@ openglsystemsdl_c.cpp ) +if(WIN32) + include_directories(${CMAKE_SOURCE_DIR}/windows/include ${SDL_INCLUDE_DIR}) +endif(WIN32) + add_library(openglsyssdl MODULE ${openglsyssdl_LIB_SRCS}) target_link_libraries(openglsyssdl) Modified: trunk/spark/plugin/rosimporter/CMakeLists.txt =================================================================== --- trunk/spark/plugin/rosimporter/CMakeLists.txt 2009-02-15 12:09:44 UTC (rev 50) +++ trunk/spark/plugin/rosimporter/CMakeLists.txt 2009-02-17 11:53:43 UTC (rev 51) @@ -9,6 +9,10 @@ rosimporter_c.cpp ) +if(WIN32) + include_directories(${CMAKE_SOURCE_DIR}/windows/include) +endif(WIN32) + add_library(rosimporter MODULE ${rosimporter_LIB_SRCS}) target_link_libraries(rosimporter tinyxml_ex) Modified: trunk/spark/spark/CMakeLists.txt =================================================================== --- trunk/spark/spark/CMakeLists.txt 2009-02-15 12:09:44 UTC (rev 50) +++ trunk/spark/spark/CMakeLists.txt 2009-02-17 11:53:43 UTC (rev 51) @@ -5,8 +5,11 @@ spark.h ) -include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility - ${FREETYPE_INCLUDE_DIRS}) +if(WIN32) + include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility ${FREETYPE_INCLUDE_DIRS} ${DevIL_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/windows/include) +else(WIN32) + include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility ${FREETYPE_INCLUDE_DIRS}) +endif(WIN32) add_library(spark SHARED ${spark_LIB_SRCS}) Modified: trunk/spark/test/fonttest/CMakeLists.txt =================================================================== --- trunk/spark/test/fonttest/CMakeLists.txt 2009-02-15 12:09:44 UTC (rev 50) +++ trunk/spark/test/fonttest/CMakeLists.txt 2009-02-17 11:53:43 UTC (rev 51) @@ -5,7 +5,11 @@ main.cpp ) -include_directories(${SDL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS}) +if(WIN32) + include_directories(${SDL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${DevIL_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/windows/include) +else(WIN32) + include_directories(${SDL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS}) +endif(WIN32) add_executable(fonttest ${fonttest_SRCS}) Modified: trunk/spark/test/inputtest/CMakeLists.txt =================================================================== --- trunk/spark/test/inputtest/CMakeLists.txt 2009-02-15 12:09:44 UTC (rev 50) +++ trunk/spark/test/inputtest/CMakeLists.txt 2009-02-17 11:53:43 UTC (rev 51) @@ -5,7 +5,11 @@ main.cpp ) -include_directories(${SDL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS}) +if(WIN32) + include_directories(${SDL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${DevIL_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/windows/include) +else(WIN32) + include_directories(${SDL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS}) +endif(WIN32) add_executable(inputtest ${inputtest_SRCS}) Modified: trunk/spark/test/scenetest/CMakeLists.txt =================================================================== --- trunk/spark/test/scenetest/CMakeLists.txt 2009-02-15 12:09:44 UTC (rev 50) +++ trunk/spark/test/scenetest/CMakeLists.txt 2009-02-17 11:53:43 UTC (rev 51) @@ -8,7 +8,11 @@ md5mesh_c.cpp ) -include_directories(${SDL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS}) +if(WIN32) + include_directories(${SDL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${DevIL_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/windows/include) +else(WIN32) + include_directories(${SDL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS}) +endif(WIN32) add_executable(scenetest ${scenetest_SRCS}) Modified: trunk/spark/utility/rcssnet/CMakeLists.txt =================================================================== --- trunk/spark/utility/rcssnet/CMakeLists.txt 2009-02-15 12:09:44 UTC (rev 50) +++ trunk/spark/utility/rcssnet/CMakeLists.txt 2009-02-17 11:53:43 UTC (rev 51) @@ -23,7 +23,11 @@ add_library(rcssnet3D SHARED ${rcssnet3D_LIB_SRCS} ${rcssnet3D_LIB_HDRS}) -target_link_libraries(rcssnet3D ${NET_LIBS}) +if(WIN32) + target_link_libraries(rcssnet3D ${NET_LIBS} WS2_32.lib) +else(WIN32) + target_link_libraries(rcssnet3D ${NET_LIBS}) +endif(WIN32) set_target_properties(rcssnet3D PROPERTIES VERSION ${RCSSNET_VERSION} SOVERSION ${RCSSNET_SO_VERSION}) Added: trunk/spark/windows/include/GL/glext.h =================================================================== --- trunk/spark/windows/include/GL/glext.h (rev 0) +++ trunk/spark/windows/include/GL/glext.h 2009-02-17 11:53:43 UTC (rev 51) @@ -0,0 +1,8395 @@ +#ifndef __glext_h_ +#define __glext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) +#define WIN32_LEAN_AND_MEAN 1 +#include <windows.h> +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif +#ifndef APIENTRYP +#define APIENTRYP APIENTRY * +#endif +#ifndef GLAPI +#define GLAPI extern +#endif + +/*************************************************************/ + +/* Header file version number, required by OpenGL ABI for Linux */ +/* glext.h last updated 2008/08/16 */ +/* Current version at http://www.opengl.org/registry/ */ +#define GL_GLEXT_VERSION 42 + +#ifndef GL_VERSION_1_2 +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_RESCALE_NORMAL 0x803A +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 +#define GL_SINGLE_COLOR 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR 0x81FA +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#endif + +#ifndef GL_ARB_imaging +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_FUNC_ADD 0x8006 +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_BLEND_EQUATION 0x8009 +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_CONVOLUTION_1D 0x8010 +#define GL_CONVOLUTION_2D 0x8011 +#define GL_SEPARABLE_2D 0x8012 +#define GL_CONVOLUTION_BORDER_MODE 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS 0x8015 +#define GL_REDUCE 0x8016 +#define GL_CONVOLUTION_FORMAT 0x8017 +#define GL_CONVOLUTION_WIDTH 0x8018 +#define GL_CONVOLUTION_HEIGHT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 +#define GL_HISTOGRAM 0x8024 +#define GL_PROXY_HISTOGRAM 0x8025 +#define GL_HISTOGRAM_WIDTH 0x8026 +#define GL_HISTOGRAM_FORMAT 0x8027 +#define GL_HISTOGRAM_RED_SIZE 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C +#define GL_HISTOGRAM_SINK 0x802D +#define GL_MINMAX 0x802E +#define GL_MINMAX_FORMAT 0x802F +#define GL_MINMAX_SINK 0x8030 +#define GL_TABLE_TOO_LARGE 0x8031 +#define GL_COLOR_MATRIX 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB +#define GL_COLOR_TABLE 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 +#define GL_PROXY_COLOR_TABLE 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 +#define GL_COLOR_TABLE_SCALE 0x80D6 +#define GL_COLOR_TABLE_BIAS 0x80D7 +#define GL_COLOR_TABLE_FORMAT 0x80D8 +#define GL_COLOR_TABLE_WIDTH 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF +#define GL_CONSTANT_BORDER 0x8151 +#define GL_REPLICATE_BORDER 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR 0x8154 +#endif + +#ifndef GL_VERSION_1_3 +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +#define GL_MAX_TEXTURE_UNITS 0x84E2 +#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_MULTISAMPLE_BIT 0x20000000 +#define GL_NORMAL_MAP 0x8511 +#define GL_REFLECTION_MAP 0x8512 +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_COMPRESSED_ALPHA 0x84E9 +#define GL_COMPRESSED_LUMINANCE 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB +#define GL_COMPRESSED_INTENSITY 0x84EC +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_CLAMP_TO_BORDER 0x812D +#define GL_COMBINE 0x8570 +#define GL_COMBINE_RGB 0x8571 +#define GL_COMBINE_ALPHA 0x8572 +#define GL_SOURCE0_RGB 0x8580 +#define GL_SOURCE1_RGB 0x8581 +#define GL_SOURCE2_RGB 0x8582 +#define GL_SOURCE0_ALPHA 0x8588 +#define GL_SOURCE1_ALPHA 0x8589 +#define GL_SOURCE2_ALPHA 0x858A +#define GL_OPERAND0_RGB 0x8590 +#define GL_OPERAND1_RGB 0x8591 +#define GL_OPERAND2_RGB 0x8592 +#define GL_OPERAND0_ALPHA 0x8598 +#define GL_OPERAND1_ALPHA 0x8599 +#define GL_OPERAND2_ALPHA 0x859A +#define GL_RGB_SCALE 0x8573 +#define GL_ADD_SIGNED 0x8574 +#define GL_INTERPOLATE 0x8575 +#define GL_SUBTRACT 0x84E7 +#define GL_CONSTANT 0x8576 +#define GL_PRIMARY_COLOR 0x8577 +#define GL_PREVIOUS 0x8578 +#define GL_DOT3_RGB 0x86AE +#define GL_DOT3_RGBA 0x86AF +#endif + +#ifndef GL_VERSION_1_4 +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_POINT_SIZE_MIN 0x8126 +#define GL_POINT_SIZE_MAX 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION 0x8129 +#define GL_GENERATE_MIPMAP 0x8191 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_DEPTH_COMPONENT32 0x81A7 +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_FOG_COORDINATE_SOURCE 0x8450 +#define GL_FOG_COORDINATE 0x8451 +#define GL_FRAGMENT_DEPTH 0x8452 +#define GL_CURRENT_FOG_COORDINATE 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 +#define GL_FOG_COORDINATE_ARRAY 0x8457 +#define GL_COLOR_SUM 0x8458 +#define GL_CURRENT_SECONDARY_COLOR 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D +#define GL_SECONDARY_COLOR_ARRAY 0x845E +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_FILTER_CONTROL 0x8500 +#define GL_TEXTURE_LOD_BIAS 0x8501 +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_DEPTH_TEXTURE_MODE 0x884B +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_COMPARE_R_TO_TEXTURE 0x884E +#endif + +#ifndef GL_VERSION_1_5 +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_QUERY_COUNTER_BITS 0x8864 +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_READ_ONLY 0x88B8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_READ_WRITE 0x88BA +#define GL_BUFFER_ACCESS 0x88BB +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_SAMPLES_PASSED 0x8914 +#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE +#define GL_FOG_COORD GL_FOG_COORDINATE +#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE +#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE +#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE +#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER +#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY +#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING +#define GL_SRC0_RGB GL_SOURCE0_RGB +#define GL_SRC1_RGB GL_SOURCE1_RGB +#define GL_SRC2_RGB GL_SOURCE2_RGB +#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA +#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA +#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA +#endif + +#ifndef GL_VERSION_2_0 +#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_POINT_SPRITE 0x8861 +#define GL_COORD_REPLACE 0x8862 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_MAX_TEXTURE_COORDS 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_MAX_VARYING_FLOATS 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_SHADER_TYPE 0x8B4F +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_1D 0x8B5D +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_SAMPLER_1D_SHADOW 0x8B61 +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_DELETE_STATUS 0x8B80 +#define GL_COMPILE_STATUS 0x8B81 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +#define GL_LOWER_LEFT 0x8CA1 +#define GL_UPPER_LEFT 0x8CA2 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#endif + +#ifndef GL_VERSION_2_1 +#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB_ALPHA 0x8C42 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_SLUMINANCE_ALPHA 0x8C44 +#define GL_SLUMINANCE8_ALPHA8 0x8C45 +#define GL_SLUMINANCE 0x8C46 +#define GL_SLUMINANCE8 0x8C47 +#define GL_COMPRESSED_SRGB 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 +#define GL_COMPRESSED_SLUMINANCE 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B +#endif + +#ifndef GL_VERSION_3_0 +#define GL_COMPARE_REF_TO_TEXTURE GL_COMPARE_R_TO_TEXTURE_ARB +#define GL_CLIP_DISTANCE0 GL_CLIP_PLANE0 +#define GL_CLIP_DISTANCE1 GL_CLIP_PLANE1 +#define GL_CLIP_DISTANCE2 GL_CLIP_PLANE2 +#define GL_CLIP_DISTANCE3 GL_CLIP_PLANE3 +#define GL_CLIP_DISTANCE4 GL_CLIP_PLANE4 +#define GL_CLIP_DISTANCE5 GL_CLIP_PLANE5 +#define GL_MAX_CLIP_DISTANCES GL_MAX_CLIP_PLANES +#define GL_MAJOR_VERSION 0x821B +#define GL_MINOR_VERSION 0x821C +#define GL_NUM_EXTENSIONS 0x821D +#define GL_CONTEXT_FLAGS 0x821E +#define GL_DEPTH_BUFFER 0x8223 +#define GL_STENCIL_BUFFER 0x8224 +#define GL_COMPRESSED_RED 0x8225 +#define GL_COMPRESSED_RG 0x8226 +#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001 +#define GL_RGBA32F 0x8814 +#define GL_RGB32F 0x8815 +#define GL_RGBA16F 0x881A +#define GL_RGB16F 0x881B +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_CLAMP_VERTEX_COLOR 0x891A +#define GL_CLAMP_FRAGMENT_COLOR 0x891B +#define GL_CLAMP_READ_COLOR 0x891C +#define GL_FIXED_ONLY 0x891D +#define GL_MAX_VARYING_COMPONENTS GL_MAX_VARYING_FLOATS +#define GL_TEXTURE_RED_TYPE 0x8C10 +#define GL_TEXTURE_GREEN_TYPE 0x8C11 +#define GL_TEXTURE_BLUE_TYPE 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE 0x8C13 +#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE 0x8C15 +#define GL_TEXTURE_DEPTH_TYPE 0x8C16 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_TEXTURE_1D_ARRAY 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_RGB9_E5 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_TEXTURE_SHARED_SIZE 0x8C3F +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_PRIMITIVES_GENERATED 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_RGBA32UI 0x8D70 +#define GL_RGB32UI 0x8D71 +#define GL_RGBA16UI 0x8D76 +#define GL_RGB16UI 0x8D77 +#define GL_RGBA8UI 0x8D7C +#define GL_RGB8UI 0x8D7D +#define GL_RGBA32I 0x8D82 +#define GL_RGB32I 0x8D83 +#define GL_RGBA16I 0x8D88 +#define GL_RGB16I 0x8D89 +#define GL_RGBA8I 0x8D8E +#define GL_RGB8I 0x8D8F +#define GL_RED_INTEGER 0x8D94 +#define GL_GREEN_INTEGER 0x8D95 +#define GL_BLUE_INTEGER 0x8D96 +#define GL_ALPHA_INTEGER 0x8D97 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_BGR_INTEGER 0x8D9A +#define GL_BGRA_INTEGER 0x8D9B +#define GL_SAMPLER_1D_ARRAY 0x8DC0 +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_INT_SAMPLER_1D 0x8DC9 +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_QUERY_WAIT 0x8E13 +#define GL_QUERY_NO_WAIT 0x8E14 +#define GL_QUERY_BY_REGION_WAIT 0x8E15 +#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 +/* Reuse tokens from ARB_depth_buffer_float */ +/* reuse GL_DEPTH_COMPONENT32F */ +/* reuse GL_DEPTH32F_STENCIL8 */ +/* reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV */ +/* Reuse tokens from ARB_framebuffer_object */ +/* reuse GL_INVALID_FRAMEBUFFER_OPERATION */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ +/* reuse GL_FRAMEBUFFER_DEFAULT */ +/* reuse GL_FRAMEBUFFER_UNDEFINED */ +/* reuse GL_DEPTH_STENCIL_ATTACHMENT */ +/* reuse GL_INDEX */ +/* reuse GL_MAX_RENDERBUFFER_SIZE */ +/* reuse GL_DEPTH_STENCIL */ +/* reuse GL_UNSIGNED_INT_24_8 */ +/* reuse GL_DEPTH24_STENCIL8 */ +/* reuse GL_TEXTURE_STENCIL_SIZE */ +/* reuse GL_TEXTURE_RED_TYPE */ +/* reuse GL_TEXTURE_GREEN_TYPE */ +/* reuse GL_TEXTURE_BLUE_TYPE */ +/* reuse GL_TEXTURE_ALPHA_TYPE */ +/* reuse GL_TEXTURE_LUMINANCE_TYPE */ +/* reuse GL_TEXTURE_INTENSITY_TYPE */ +/* reuse GL_TEXTURE_DEPTH_TYPE */ +/* reuse GL_UNSIGNED_NORMALIZED */ +/* reuse GL_FRAMEBUFFER_BINDING */ +/* reuse GL_DRAW_FRAMEBUFFER_BINDING */ +/* reuse GL_RENDERBUFFER_BINDING */ +/* reuse GL_READ_FRAMEBUFFER */ +/* reuse GL_DRAW_FRAMEBUFFER */ +/* reuse GL_READ_FRAMEBUFFER_BINDING */ +/* reuse GL_RENDERBUFFER_SAMPLES */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ +/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ +/* reuse GL_FRAMEBUFFER_COMPLETE */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ +/* reuse GL_FRAMEBUFFER_UNSUPPORTED */ +/* reuse GL_MAX_COLOR_ATTACHMENTS */ +/* reuse GL_COLOR_ATTACHMENT0 */ +/* reuse GL_COLOR_ATTACHMENT1 */ +/* reuse GL_COLOR_ATTACHMENT2 */ +/* reuse GL_COLOR_ATTACHMENT3 */ +/* reuse GL_COLOR_ATTACHMENT4 */ +/* reuse GL_COLOR_ATTACHMENT5 */ +/* reuse GL_COLOR_ATTACHMENT6 */ +/* reuse GL_COLOR_ATTACHMENT7 */ +/* reuse GL_COLOR_ATTACHMENT8 */ +/* reuse GL_COLOR_ATTACHMENT9 */ +/* reuse GL_COLOR_ATTACHMENT10 */ +/* reuse GL_COLOR_ATTACHMENT11 */ +/* reuse GL_COLOR_ATTACHMENT12 */ +/* reuse GL_COLOR_ATTACHMENT13 */ +/* reuse GL_COLOR_ATTACHMENT14 */ +/* reuse GL_COLOR_ATTACHMENT15 */ +/* reuse GL_DEPTH_ATTACHMENT */ +/* reuse GL_STENCIL_ATTACHMENT */ +/* reuse GL_FRAMEBUFFER */ +/* reuse GL_RENDERBUFFER */ +/* reuse GL_RENDERBUFFER_WIDTH */ +/* reuse GL_RENDERBUFFER_HEIGHT */ +/* reuse GL_RENDERBUFFER_INTERNAL_FORMAT */ +/* reuse GL_STENCIL_INDEX1 */ +/* reuse GL_STENCIL_INDEX4 */ +/* reuse GL_STENCIL_INDEX8 */ +/* reuse GL_STENCIL_INDEX16 */ +/* reuse GL_RENDERBUFFER_RED_SIZE */ +/* reuse GL_RENDERBUFFER_GREEN_SIZE */ +/* reuse GL_RENDERBUFFER_BLUE_SIZE */ +/* reuse GL_RENDERBUFFER_ALPHA_SIZE */ +/* reuse GL_RENDERBUFFER_DEPTH_SIZE */ +/* reuse GL_RENDERBUFFER_STENCIL_SIZE */ +/* reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ +/* reuse GL_MAX_SAMPLES */ +/* Reuse tokens from ARB_framebuffer_sRGB */ +/* reuse GL_FRAMEBUFFER_SRGB */ +/* Reuse tokens from ARB_half_float_vertex */ +/* reuse GL_HALF_FLOAT */ +/* Reuse tokens from ARB_map_buffer_range */ +/* reuse GL_MAP_READ_BIT */ +/* reuse GL_MAP_WRITE_BIT */ +/* reuse GL_MAP_INVALIDATE_RANGE_BIT */ +/* reuse GL_MAP_INVALIDATE_BUFFER_BIT */ +/* reuse GL_MAP_FLUSH_EXPLICIT_BIT */ +/* reuse GL_MAP_UNSYNCHRONIZED_BIT */ +/* Reuse tokens from ARB_texture_compression_rgtc */ +/* reuse GL_COMPRESSED_RED_RGTC1 */ +/* reuse GL_COMPRESSED_SIGNED_RED_RGTC1 */ +/* reuse GL_COMPRESSED_RG_RGTC2 */ +/* reuse GL_COMPRESSED_SIGNED_RG_RGTC2 */ +/* Reuse tokens from ARB_texture_rg */ +/* reuse GL_RG */ +/* reuse GL_RG_INTEGER */ +/* reuse GL_R8 */ +/* reuse GL_R16 */ +/* reuse GL_RG8 */ +/* reuse GL_RG16 */ +/* reuse GL_R16F */ +/* reuse GL_R32F */ +/* reuse GL_RG16F */ +/* reuse GL_RG32F */ +/* reuse GL_R8I */ +/* reuse GL_R8UI */ +/* reuse GL_R16I */ +/* reuse GL_R16UI */ +/* reuse GL_R32I */ +/* reuse GL_R32UI */ +/* reuse GL_RG8I */ +/* reuse GL_RG8UI */ +/* reuse GL_RG16I */ +/* reuse GL_RG16UI */ +/* reuse GL_RG32I */ +/* reuse GL_RG32UI */ +/* Reuse tokens from ARB_vertex_array_object */ +/* reuse GL_VERTEX_ARRAY_BINDING */ +#endif + +#ifndef GL_ARB_multitexture +#define GL_TEXTURE0_ARB 0x84C0 +#define GL_TEXTURE1_ARB 0x84C1 +#define GL_TEXTURE2_ARB 0x84C2 +#define GL_TEXTURE3_ARB 0x84C3 +#define GL_TEXTURE4_ARB 0x84C4 +#define GL_TEXTURE5_ARB 0x84C5 +#define GL_TEXTURE6_ARB 0x84C6 +#define GL_TEXTURE7_ARB 0x84C7 +#define GL_TEXTURE8_ARB 0x84C8 +#define GL_TEXTURE9_ARB 0x84C9 +#define GL_TEXTURE10_ARB 0x84CA +#define GL_TEXTURE11_ARB 0x84CB +#define GL_TEXTURE12_ARB 0x84CC +#define GL_TEXTURE13_ARB 0x84CD +#define GL_TEXTURE14_ARB 0x84CE +#define GL_TEXTURE15_ARB 0x84CF +#define GL_TEXTURE16_ARB 0x84D0 +#define GL_TEXTURE17_ARB 0x84D1 +#define GL_TEXTURE18_ARB 0x84D2 +#define GL_TEXTURE19_ARB 0x84D3 +#define GL_TEXTURE20_ARB 0x84D4 +#define GL_TEXTURE21_ARB 0x84D5 +#define GL_TEXTURE22_ARB 0x84D6 +#define GL_TEXTURE23_ARB 0x84D7 +#define GL_TEXTURE24_ARB 0x84D8 +#define GL_TEXTURE25_ARB 0x84D9 +#define GL_TEXTURE26_ARB 0x84DA +#define GL_TEXTURE27_ARB 0x84DB +#define GL_TEXTURE28_ARB 0x84DC +#define GL_TEXTURE29_ARB 0x84DD +#define GL_TEXTURE30_ARB 0x84DE +#define GL_TEXTURE31_ARB 0x84DF +#define GL_ACTIVE_TEXTURE_ARB 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 +#endif + +#ifndef GL_ARB_transpose_matrix +#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 +#endif + +#ifndef GL_ARB_multisample +#define GL_MULTISAMPLE_ARB 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F +#define GL_SAMPLE_COVERAGE_ARB 0x80A0 +#define GL_SAMPLE_BUFFERS_ARB 0x80A8 +#define GL_SAMPLES_ARB 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB +#define GL_MULTISAMPLE_BIT_ARB 0x20000000 +#endif + +#ifndef GL_ARB_texture_env_add +#endif + +#ifndef GL_ARB_texture_cube_map +#define GL_NORMAL_MAP_ARB 0x8511 +#define GL_REFLECTION_MAP_ARB 0x8512 +#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C +#endif + +#ifndef GL_ARB_texture_compression +#define GL_COMPRESSED_ALPHA_ARB 0x84E9 +#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB +#define GL_COMPRESSED_INTENSITY_ARB 0x84EC +#define GL_COMPRESSED_RGB_ARB 0x84ED +#define GL_COMPRESSED_RGBA_ARB 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 +#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 +#endif + +#ifndef GL_ARB_texture_border_clamp +#define GL_CLAMP_TO_BORDER_ARB 0x812D +#endif + +#ifndef GL_ARB_point_parameters +#define GL_POINT_SIZE_MIN_ARB 0x8126 +#define GL_POINT_SIZE_MAX_ARB 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 +#endif + +#ifndef GL_ARB_vertex_blend +#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 +#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 +#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 +#define GL_VERTEX_BLEND_ARB 0x86A7 +#define GL_CURRENT_WEIGHT_ARB 0x86A8 +#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 +#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA +#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB +#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC +#define GL_WEIGHT_ARRAY_ARB 0x86AD +#define GL_MODELVIEW0_ARB 0x1700 +#define GL_MODELVIEW1_ARB 0x850A +#define GL_MODELVIEW2_ARB 0x8722 +#define GL_MODELVIEW3_ARB 0x8723 +#define GL_MODELVIEW4_ARB 0x8724 +#define GL_MODELVIEW5_ARB 0x8725 +#define GL_MODELVIEW6_ARB 0x8726 +#define GL_MODELVIEW7_ARB 0x8727 +#define GL_MODELVIEW8_ARB 0x8728 +#define GL_MODELVIEW9_ARB 0x8729 +#define GL_MODELVIEW10_ARB 0x872A +#define GL_MODELVIEW11_ARB 0x872B +#define GL_MODELVIEW12_ARB 0x872C +#define GL_MODELVIEW13_ARB 0x872D +#define GL_MODELVIEW14_ARB 0x872E +#define GL_MODELVIEW15_ARB 0x872F +#define GL_MODELVIEW16_ARB 0x8730 +#define GL_MODELVIEW17_ARB 0x8731 +#define GL_MODELVIEW18_ARB 0x8732 +#define GL_MODELVIEW19_ARB 0x8733 +#define GL_MODELVIEW20_ARB 0x8734 +#define GL_MODELVIEW21_ARB 0x8735 +#define GL_MODELVIEW22_ARB 0x8736 +#define GL_MODELVIEW23_ARB 0x8737 +#define GL_MODELVIEW24_ARB 0x8738 +#define GL_MODELVIEW25_ARB 0x8739 +#define GL_MODELVIEW26_ARB 0x873A +#define GL_MODELVIEW27_ARB 0x873B +#define GL_MODELVIEW28_ARB 0x873C +#define GL_MODELVIEW29_ARB 0x873D +#define GL_MODELVIEW30_ARB 0x873E +#define GL_MODELVIEW31_ARB 0x873F +#endif + +#ifndef GL_ARB_matrix_palette +#define GL_MATRIX_PALETTE_ARB 0x8840 +#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 +#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 +#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 +#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 +#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 +#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 +#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 +#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 +#endif + +#ifndef GL_ARB_texture_env_combine +#define GL_COMBINE_ARB 0x8570 +#define GL_COMBINE_RGB_ARB 0x8571 +#define GL_COMBINE_ALPHA_ARB 0x8572 +#define GL_SOURCE0_RGB_ARB 0x8580 +#define GL_SOURCE1_RGB_ARB 0x8581 +#define GL_SOURCE2_RGB_ARB 0x8582 +#define GL_SOURCE0_ALPHA_ARB 0x8588 +#define GL_SOURCE1_ALPHA_ARB 0x8589 +#define GL_SOURCE2_ALPHA_ARB 0x858A +#define GL_OPERAND0_RGB_ARB 0x8590 +#define GL_OPERAND1_RGB_ARB 0x8591 +#define GL_OPERAND2_RGB_ARB 0x8592 +#define GL_OPERAND0_ALPHA_ARB 0x8598 +#define GL_OPERAND1_ALPHA_ARB 0x8599 +#define GL_OPERAND2_ALPHA_ARB 0x859A +#define GL_RGB_SCALE_ARB 0x8573 +#define GL_ADD_SIGNED_ARB 0x8574 +#define GL_INTERPOLATE_ARB 0x8575 +#define GL_SUBTRACT_ARB 0x84E7 +#define GL_CONSTANT_ARB 0x8576 +#define GL_PRIMARY_COLOR_ARB 0x8577 +#define GL_PREVIOUS_ARB 0x8578 +#endif + +#ifndef GL_ARB_texture_env_crossbar +#endif + +#ifndef GL_ARB_texture_env_dot3 +#define GL_DOT3_RGB_ARB 0x86AE +#define GL_DOT3_RGBA_ARB 0x86AF +#endif + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_MIRRORED_REPEAT_ARB 0x8370 +#endif + +#ifndef GL_ARB_depth_texture +#define GL_DEPTH_COMPONENT16_ARB 0x81A5 +#define GL_DEPTH_COMPONENT24_ARB 0x81A6 +#define GL_DEPTH_COMPONENT32_ARB 0x81A7 +#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A +#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B +#endif + +#ifndef GL_ARB_shadow +#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C +#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D +#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E +#endif + +#ifndef GL_ARB_shadow_ambient +#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF +#endif + +#ifndef GL_ARB_window_pos +#endif + +#ifndef GL_ARB_vertex_program +#define GL_COLOR_SUM_ARB 0x8458 +#define GL_VERTEX_PROGRAM_ARB 0x8620 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 +#define GL_PROGRAM_LENGTH_ARB 0x8627 +#define GL_PROGRAM_STRING_ARB 0x8628 +#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E +#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F +#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 +#define GL_CURRENT_MATRIX_ARB 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B +#define GL_PROGRAM_BINDING_ARB 0x8677 +#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 +#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +#define GL_PROGRAM_FORMAT_ARB 0x8876 +#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 +#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 +#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 +#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 +#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 +#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 +#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 +#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 +#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 +#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 +#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA +#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB +#define GL_PROGRAM_ATTRIBS_ARB 0x88AC +#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD +#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE +#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF +#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 +#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 +#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 +#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 +#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 +#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 +#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 +#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 +#define GL_MATRIX0_ARB 0x88C0 +#define GL_MATRIX1_ARB 0x88C1 +#define GL_MATRIX2_ARB 0x88C2 +#define GL_MATRIX3_ARB 0x88C3 +#define GL_MATRIX4_ARB 0x88C4 +#define GL_MATRIX5_ARB 0x88C5 +#define GL_MATRIX6_ARB 0x88C6 +#define GL_MATRIX7_ARB 0x88C7 +#define GL_MATRIX8_ARB 0x88C8 +#define GL_MATRIX9_ARB 0x88C9 +#define GL_MATRIX10_ARB 0x88CA +#define GL_MATRIX11_ARB 0x88CB +#define GL_MATRIX12_ARB 0x88CC +#define GL_MATRIX13_ARB 0x88CD +#define GL_MATRIX14_ARB 0x88CE +#define GL_MATRIX15_ARB 0x88CF +#define GL_MATRIX16_ARB 0x88D0 +#define GL_MATRIX17_ARB 0x88D1 +#define GL_MATRIX18_ARB 0x88D2 +#define GL_MATRIX19_ARB 0x88D3 +#define GL_MATRIX20_ARB 0x88D4 +#define GL_MATRIX21_ARB 0x88D5 +#define GL_MATRIX22_ARB 0x88D6 +#define GL_MATRIX23_ARB 0x88D7 +#define GL_MATRIX24_ARB 0x88D8 +#define GL_MATRIX25_ARB 0x88D9 +#define GL_MATRIX26_ARB 0x88DA +#define GL_MATRIX27_ARB 0x88DB +#define GL_MATRIX28_ARB 0x88DC +#define GL_MATRIX29_ARB 0x88DD +#define GL_MATRIX30_ARB 0x88DE +#define GL_MATRIX31_ARB 0x88DF +#endif + +#ifndef GL_ARB_fragment_program +#define GL_FRAGMENT_PROGRAM_ARB 0x8804 +#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 +#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 +#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 +#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 +#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 +#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A +#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B +#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C +#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D +#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E +#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F +#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 +#endif + +#ifndef GL_ARB_vertex_buffer_object +#define GL_BUFFER_SIZE_ARB 0x8764 +#define GL_BUFFER_USAGE_ARB 0x8765 +#define GL_ARRAY_BUFFER_ARB 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 +#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F +#define GL_READ_ONLY_ARB 0x88B8 +#define GL_WRITE_ONLY_ARB 0x88B9 +#define GL_READ_WRITE_ARB 0x88BA +#define GL_BUFFER_ACCESS_ARB 0x88BB +#define GL_BUFFER_MAPPED_ARB 0x88BC +#define GL_BUFFER_MAP_POINTER_ARB 0x88BD +#define GL_STREAM_DRAW_ARB 0x88E0 +#define GL_STREAM_READ_ARB 0x88E1 +#define GL_STREAM_COPY_ARB 0x88E2 +#define GL_STATIC_DRAW_ARB 0x88E4 +#define GL_STATIC_READ_ARB 0x88E5 +#define GL_STATIC_COPY_ARB 0x88E6 +#define GL_DYNAMIC_DRAW_ARB 0x88E8 +#define GL_DYNAMIC_READ_ARB 0x88E9 +#define GL_DYNAMIC_COPY_ARB 0x88EA +#endif + +#ifndef GL_ARB_occlusion_query +#define GL_QUERY_COUNTER_BITS_ARB 0x8864 +#define GL_CURRENT_QUERY_ARB 0x8865 +#define GL_QUERY_RESULT_ARB 0x8866 +#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 +#define GL_SAMPLES_PASSED_ARB 0x8914 +#endif + +#ifndef GL_ARB_shader_objects +#define GL_PROGRAM_OBJECT_ARB 0x8B40 +#define GL_SHADER_OBJECT_ARB 0x8B48 +#define GL_OBJECT_TYPE_ARB 0x8B4E +#define GL_OBJECT_SUBTYPE_ARB 0x8B4F +#define GL_FLOAT_VEC2_ARB 0x8B50 +#define GL_FLOAT_VEC3_ARB 0x8B51 +#define GL_FLOAT_VEC4_ARB 0x8B52 +#define GL_INT_VEC2_ARB 0x8B53 +#define GL_INT_VEC3_ARB 0x8B54 +#define GL_INT_VEC4_ARB 0x8B55 +#define GL_BOOL_ARB 0x8B56 +#define GL_BOOL_VEC2_ARB 0x8B57 +#define GL_BOOL_VEC3_ARB 0x8B58 +#define GL_BOOL_VEC4_ARB 0x8B59 +#define GL_FLOAT_MAT2_ARB 0x8B5A +#define GL_FLOAT_MAT3_ARB 0x8B5B +#define GL_FLOAT_MAT4_ARB 0x8B5C +#define GL_SAMPLER_1D_ARB 0x8B5D +#define GL_SAMPLER_2D_ARB 0x8B5E +#define GL_SAMPLER_3D_ARB 0x8B5F +#define GL_SAMPLER_CUBE_ARB 0x8B60 +#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 +#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 +#define GL_SAMPLER_2D_RECT_ARB 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 +#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 +#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 +#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 +#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 +#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 +#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 +#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 +#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 +#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 +#endif + +#ifndef GL_ARB_vertex_shader +#define GL_VERTEX_SHADER_ARB 0x8B31 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A +#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D +#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 +#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A +#endif + +#ifndef GL_ARB_fragment_shader +#define GL_FRAGMENT_SHADER_ARB 0x8B30 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B +#endif + +#ifndef GL_ARB_shading_language_100 +#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C +#endif + +#ifndef GL_ARB_texture_non_power_of_two +#endif + +#ifndef GL_ARB_point_sprite +#define GL_POINT_SPRITE_ARB 0x8861 +#define GL_COORD_REPLACE_A... [truncated message content] |
From: <he...@us...> - 2009-03-07 08:14:42
|
Revision: 54 http://simspark.svn.sourceforge.net/simspark/?rev=54&view=rev Author: hedayat Date: 2009-03-07 08:14:16 +0000 (Sat, 07 Mar 2009) Log Message: ----------- Improve Windows support: now you can build simspark in Windows, and create installers on it :) Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/cmake/FindODE.cmake trunk/spark/lib/kerosin/CMakeLists.txt trunk/spark/lib/oxygen/CMakeLists.txt trunk/spark/lib/salt/CMakeLists.txt trunk/spark/lib/zeitgeist/CMakeLists.txt trunk/spark/plugin/CMakeLists.txt trunk/spark/plugin/filesystemzip/CMakeLists.txt trunk/spark/plugin/imageperceptor/CMakeLists.txt trunk/spark/spark/CMakeLists.txt trunk/spark/test/CMakeLists.txt trunk/spark/test/scenetest/CMakeLists.txt trunk/spark/utility/rcssnet/CMakeLists.txt trunk/spark/utility/tinyxml/CMakeLists.txt Removed Paths: ------------- trunk/spark/cmake/FindSDL.cmake trunk/spark/windows/sparkconfig.h Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) @@ -36,8 +36,9 @@ endif (NOT USE_COREFOUNDATION STREQUAL "OFF") set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) +set(ENV{SDLDIR} C:/library/SDL/ "C:/Program Files/SDL/" C:/SDL/) + if(WIN32) - find_package(zlib REQUIRED) set(Boost_USE_STATIC_LIBS ON) endif(WIN32) find_package(Ruby REQUIRED) @@ -49,6 +50,7 @@ find_package(OpenGL REQUIRED) find_package(SDL REQUIRED) find_package(FMOD) +find_package(ZLIB) set(HAVE_IL_IL_H 1) set(HAVE_KEROSIN_KEROSIN_H 1) @@ -115,6 +117,9 @@ add_definitions(-D_CRT_SECURE_NO_WARNINGS) include_directories(${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/windows/include) + set(BUILD_SHARED_LIBS FALSE) +else(WIN32) + set(BUILD_SHARED_LIBS TRUE) endif(WIN32) ########## library version numbers ########## Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/ChangeLog 2009-03-07 08:14:16 UTC (rev 54) @@ -1,3 +1,29 @@ +2009-03-07 Hedayat Vatankhah <he...@gr...> + + * test/scenetest/CMakeLists.txt: + - exclude from build in Windows + + * test/CMakeLists.txt: + * plugin/CMakeLists.txt: + - fixed for Windows compatibility + - add Boost library dir to link directories + + * cmake/FindODE.cmake: + - add search paths for latest ode release (ode-0.11) + + * plugin/filesystemzip/CMakeLists.txt: + - build only if zlib is available + + * spark/CMakeLists.txt: + * lib/zeitgeist/CMakeLists.txt: + * lib/salt/CMakeLists.txt: + * lib/oxygen/CMakeLists.txt: + * lib/kerosin/CMakeLists.txt: + * utility/tinyxml/CMakeLists.txt: + * utility/rcssnet/CMakeLists.txt: + * CMakeLists.txt: + - Do not build shared libraries on windows for now + 2009-02-17 Marian Buchta <mar...@gm...> * CMakeLists.txt Modified: trunk/spark/cmake/FindODE.cmake =================================================================== --- trunk/spark/cmake/FindODE.cmake 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/cmake/FindODE.cmake 2009-03-07 08:14:16 UTC (rev 54) @@ -17,15 +17,19 @@ C:/ode/include ) FIND_LIBRARY(ODE_LIBRARY - NAMES ode + NAMES ode ode_double ode_single PATHS /usr/lib /usr/lib64 /usr/local/lib $ENV{OGRE_HOME}/lib # OGRE SDK on WIN32 - C:/library/ode/lib/releaselib - "C:/Program Files/ode/lib/releaselib" - C:/ode/lib/releaselib + C:/library/ode/lib/ + "C:/Program Files/ode/lib/" + C:/ode/lib/ + PATH_SUFFIXES + releaselib + ReleaseDoubleDLL ReleaseDoubleLib + ReleaseSingleDLL ReleaseSingleLib ) IF(ODE_INCLUDE_DIR) Deleted: trunk/spark/cmake/FindSDL.cmake =================================================================== --- trunk/spark/cmake/FindSDL.cmake 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/cmake/FindSDL.cmake 2009-03-07 08:14:16 UTC (rev 54) @@ -1,185 +0,0 @@ -# Locate SDL library -# This module defines -# SDL_LIBRARY, the name of the library to link against -# SDL_FOUND, if false, do not try to link to SDL -# SDL_INCLUDE_DIR, where to find SDL.h -# -# This module responds to the the flag: -# SDL_BUILDING_LIBRARY -# If this is defined, then no SDL_main will be linked in because -# only applications need main(). -# Otherwise, it is assumed you are building an application and this -# module will attempt to locate and set the the proper link flags -# as part of the returned SDL_LIBRARY variable. -# -# Don't forget to include SDLmain.h and SDLmain.m your project for the -# OS X framework based version. (Other versions link to -lSDLmain which -# this module will try to find on your behalf.) Also for OS X, this -# module will automatically add the -framework Cocoa on your behalf. -# -# -# Additional Note: If you see an empty SDL_LIBRARY_TEMP in your configuration -# and no SDL_LIBRARY, it means CMake did not find your SDL library -# (SDL.dll, libsdl.so, SDL.framework, etc). -# Set SDL_LIBRARY_TEMP to point to your SDL library, and configure again. -# Similarly, if you see an empty SDLMAIN_LIBRARY, you should set this value -# as appropriate. These values are used to generate the final SDL_LIBRARY -# variable, but when these values are unset, SDL_LIBRARY does not get created. -# -# -# $SDLDIR is an environment variable that would -# correspond to the ./configure --prefix=$SDLDIR -# used in building SDL. -# l.e.galup 9-20-02 -# -# Modified by Eric Wing. -# Added code to assist with automated building by using environmental variables -# and providing a more controlled/consistent search behavior. -# Added new modifications to recognize OS X frameworks and -# additional Unix paths (FreeBSD, etc). -# Also corrected the header search path to follow "proper" SDL guidelines. -# Added a search for SDLmain which is needed by some platforms. -# Added a search for threads which is needed by some platforms. -# Added needed compile switches for MinGW. -# -# On OSX, this will prefer the Framework version (if found) over others. -# People will have to manually change the cache values of -# SDL_LIBRARY to override this selection or set the CMake environment -# CMAKE_INCLUDE_PATH to modify the search paths. -# -# Note that the header path has changed from SDL/SDL.h to just SDL.h -# This needed to change because "proper" SDL convention -# is #include "SDL.h", not <SDL/SDL.h>. This is done for portability -# reasons because not all systems place things in SDL/ (see FreeBSD). - -FIND_PATH(SDL_INCLUDE_DIR SDL.h - HINTS - $ENV{SDLDIR} - PATH_SUFFIXES include - PATHS - ~/Library/Frameworks - /Library/Frameworks - /usr/local/include/SDL - /usr/include/SDL - /usr/local/include/SDL12 - /usr/local/include/SDL11 # FreeBSD ports - /usr/include/SDL12 - /usr/include/SDL11 - /usr/local/include - /usr/include - /sw/include/SDL # Fink - /sw/include - /opt/local/include/SDL # DarwinPorts - /opt/local/include - /opt/csw/include/SDL # Blastwave - /opt/csw/include - /opt/include/SDL - /opt/include - C:/library/SDL/include - "C:/Program Files/SDL/include" - C:/SDL/include -) -#MESSAGE("SDL_INCLUDE_DIR is ${SDL_INCLUDE_DIR}") - -# SDL-1.1 is the name used by FreeBSD ports... -# don't confuse it for the version number. -FIND_LIBRARY(SDL_LIBRARY_TEMP - NAMES SDL SDL-1.1 - HINTS - $ENV{SDLDIR} - PATH_SUFFIXES lib64 lib - PATHS - /usr/local - /usr - /sw - /opt/local - /opt/csw - /opt - C:/library/SDL/lib - "C:/Program Files/SDL/lib" - C:/SDL/lib -) - -#MESSAGE("SDL_LIBRARY_TEMP is ${SDL_LIBRARY_TEMP}") - -IF(NOT SDL_BUILDING_LIBRARY) - IF(NOT ${SDL_INCLUDE_DIR} MATCHES ".framework") - # Non-OS X framework versions expect you to also dynamically link to - # SDLmain. This is mainly for Windows and OS X. Other (Unix) platforms - # seem to provide SDLmain for compatibility even though they don't - # necessarily need it. - FIND_LIBRARY(SDLMAIN_LIBRARY - NAMES SDLmain SDLmain-1.1 - HINTS - $ENV{SDLDIR} - PATH_SUFFIXES lib64 lib - PATHS - /usr/local - /usr - /sw - /opt/local - /opt/csw - /opt - C:/library/SDL/lib - "C:/Program Files/SDL/lib" - C:/SDL/lib - ) - ENDIF(NOT ${SDL_INCLUDE_DIR} MATCHES ".framework") -ENDIF(NOT SDL_BUILDING_LIBRARY) - -# SDL may require threads on your system. -# The Apple build may not need an explicit flag because one of the -# frameworks may already provide it. -# But for non-OSX systems, I will use the CMake Threads package. -IF(NOT APPLE) - FIND_PACKAGE(Threads) -ENDIF(NOT APPLE) - -# MinGW needs an additional library, mwindows -# It's total link flags should look like -lmingw32 -lSDLmain -lSDL -lmwindows -# (Actually on second look, I think it only needs one of the m* libraries.) -IF(MINGW) - SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW") -ENDIF(MINGW) - -SET(SDL_FOUND "NO") -IF(SDL_LIBRARY_TEMP) - # For SDLmain - IF(NOT SDL_BUILDING_LIBRARY) - IF(SDLMAIN_LIBRARY) - SET(SDL_LIBRARY_TEMP ${SDLMAIN_LIBRARY} ${SDL_LIBRARY_TEMP}) - ENDIF(SDLMAIN_LIBRARY) - ENDIF(NOT SDL_BUILDING_LIBRARY) - - # For OS X, SDL uses Cocoa as a backend so it must link to Cocoa. - # CMake doesn't display the -framework Cocoa string in the UI even - # though it actually is there if I modify a pre-used variable. - # I think it has something to do with the CACHE STRING. - # So I use a temporary variable until the end so I can set the - # "real" variable in one-shot. - IF(APPLE) - SET(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} "-framework Cocoa") - ENDIF(APPLE) - - # For threads, as mentioned Apple doesn't need this. - # In fact, there seems to be a problem if I used the Threads package - # and try using this line, so I'm just skipping it entirely for OS X. - IF(NOT APPLE) - SET(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT}) - ENDIF(NOT APPLE) - - # For MinGW library - IF(MINGW) - SET(SDL_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL_LIBRARY_TEMP}) - ENDIF(MINGW) - - # Set the final string here so the GUI reflects the final state. - SET(SDL_LIBRARY ${SDL_LIBRARY_TEMP} CACHE STRING "Where the SDL Library can be found") - # Set the temp variable to INTERNAL so it is not seen in the CMake GUI - SET(SDL_LIBRARY_TEMP "${SDL_LIBRARY_TEMP}" CACHE INTERNAL "") - - SET(SDL_FOUND "YES") -ENDIF(SDL_LIBRARY_TEMP) - -#MESSAGE("SDL_LIBRARY is ${SDL_LIBRARY}") - Modified: trunk/spark/lib/kerosin/CMakeLists.txt =================================================================== --- trunk/spark/lib/kerosin/CMakeLists.txt 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/lib/kerosin/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) @@ -118,7 +118,7 @@ include_directories(${CMAKE_SOURCE_DIR}/lib ${FREETYPE_INCLUDE_DIRS} ${DevIL_INCLUDE_DIR} ${SDL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) -add_library(kerosin SHARED ${kerosin_LIB_SRCS} ${kerosin_LIB_HDRS}) +add_library(kerosin ${kerosin_LIB_SRCS} ${kerosin_LIB_HDRS}) target_link_libraries(kerosin ${FREETYPE_LIBRARIES} ${DevIL_LIBRARIES} ${SDL_LIBRARY} ${OPENGL_LIBRARIES} ${kerosin_require_libs}) Modified: trunk/spark/lib/oxygen/CMakeLists.txt =================================================================== --- trunk/spark/lib/oxygen/CMakeLists.txt 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/lib/oxygen/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) @@ -219,7 +219,7 @@ include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility/) -add_library(oxygen SHARED ${oxygen_LIB_SRCS} ${oxygen_LIB_HDRS}) +add_library(oxygen ${oxygen_LIB_SRCS} ${oxygen_LIB_HDRS}) target_link_libraries(oxygen rcssnet3D ${Boost_LIBRARIES} ${ODE_LIBRARY} ${oxygen_require_libs}) Modified: trunk/spark/lib/salt/CMakeLists.txt =================================================================== --- trunk/spark/lib/salt/CMakeLists.txt 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/lib/salt/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) @@ -26,7 +26,7 @@ sharedlibrary.cpp ) -add_library(salt SHARED ${salt_LIB_SRCS} ${salt_LIB_HDRS}) +add_library(salt ${salt_LIB_SRCS} ${salt_LIB_HDRS}) target_link_libraries(salt libobject ${salt_require_libs}) Modified: trunk/spark/lib/zeitgeist/CMakeLists.txt =================================================================== --- trunk/spark/lib/zeitgeist/CMakeLists.txt 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/lib/zeitgeist/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) @@ -56,7 +56,7 @@ include_directories(${CMAKE_SOURCE_DIR}/lib ${RUBY_INCLUDE_PATH}) -add_library(zeitgeist SHARED ${zeitgeist_LIB_SRCS} ${zeitgeist_LIB_HDRS}) +add_library(zeitgeist ${zeitgeist_LIB_SRCS} ${zeitgeist_LIB_HDRS}) target_link_libraries(zeitgeist ${RUBY_LIBRARY} ${zeitgeist_require_libs}) Modified: trunk/spark/plugin/CMakeLists.txt =================================================================== --- trunk/spark/plugin/CMakeLists.txt 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/plugin/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) @@ -1,13 +1,11 @@ include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility - ${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) + ${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) +link_directories(${Boost_LIBRARY_DIRS}) -if (APPLE) - if (USE_COREFOUNDATION) - set(spark_libs kerosin oxygen zeitgeist salt /System/Library/Frameworks/CoreFoundation.framework) - else (USE_COREFOUNDATION) - set(spark_libs kerosin oxygen zeitgeist salt) - endif (USE_COREFOUNDATION) -endif (APPLE) +set(spark_libs kerosin oxygen zeitgeist salt) +if (APPLE AND USE_COREFOUNDATION) + set(spark_libs ${spark_libs} /System/Library/Frameworks/CoreFoundation.framework) +endif (APPLE AND USE_COREFOUNDATION) add_subdirectory(filesystemstd) add_subdirectory(filesystemzip) Modified: trunk/spark/plugin/filesystemzip/CMakeLists.txt =================================================================== --- trunk/spark/plugin/filesystemzip/CMakeLists.txt 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/plugin/filesystemzip/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) @@ -8,15 +8,14 @@ filesystemzip_c.cpp ) -if (Boost_REGEX_FOUND) +if (Boost_REGEX_FOUND AND ZLIB_FOUND) add_library(filesystemzip MODULE ${filesystemzip_LIB_SRCS}) - if(WIN32) - include_directories(${ZLIB_INCLUDE_DIR}) - endif(WIN32) + include_directories(${ZLIB_INCLUDE_DIR}) - target_link_libraries(filesystemzip ${Boost_REGEX_LIBRARY} ${spark_libs} z) + target_link_libraries(filesystemzip ${Boost_REGEX_LIBRARY} + ${spark_libs} ${ZLIB_LIBRARIES}) set_target_properties(filesystemzip PROPERTIES VERSION 0.0.0 SOVERSION 0) install(TARGETS filesystemzip DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) -endif (Boost_REGEX_FOUND) +endif (Boost_REGEX_FOUND AND ZLIB_FOUND) Modified: trunk/spark/plugin/imageperceptor/CMakeLists.txt =================================================================== --- trunk/spark/plugin/imageperceptor/CMakeLists.txt 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/plugin/imageperceptor/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) @@ -10,7 +10,7 @@ add_library(imageperceptor MODULE ${imageperceptor_LIB_SRCS}) -target_link_libraries(imageperceptor ${spark_libs}) +target_link_libraries(imageperceptor ${spark_libs} ${Boost_LIBRARIES}) set_target_properties(imageperceptor PROPERTIES VERSION 0.0.0 SOVERSION 0) if (NOT APPLE) Modified: trunk/spark/spark/CMakeLists.txt =================================================================== --- trunk/spark/spark/CMakeLists.txt 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/spark/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) @@ -8,7 +8,7 @@ include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility ${FREETYPE_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} ${DevIL_INCLUDE_DIR}) -add_library(spark SHARED ${spark_LIB_SRCS}) +add_library(spark ${spark_LIB_SRCS}) target_link_libraries(spark salt zeitgeist oxygen kerosin) Modified: trunk/spark/test/CMakeLists.txt =================================================================== --- trunk/spark/test/CMakeLists.txt 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/test/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) @@ -1,6 +1,8 @@ include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility ${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR}) +link_directories(${Boost_LIBRARY_DIRS}) + add_subdirectory(coretest) add_subdirectory(fonttest) add_subdirectory(inputtest) Modified: trunk/spark/test/scenetest/CMakeLists.txt =================================================================== --- trunk/spark/test/scenetest/CMakeLists.txt 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/test/scenetest/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) @@ -11,11 +11,12 @@ include_directories(${SDL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIRS} ${DevIL_INCLUDE_DIR}) -add_executable(scenetest ${scenetest_SRCS}) +if (NOT WIN32) + add_executable(scenetest ${scenetest_SRCS}) + target_link_libraries(scenetest salt zeitgeist oxygen kerosin) +endif (NOT WIN32) -target_link_libraries(scenetest salt zeitgeist oxygen kerosin) - ########### install files ############### Modified: trunk/spark/utility/rcssnet/CMakeLists.txt =================================================================== --- trunk/spark/utility/rcssnet/CMakeLists.txt 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/utility/rcssnet/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) @@ -21,7 +21,7 @@ udpsocket.cpp ) -add_library(rcssnet3D SHARED ${rcssnet3D_LIB_SRCS} ${rcssnet3D_LIB_HDRS}) +add_library(rcssnet3D ${rcssnet3D_LIB_SRCS} ${rcssnet3D_LIB_HDRS}) if(WIN32) target_link_libraries(rcssnet3D ${NET_LIBS} WS2_32.lib) Modified: trunk/spark/utility/tinyxml/CMakeLists.txt =================================================================== --- trunk/spark/utility/tinyxml/CMakeLists.txt 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/utility/tinyxml/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) @@ -11,7 +11,7 @@ xmlfunctions.h ) -add_library(tinyxml_ex SHARED ${tinyxml_ex_LIB_SRCS}) +add_library(tinyxml_ex ${tinyxml_ex_LIB_SRCS}) target_link_libraries(tinyxml_ex) Deleted: trunk/spark/windows/sparkconfig.h =================================================================== --- trunk/spark/windows/sparkconfig.h 2009-03-05 20:10:36 UTC (rev 53) +++ trunk/spark/windows/sparkconfig.h 2009-03-07 08:14:16 UTC (rev 54) @@ -1,11 +0,0 @@ -/** this is a static (i.e. not auto generated) win32 specific - configuration file -*/ -#define HAVE_KEROSIN_KEROSIN_H 1 - -#define PACKAGE_NAME "simspark" - -#define HAVE_WINSOCK2_H 1 -#define HAVE_SOCKET 1 -#define HAVE_SOCKETTYPE 1 -#define HAVE_IL_IL_H 1 \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-03-07 11:38:42
|
Revision: 55 http://simspark.svn.sourceforge.net/simspark/?rev=55&view=rev Author: hedayat Date: 2009-03-07 11:38:32 +0000 (Sat, 07 Mar 2009) Log Message: ----------- ZLIB fix for Linux respect SDLDIR environment variable Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/cmake/FindZLIB.cmake Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2009-03-07 08:14:16 UTC (rev 54) +++ trunk/spark/CMakeLists.txt 2009-03-07 11:38:32 UTC (rev 55) @@ -36,7 +36,7 @@ endif (NOT USE_COREFOUNDATION STREQUAL "OFF") set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) -set(ENV{SDLDIR} C:/library/SDL/ "C:/Program Files/SDL/" C:/SDL/) +set(ENV{SDLDIR} $ENV{SDLDIR} C:/library/SDL/ "C:/Program Files/SDL/" C:/SDL/) if(WIN32) set(Boost_USE_STATIC_LIBS ON) Modified: trunk/spark/cmake/FindZLIB.cmake =================================================================== --- trunk/spark/cmake/FindZLIB.cmake 2009-03-07 08:14:16 UTC (rev 54) +++ trunk/spark/cmake/FindZLIB.cmake 2009-03-07 11:38:32 UTC (rev 55) @@ -1,37 +1,42 @@ -# - Find zlib -# Find the native ZLIB includes and library -# -# ZLIB_INCLUDE_DIR - where to find zlib.h, etc. -# ZLIB_LIBRARIES - List of libraries when using zlib. -# ZLIB_FOUND - True if zlib found. - - -IF (ZLIB_INCLUDE_DIR) - # Already in cache, be silent - SET(ZLIB_FIND_QUIETLY TRUE) -ENDIF (ZLIB_INCLUDE_DIR) - -FIND_PATH(ZLIB_INCLUDE_DIR zlib.h - C:/library/zlib123 - C:/zlib123 - "C:/Program Files/zlib123" -) - -FIND_LIBRARY(ZLIB_LIBRARY zlib1.lib - C:/library/zlib123/projects/visualc6/Win32_DLL_Release - C:/zlib123/projects/visualc6/Win32_DLL_Release - "C:/Program Files/zlib123/projects/visualc6/Win32_DLL_Release" -) - -# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARY ZLIB_INCLUDE_DIR) - -IF(ZLIB_FOUND) - SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} ) -ELSE(ZLIB_FOUND) - SET( ZLIB_LIBRARIES ) -ENDIF(ZLIB_FOUND) - -MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR ) +# - Find zlib +# Find the native ZLIB includes and library +# +# ZLIB_INCLUDE_DIR - where to find zlib.h, etc. +# ZLIB_LIBRARIES - List of libraries when using zlib. +# ZLIB_FOUND - True if zlib found. + + +IF (ZLIB_INCLUDE_DIR) + # Already in cache, be silent + SET(ZLIB_FIND_QUIETLY TRUE) +ENDIF (ZLIB_INCLUDE_DIR) + +FIND_PATH(ZLIB_INCLUDE_DIR zlib.h + $ENV{ZLIB_DIR} + C:/library/ + C:/ + "C:/Program Files/" + PATH_SUFFIXES zlib123 +) + +SET(ZLIB_NAMES z zlib zdll zlib1) +FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} + $ENV{ZLIB_DIR} + C:/library/zlib123/ + C:/zlib123/ + "C:/Program Files/zlib123/" + PATH_SUFFIXES projects/visualc6/Win32_DLL_Release +) + +# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARY ZLIB_INCLUDE_DIR) + +IF(ZLIB_FOUND) + SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} ) +ELSE(ZLIB_FOUND) + SET( ZLIB_LIBRARIES ) +ENDIF(ZLIB_FOUND) + +MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-03-17 18:03:58
|
Revision: 56 http://simspark.svn.sourceforge.net/simspark/?rev=56&view=rev Author: hedayat Date: 2009-03-17 18:03:47 +0000 (Tue, 17 Mar 2009) Log Message: ----------- ruby 1.9 fix latest devil fix many fixes to support windows builds Modified Paths: -------------- trunk/spark/CMakeLists.txt trunk/spark/ChangeLog trunk/spark/lib/CMakeLists.txt trunk/spark/lib/kerosin/CMakeLists.txt trunk/spark/lib/kerosin/imageserver/imageserver.h trunk/spark/lib/kerosin/kerosin.h trunk/spark/lib/oxygen/CMakeLists.txt trunk/spark/lib/oxygen/agentaspect/agentaspect.h trunk/spark/lib/oxygen/agentaspect/effector.h trunk/spark/lib/oxygen/agentaspect/perceptor.h trunk/spark/lib/oxygen/controlaspect/controlaspect.h trunk/spark/lib/oxygen/gamecontrolserver/behavior.h trunk/spark/lib/oxygen/gamecontrolserver/gamecontrolserver.h trunk/spark/lib/oxygen/gamecontrolserver/predicate.h trunk/spark/lib/oxygen/geometryserver/geometryserver.h trunk/spark/lib/oxygen/geometryserver/indexbuffer.h trunk/spark/lib/oxygen/geometryserver/meshimporter.h trunk/spark/lib/oxygen/geometryserver/stdmeshimporter.h trunk/spark/lib/oxygen/geometryserver/trimesh.h trunk/spark/lib/oxygen/monitorserver/custommonitor.h trunk/spark/lib/oxygen/monitorserver/monitorcmdparser.h trunk/spark/lib/oxygen/monitorserver/monitorserver.h trunk/spark/lib/oxygen/monitorserver/monitorsystem.h trunk/spark/lib/oxygen/oxygen.h trunk/spark/lib/oxygen/physicsserver/angularmotor.h trunk/spark/lib/oxygen/physicsserver/balljoint.h trunk/spark/lib/oxygen/physicsserver/body.h trunk/spark/lib/oxygen/physicsserver/bodycontroller.h trunk/spark/lib/oxygen/physicsserver/boxcollider.h trunk/spark/lib/oxygen/physicsserver/ccylindercollider.h trunk/spark/lib/oxygen/physicsserver/collider.h trunk/spark/lib/oxygen/physicsserver/collisionhandler.h trunk/spark/lib/oxygen/physicsserver/contactjointhandler.h trunk/spark/lib/oxygen/physicsserver/dragcontroller.h trunk/spark/lib/oxygen/physicsserver/fixedjoint.h trunk/spark/lib/oxygen/physicsserver/hinge2joint.h trunk/spark/lib/oxygen/physicsserver/hingejoint.h trunk/spark/lib/oxygen/physicsserver/joint.h trunk/spark/lib/oxygen/physicsserver/odeobject.h trunk/spark/lib/oxygen/physicsserver/physicsserver.h trunk/spark/lib/oxygen/physicsserver/planecollider.h trunk/spark/lib/oxygen/physicsserver/raycollider.h trunk/spark/lib/oxygen/physicsserver/recorderhandler.h trunk/spark/lib/oxygen/physicsserver/sliderjoint.h trunk/spark/lib/oxygen/physicsserver/space.h trunk/spark/lib/oxygen/physicsserver/spherecollider.h trunk/spark/lib/oxygen/physicsserver/transformcollider.h trunk/spark/lib/oxygen/physicsserver/universaljoint.h trunk/spark/lib/oxygen/physicsserver/velocitycontroller.h trunk/spark/lib/oxygen/physicsserver/world.h trunk/spark/lib/salt/CMakeLists.txt trunk/spark/lib/salt/bounds.h trunk/spark/lib/salt/defines.h trunk/spark/lib/salt/fileclasses.h trunk/spark/lib/salt/frustum.h trunk/spark/lib/salt/matrix.h trunk/spark/lib/salt/path.h trunk/spark/lib/salt/plane.h trunk/spark/lib/salt/random.h trunk/spark/lib/salt/rect.h trunk/spark/lib/salt/sharedlibrary.h trunk/spark/lib/salt/tvector.h trunk/spark/lib/salt/vector.h trunk/spark/lib/zeitgeist/CMakeLists.txt trunk/spark/lib/zeitgeist/class.h trunk/spark/lib/zeitgeist/core.h trunk/spark/lib/zeitgeist/corecontext.h trunk/spark/lib/zeitgeist/fileserver/fileserver.h trunk/spark/lib/zeitgeist/fileserver/filesystem.h trunk/spark/lib/zeitgeist/leaf.h trunk/spark/lib/zeitgeist/logserver/logserver.h trunk/spark/lib/zeitgeist/node.h trunk/spark/lib/zeitgeist/object.h trunk/spark/lib/zeitgeist/parameterlist.h trunk/spark/lib/zeitgeist/randomserver/randomserver.h trunk/spark/lib/zeitgeist/scriptserver/gcvalue.h trunk/spark/lib/zeitgeist/scriptserver/rubywrapper.cpp trunk/spark/lib/zeitgeist/scriptserver/scriptserver.h trunk/spark/lib/zeitgeist/zeitgeist.h trunk/spark/sparkconfig.h.cmake trunk/spark/utility/rcssnet/CMakeLists.txt trunk/spark/utility/rcssnet/addr.hpp trunk/spark/utility/rcssnet/exception.hpp trunk/spark/utility/rcssnet/handler.hpp trunk/spark/utility/rcssnet/socket.hpp trunk/spark/utility/rcssnet/tcpsocket.hpp trunk/spark/utility/rcssnet/udpsocket.hpp Added Paths: ----------- trunk/spark/lib/kerosin/kerosin_defines.h trunk/spark/lib/oxygen/oxygen_defines.h trunk/spark/lib/salt/salt_defines.h trunk/spark/lib/zeitgeist/zeitgeist_defines.h trunk/spark/utility/rcssnet/rcssnet3D_defines.h Modified: trunk/spark/CMakeLists.txt =================================================================== --- trunk/spark/CMakeLists.txt 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/CMakeLists.txt 2009-03-17 18:03:47 UTC (rev 56) @@ -38,9 +38,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) set(ENV{SDLDIR} $ENV{SDLDIR} C:/library/SDL/ "C:/Program Files/SDL/" C:/SDL/) -if(WIN32) - set(Boost_USE_STATIC_LIBS ON) -endif(WIN32) find_package(Ruby REQUIRED) find_package(Freetype REQUIRED) find_package(DevIL REQUIRED) @@ -88,6 +85,9 @@ endif (RESOLV_LIB_REQ) endif (NOT FUNC_HSTRERROR_EXISTS) +if (WIN32) + set(NET_LIBS ${NET_LIBS} WS2_32.lib) +endif (WIN32) ########## add extra flags ########## if(NOT CMAKE_BUILD_TYPE) @@ -97,8 +97,10 @@ add_definitions(-DHAVE_CONFIG_H) include_directories(${CMAKE_BINARY_DIR}) if (UNIX) - set(CMAKE_CXX_FLAGS "-Wno-deprecated" CACHE + set(CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "Common C++ compiler flags" FORCE) + set(CMAKE_C_FLAGS $ENV{CFLAGS} CACHE + STRING "Common C compiler flags" FORCE) set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -W -Wall -Woverloaded-virtual" CACHE STRING "C++ compiler flags for Debug builds" FORCE) set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE @@ -112,14 +114,18 @@ set(CMAKE_SHARED_MODULE_PREFIX "") mark_as_advanced(BINDIR LIBDIR DATADIR INCLUDEDIR) +set(BUILD_SHARED_LIBS TRUE) +if (BUILD_SHARED_LIBS) + set(SHARED_LIB_COMPILE 1) +endif(BUILD_SHARED_LIBS) if(WIN32) - add_definitions(-D_CRT_SECURE_NO_WARNINGS) - include_directories(${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} - ${CMAKE_SOURCE_DIR}/windows/include) - set(BUILD_SHARED_LIBS FALSE) -else(WIN32) - set(BUILD_SHARED_LIBS TRUE) + add_definitions(-D_CRT_SECURE_NO_WARNINGS -DBOOST_ALL_DYN_LINK) + include_directories(${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} + ${CMAKE_SOURCE_DIR}/windows/include) + if(MSVC) + add_definitions(/Gm /Zi /GL) + endif(MSVC) endif(WIN32) ########## library version numbers ########## @@ -190,7 +196,19 @@ set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION}) set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}) + +set(CPACK_PACKAGE_VENDOR "RoboCup Soccer Server 3D Maintenance Group") +set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A generic physical simulation system") +set(CPACK_PACKAGE_INSTALL_DIRECTORY "simspark") +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING") +set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README") +set(CPACK_NSIS_HELP_LINK "TODO:simspark wiki link") +set(CPACK_NSIS_URL_INFO_ABOUT "http://simspark.sourceforge.net") +set(CPACK_NSIS_CONTACT "sim...@li...") +set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "RequestExecutionLevel user") + include(CPack) #original Makefile.am contents follow: Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/ChangeLog 2009-03-17 18:03:47 UTC (rev 56) @@ -1,3 +1,11 @@ +2009-03-17 Hedayat Vatankhah <he...@gr...> + + * lib/kerosin/imageserver/imageserver.h (ImageServer): + - added a fix for the latest DevIL package + + * lib/zeitgeist/scriptserver/rubywrapper.cpp: + - improved ruby 1.9 compatibility + 2009-03-07 Hedayat Vatankhah <he...@gr...> * test/scenetest/CMakeLists.txt: Modified: trunk/spark/lib/CMakeLists.txt =================================================================== --- trunk/spark/lib/CMakeLists.txt 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/CMakeLists.txt 2009-03-17 18:03:47 UTC (rev 56) @@ -1,18 +1,18 @@ include_directories(${CMAKE_SOURCE_DIR}/utility ${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR}) +link_directories(${Boost_LIBRARY_DIRS}) + if (USE_COREFOUNDATION) add_definitions(-DUSE_COREFOUNDATION) endif (USE_COREFOUNDATION) -if (APPLE) - if (USE_COREFOUNDATION) - set(salt_require_libs /System/Library/Frameworks/CoreFoundation.framework) - endif (USE_COREFOUNDATION) - set(zeitgeist_require_libs salt ${salt_require_libs}) - set(oxygen_require_libs zeitgeist ${zeitgeist_require_libs}) - set(kerosin_require_libs oxygen ${oxygen_require_libs}) -endif (APPLE) +if (USE_COREFOUNDATION) + set(salt_require_libs /System/Library/Frameworks/CoreFoundation.framework) +endif (USE_COREFOUNDATION) +set(zeitgeist_require_libs salt ${salt_require_libs}) +set(oxygen_require_libs zeitgeist ${zeitgeist_require_libs}) +set(kerosin_require_libs oxygen ${oxygen_require_libs}) add_subdirectory(salt) add_subdirectory(zeitgeist) Modified: trunk/spark/lib/kerosin/CMakeLists.txt =================================================================== --- trunk/spark/lib/kerosin/CMakeLists.txt 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/kerosin/CMakeLists.txt 2009-03-17 18:03:47 UTC (rev 56) @@ -13,6 +13,7 @@ inputserver/inputitem.h inputserver/input.h kerosin.h + kerosin_defines.h materialserver/material.h materialserver/materialserver.h sceneserver/axis.h @@ -116,7 +117,8 @@ renderserver/customrender_c.cpp ) -include_directories(${CMAKE_SOURCE_DIR}/lib ${FREETYPE_INCLUDE_DIRS} ${DevIL_INCLUDE_DIR} ${SDL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) +include_directories(${CMAKE_SOURCE_DIR}/lib ${FREETYPE_INCLUDE_DIRS} + ${DevIL_INCLUDE_DIR} ${SDL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) add_library(kerosin ${kerosin_LIB_SRCS} ${kerosin_LIB_HDRS}) Modified: trunk/spark/lib/kerosin/imageserver/imageserver.h =================================================================== --- trunk/spark/lib/kerosin/imageserver/imageserver.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/kerosin/imageserver/imageserver.h 2009-03-17 18:03:47 UTC (rev 56) @@ -27,7 +27,10 @@ #endif #ifdef HAVE_IL_IL_H #include <IL/il.h> +#ifndef IL_ILBM +#define IL_ILBM IL_LBM #endif +#endif #include <zeitgeist/class.h> @@ -66,7 +69,7 @@ eICO = IL_ICO, eJPG = IL_JPG, eJFIF = IL_JFIF, - eLBM = IL_LBM, + eLBM = IL_ILBM, ePCD = IL_PCD, ePCX = IL_PCX, ePIC = IL_PIC, Modified: trunk/spark/lib/kerosin/kerosin.h =================================================================== --- trunk/spark/lib/kerosin/kerosin.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/kerosin/kerosin.h 2009-03-17 18:03:47 UTC (rev 56) @@ -29,6 +29,7 @@ #ifndef KEROSIN_KEROSIN_H #define KEROSIN_KEROSIN_H +#include "kerosin_defines.h" #include "soundserver/soundserver.h" #include "imageserver/imageserver.h" #include "fontserver/fontserver.h" @@ -74,7 +75,7 @@ * registers all internal classes and automatically runs the default init * script 'sys/script/default.rb' if it exists. */ -class Kerosin +class KEROSIN_API Kerosin { // // types Added: trunk/spark/lib/kerosin/kerosin_defines.h =================================================================== --- trunk/spark/lib/kerosin/kerosin_defines.h (rev 0) +++ trunk/spark/lib/kerosin/kerosin_defines.h 2009-03-17 18:03:47 UTC (rev 56) @@ -0,0 +1,32 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2009 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef KEROSIN_KEROSIN_DEFINES_H +#define KEROSIN_KEROSIN_DEFINES_H + +#include <salt/defines.h> + +#ifdef kerosin_EXPORTS +#define KEROSIN_API API_EXPORT +#else +#define KEROSIN_API API_IMPORT +#endif + +#endif //KEROSIN_KEROSIN_DEFINES_H Property changes on: trunk/spark/lib/kerosin/kerosin_defines.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Modified: trunk/spark/lib/oxygen/CMakeLists.txt =================================================================== --- trunk/spark/lib/oxygen/CMakeLists.txt 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/CMakeLists.txt 2009-03-17 18:03:47 UTC (rev 56) @@ -13,6 +13,7 @@ gamecontrolserver/actionobject.h gamecontrolserver/behavior.h oxygen.h + oxygen_defines.h physicsserver/body.h physicsserver/bodycontroller.h physicsserver/boxcollider.h Modified: trunk/spark/lib/oxygen/agentaspect/agentaspect.h =================================================================== --- trunk/spark/lib/oxygen/agentaspect/agentaspect.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/agentaspect/agentaspect.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_AGENTASPECT_H #define OXYGEN_AGENTASPECT_H +#include <oxygen/oxygen_defines.h> #include <oxygen/sceneserver/transform.h> #include <oxygen/gamecontrolserver/actionobject.h> #include <oxygen/gamecontrolserver/baseparser.h> @@ -34,7 +35,7 @@ } #endif -class AgentAspect : public Transform +class OXYGEN_API AgentAspect : public Transform { public: AgentAspect(); Modified: trunk/spark/lib/oxygen/agentaspect/effector.h =================================================================== --- trunk/spark/lib/oxygen/agentaspect/effector.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/agentaspect/effector.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_EFFECTOR_H #define OXYGEN_EFFECTOR_H +#include <oxygen/oxygen_defines.h> #include <oxygen/sceneserver/basenode.h> #include <oxygen/gamecontrolserver/baseparser.h> @@ -30,7 +31,7 @@ class ActionObject; class AgentAspect; -class Effector : public BaseNode +class OXYGEN_API Effector : public BaseNode { public: Effector() : BaseNode() {}; Modified: trunk/spark/lib/oxygen/agentaspect/perceptor.h =================================================================== --- trunk/spark/lib/oxygen/agentaspect/perceptor.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/agentaspect/perceptor.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,13 +22,14 @@ #ifndef OXYGEN_PERCEPTOR_H #define OXYGEN_PERCEPTOR_H +#include <oxygen/oxygen_defines.h> #include <oxygen/sceneserver/basenode.h> #include <oxygen/gamecontrolserver/baseparser.h> namespace oxygen { -class Perceptor : public oxygen::BaseNode +class OXYGEN_API Perceptor : public oxygen::BaseNode { public: Modified: trunk/spark/lib/oxygen/controlaspect/controlaspect.h =================================================================== --- trunk/spark/lib/oxygen/controlaspect/controlaspect.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/controlaspect/controlaspect.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,13 +22,14 @@ #ifndef OXYGEN_CONTROLASPECT_H #define OXYGEN_CONTROLASPECT_H +#include <oxygen/oxygen_defines.h> #include <oxygen/sceneserver/basenode.h> namespace oxygen { class Scene; -class ControlAspect : public BaseNode +class OXYGEN_API ControlAspect : public BaseNode { public: ControlAspect(); Modified: trunk/spark/lib/oxygen/gamecontrolserver/behavior.h =================================================================== --- trunk/spark/lib/oxygen/gamecontrolserver/behavior.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/gamecontrolserver/behavior.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #define OXYGEN_BEHAVIOR_H #include <string> +#include <oxygen/oxygen_defines.h> #include <oxygen/gamecontrolserver/predicate.h> #include <oxygen/simulationserver/traincontrol.h> @@ -32,7 +33,7 @@ derivated from this class, and overload 'Init' & 'Think' to implement its special behavior. */ -class Behavior : public zeitgeist::Leaf +class OXYGEN_API Behavior : public zeitgeist::Leaf { public: /** called once when the initially connected to the server */ Modified: trunk/spark/lib/oxygen/gamecontrolserver/gamecontrolserver.h =================================================================== --- trunk/spark/lib/oxygen/gamecontrolserver/gamecontrolserver.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/gamecontrolserver/gamecontrolserver.h 2009-03-17 18:03:47 UTC (rev 56) @@ -24,6 +24,7 @@ #include "actionobject.h" #include "baseparser.h" +#include <oxygen/oxygen_defines.h> #include <zeitgeist/class.h> #include <zeitgeist/node.h> @@ -33,7 +34,7 @@ class Effector; class Scene; -class GameControlServer : public zeitgeist::Node +class OXYGEN_API GameControlServer : public zeitgeist::Node { public: Modified: trunk/spark/lib/oxygen/gamecontrolserver/predicate.h =================================================================== --- trunk/spark/lib/oxygen/gamecontrolserver/predicate.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/gamecontrolserver/predicate.h 2009-03-17 18:03:47 UTC (rev 56) @@ -28,6 +28,7 @@ #include <boost/any.hpp> #include <salt/vector.h> #include <zeitgeist/logserver/logserver.h> +#include <oxygen/oxygen_defines.h> namespace oxygen { @@ -46,7 +47,7 @@ agent. Again, the Perceptor is independent from the format used to transmit its data to the agent. */ -class Predicate +class OXYGEN_API Predicate { public: /** \class Iterator encapsulates a Modified: trunk/spark/lib/oxygen/geometryserver/geometryserver.h =================================================================== --- trunk/spark/lib/oxygen/geometryserver/geometryserver.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/geometryserver/geometryserver.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_GEOMETRYSERVER_H #define OXYGEN_GEOMETRYSERVER_H +#include <oxygen/oxygen_defines.h> #include <zeitgeist/class.h> #include <zeitgeist/node.h> #include "meshexporter.h" @@ -34,7 +35,7 @@ of plugins to import or generate them. Triangle meshes are used for collision detection and rendering. */ -class GeometryServer : public zeitgeist::Node +class OXYGEN_API GeometryServer : public zeitgeist::Node { protected: typedef std::map<std::string, boost::shared_ptr<TriMesh> > TMeshMap; Modified: trunk/spark/lib/oxygen/geometryserver/indexbuffer.h =================================================================== --- trunk/spark/lib/oxygen/geometryserver/indexbuffer.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/geometryserver/indexbuffer.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_INDEXBUFFER_H #define OXYGEN_INDEXBUFFER_H +#include <oxygen/oxygen_defines.h> #include <boost/shared_array.hpp> namespace oxygen @@ -31,7 +32,7 @@ vertexbuffer to describe a set of triangles. It is used together with the StaticMesh class */ -class IndexBuffer +class OXYGEN_API IndexBuffer { public: IndexBuffer(); Modified: trunk/spark/lib/oxygen/geometryserver/meshimporter.h =================================================================== --- trunk/spark/lib/oxygen/geometryserver/meshimporter.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/geometryserver/meshimporter.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_MESHIMPORTER_H #define OXYGEN_MESHIMPORTER_H +#include <oxygen/oxygen_defines.h> #include <zeitgeist/class.h> #include <zeitgeist/node.h> #include "trimesh.h" @@ -33,7 +34,7 @@ or generate trimeshes. MeshImporter classes are registered to the GeometryServer */ -class MeshImporter : public zeitgeist::Leaf +class OXYGEN_API MeshImporter : public zeitgeist::Leaf { public: MeshImporter() : Leaf() {}; Modified: trunk/spark/lib/oxygen/geometryserver/stdmeshimporter.h =================================================================== --- trunk/spark/lib/oxygen/geometryserver/stdmeshimporter.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/geometryserver/stdmeshimporter.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_STDMESHIMPORTER #define OXYGEN_STDMESHIMPORTER +#include <oxygen/oxygen_defines.h> #include "meshimporter.h" namespace oxygen @@ -29,7 +30,7 @@ /** \class StdMeshImporter is a MeshImporter that generates a standard set of meshes. These are spheres, boxes and capped cylinders. */ -class StdMeshImporter : public MeshImporter +class OXYGEN_API StdMeshImporter : public MeshImporter { public: StdMeshImporter(); @@ -56,7 +57,7 @@ /** constructs a unit capped cylinder */ boost::shared_ptr<TriMesh> UnitCCylinder (const zeitgeist::ParameterList& parameter); - + /** constructs a flat unit cylinder */ boost::shared_ptr<TriMesh> UnitCylinder(); }; Modified: trunk/spark/lib/oxygen/geometryserver/trimesh.h =================================================================== --- trunk/spark/lib/oxygen/geometryserver/trimesh.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/geometryserver/trimesh.h 2009-03-17 18:03:47 UTC (rev 56) @@ -27,6 +27,7 @@ #include <boost/shared_array.hpp> #include <boost/shared_ptr.hpp> #include <string> +#include <oxygen/oxygen_defines.h> namespace oxygen { @@ -41,7 +42,7 @@ vector. Indeces are stored using the IndexBuffer class as as list of unsigned int values. */ -class TriMesh +class OXYGEN_API TriMesh { public: struct Face Modified: trunk/spark/lib/oxygen/monitorserver/custommonitor.h =================================================================== --- trunk/spark/lib/oxygen/monitorserver/custommonitor.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/monitorserver/custommonitor.h 2009-03-17 18:03:47 UTC (rev 56) @@ -23,12 +23,13 @@ #define OXYGEN_CUSTOMMONITOR_H #include <zeitgeist/leaf.h> +#include <oxygen/oxygen_defines.h> #include <oxygen/gamecontrolserver/predicate.h> namespace oxygen { -class CustomMonitor : public zeitgeist::Leaf +class OXYGEN_API CustomMonitor : public zeitgeist::Leaf { public: CustomMonitor(); Modified: trunk/spark/lib/oxygen/monitorserver/monitorcmdparser.h =================================================================== --- trunk/spark/lib/oxygen/monitorserver/monitorcmdparser.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/monitorserver/monitorcmdparser.h 2009-03-17 18:03:47 UTC (rev 56) @@ -23,12 +23,13 @@ #define OXYGEN_MONITORCMDPARSER_H #include <zeitgeist/leaf.h> +#include <oxygen/oxygen_defines.h> #include <oxygen/gamecontrolserver/predicate.h> namespace oxygen { -class MonitorCmdParser : public zeitgeist::Leaf +class OXYGEN_API MonitorCmdParser : public zeitgeist::Leaf { public: MonitorCmdParser(); Modified: trunk/spark/lib/oxygen/monitorserver/monitorserver.h =================================================================== --- trunk/spark/lib/oxygen/monitorserver/monitorserver.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/monitorserver/monitorserver.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_MONITORSERVER_H #define OXYGEN_MONITORSERVER_H +#include <oxygen/oxygen_defines.h> #include <zeitgeist/class.h> #include <zeitgeist/node.h> #include "monitorsystem.h" @@ -29,8 +30,8 @@ namespace oxygen { class SimulationServer; - -class MonitorServer : public zeitgeist::Node + +class OXYGEN_API MonitorServer : public zeitgeist::Node { public: MonitorServer(); @@ -79,7 +80,7 @@ void CollectItemPredicates(bool initial, PredicateList& pList); virtual void OnLink(); - + private: /** a cached reference to the SimulationServer */ CachedPath<SimulationServer> mSimulationServer; Modified: trunk/spark/lib/oxygen/monitorserver/monitorsystem.h =================================================================== --- trunk/spark/lib/oxygen/monitorserver/monitorsystem.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/monitorserver/monitorsystem.h 2009-03-17 18:03:47 UTC (rev 56) @@ -24,12 +24,13 @@ #include <zeitgeist/class.h> #include <zeitgeist/node.h> +#include <oxygen/oxygen_defines.h> #include <oxygen/gamecontrolserver/predicate.h> namespace oxygen { -class MonitorSystem : public zeitgeist::Node +class OXYGEN_API MonitorSystem : public zeitgeist::Node { public: MonitorSystem(); Modified: trunk/spark/lib/oxygen/oxygen.h =================================================================== --- trunk/spark/lib/oxygen/oxygen.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/oxygen.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_OXYGEN_H #define OXYGEN_OXYGEN_H +#include "oxygen_defines.h" #include "agentaspect/agentaspect.h" #include "agentaspect/effector.h" #include "agentaspect/perceptor.h" @@ -101,7 +102,7 @@ /** This is the main class, which initializes the Oxygen framework. It registers all internal classes. */ -class Oxygen +class OXYGEN_API Oxygen { public: /** initializes the oxygen framework \param zg is a reference to Added: trunk/spark/lib/oxygen/oxygen_defines.h =================================================================== --- trunk/spark/lib/oxygen/oxygen_defines.h (rev 0) +++ trunk/spark/lib/oxygen/oxygen_defines.h 2009-03-17 18:03:47 UTC (rev 56) @@ -0,0 +1,32 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2009 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef OXYGEN_OXYGEN_DEFINES_H +#define OXYGEN_OXYGEN_DEFINES_H + +#include <salt/defines.h> + +#ifdef oxygen_EXPORTS +#define OXYGEN_API API_EXPORT +#else +#define OXYGEN_API API_IMPORT +#endif + +#endif //OXYGEN_OXYGEN_DEFINES_H Property changes on: trunk/spark/lib/oxygen/oxygen_defines.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Modified: trunk/spark/lib/oxygen/physicsserver/angularmotor.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/angularmotor.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/angularmotor.h 2009-03-17 18:03:47 UTC (rev 56) @@ -20,6 +20,7 @@ #ifndef OXYGEN_ANGULARMOTOR_H #define OXYGEN_ANGULARMOTOR_H +#include <oxygen/oxygen_defines.h> #include "joint.h" namespace oxygen @@ -31,7 +32,7 @@ up to three axes, allowing torque motors and stops to be set for rotation about those axes. */ -class AngularMotor : public Joint +class OXYGEN_API AngularMotor : public Joint { public: enum EMotorMode Modified: trunk/spark/lib/oxygen/physicsserver/balljoint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/balljoint.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/balljoint.h 2009-03-17 18:03:47 UTC (rev 56) @@ -20,13 +20,14 @@ #ifndef OXYGEN_BALLJOINT_H #define OXYGEN_BALLJOINT_H +#include <oxygen/oxygen_defines.h> #include "joint.h" namespace oxygen { class Body; -class BallJoint : public Joint +class OXYGEN_API BallJoint : public Joint { public: BallJoint(); Modified: trunk/spark/lib/oxygen/physicsserver/body.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/body.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/body.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_BODY_H #define OXYGEN_BODY_H +#include <oxygen/oxygen_defines.h> #include "odeobject.h" namespace oxygen @@ -35,7 +36,7 @@ usually constant over time: Mass, Center of mass and Inertia matrix (mass distribution matrix) */ -class Body : public ODEObject +class OXYGEN_API Body : public ODEObject { // // Functions @@ -319,10 +320,10 @@ protected: /** the managed ode body */ dBodyID mODEBody; - + /** the total mass translation */ salt::Vector3f mMassTrans; - + /** flag whether mass has been transformed */ bool mMassTransformed; }; Modified: trunk/spark/lib/oxygen/physicsserver/bodycontroller.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/bodycontroller.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/bodycontroller.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_BODYCONTROLLER_H #define OXYGEN_BODYCONTROLLER_H +#include <oxygen/oxygen_defines.h> #include <oxygen/sceneserver/basenode.h> namespace oxygen @@ -31,7 +32,7 @@ /** \class BodyController is a baseclass for nodes that control the motion of an associated body. */ -class BodyController : public BaseNode +class OXYGEN_API BodyController : public BaseNode { public: BodyController() : BaseNode() {} Modified: trunk/spark/lib/oxygen/physicsserver/boxcollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/boxcollider.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/boxcollider.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_BOXCOLLIDER_H #define OXYGEN_BOXCOLLIDER_H +#include <oxygen/oxygen_defines.h> #include "collider.h" namespace oxygen @@ -29,7 +30,7 @@ /** BoxCollider encapsulates an ODE box geometry object. */ -class BoxCollider : public Collider +class OXYGEN_API BoxCollider : public Collider { // // Functions Modified: trunk/spark/lib/oxygen/physicsserver/ccylindercollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/ccylindercollider.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/ccylindercollider.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_CCYLINDERCOLLIDER_H #define OXYGEN_CCYLINDERCOLLIDER_H +#include <oxygen/oxygen_defines.h> #include "collider.h" namespace oxygen @@ -32,7 +33,7 @@ half-sphere caps at its ends. This feature makes the internal collision detection code particularly fast and accurate. */ -class CCylinderCollider : public Collider +class OXYGEN_API CCylinderCollider : public Collider { // // Functions Modified: trunk/spark/lib/oxygen/physicsserver/collider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/collider.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/collider.h 2009-03-17 18:03:47 UTC (rev 56) @@ -25,6 +25,7 @@ #include "odeobject.h" #include <string> #include <set> +#include <oxygen/oxygen_defines.h> namespace oxygen { @@ -41,7 +42,7 @@ bodies. A body and a geom together represent all the properties of the simulated object. */ -class Collider : public ODEObject +class OXYGEN_API Collider : public ODEObject { // // Functions Modified: trunk/spark/lib/oxygen/physicsserver/collisionhandler.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/collisionhandler.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/collisionhandler.h 2009-03-17 18:03:47 UTC (rev 56) @@ -23,6 +23,7 @@ #define OXYGEN_COLLISIONHANDLER_H #include <oxygen/sceneserver/basenode.h> +#include <oxygen/oxygen_defines.h> #include "odewrapper.h" namespace oxygen @@ -40,7 +41,7 @@ an ODE contact joint, covering the most common response to a collision. */ -class CollisionHandler : public BaseNode +class OXYGEN_API CollisionHandler : public BaseNode { // // Functions Modified: trunk/spark/lib/oxygen/physicsserver/contactjointhandler.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/contactjointhandler.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/contactjointhandler.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_CONTACTJOINTHANDLER_H #define OXYGEN_CONTACTJOINTHANDLER_H +#include <oxygen/oxygen_defines.h> #include "collisionhandler.h" namespace oxygen @@ -31,7 +32,7 @@ ODE contact joint between the two bodies associated with the two affected collision geoms. */ -class ContactJointHandler : public CollisionHandler +class OXYGEN_API ContactJointHandler : public CollisionHandler { public: ContactJointHandler(); Modified: trunk/spark/lib/oxygen/physicsserver/dragcontroller.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/dragcontroller.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/dragcontroller.h 2009-03-17 18:03:47 UTC (rev 56) @@ -20,6 +20,7 @@ #ifndef OXYGEN_DRAGCONTROLLER_H #define OXYGEN_DRAGCONTROLLER_H +#include <oxygen/oxygen_defines.h> #include <oxygen/physicsserver/bodycontroller.h> namespace oxygen @@ -28,7 +29,7 @@ /** \class DragController is a BodyController that applies a linear and angular drag the controlled body. */ -class DragController : public BodyController +class OXYGEN_API DragController : public BodyController { // // Functions Modified: trunk/spark/lib/oxygen/physicsserver/fixedjoint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/fixedjoint.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/fixedjoint.h 2009-03-17 18:03:47 UTC (rev 56) @@ -20,6 +20,7 @@ #ifndef OXYGEN_FIXEDJOINT_H #define OXYGEN_FIXEDJOINT_H +#include <oxygen/oxygen_defines.h> #include "joint.h" namespace oxygen @@ -28,14 +29,14 @@ orientation between two bodies, or between a body and the static environment. */ -class FixedJoint : public Joint +class OXYGEN_API FixedJoint : public Joint { public: FixedJoint(); virtual ~FixedJoint(); - /** Call this on the fixed joint after it has been attached to remember - the current desired relative offset and desired relative rotation + /** Call this on the fixed joint after it has been attached to remember + the current desired relative offset and desired relative rotation between the bodies. */ void SetFixed(); Modified: trunk/spark/lib/oxygen/physicsserver/hinge2joint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/hinge2joint.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/hinge2joint.h 2009-03-17 18:03:47 UTC (rev 56) @@ -20,13 +20,14 @@ #ifndef OXYGEN_HINGE2JOINT_H #define OXYGEN_HINGE2JOINT_H +#include <oxygen/oxygen_defines.h> #include "joint.h" namespace oxygen { class Body; -class Hinge2Joint : public Joint +class OXYGEN_API Hinge2Joint : public Joint { public: Hinge2Joint(); Modified: trunk/spark/lib/oxygen/physicsserver/hingejoint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/hingejoint.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/hingejoint.h 2009-03-17 18:03:47 UTC (rev 56) @@ -20,13 +20,14 @@ #ifndef OXYGEN_HINGEJOINT_H #define OXYGEN_HINGEJOINT_H +#include <oxygen/oxygen_defines.h> #include "joint.h" namespace oxygen { class Body; -class HingeJoint : public Joint +class OXYGEN_API HingeJoint : public Joint { public: HingeJoint(); Modified: trunk/spark/lib/oxygen/physicsserver/joint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/joint.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/joint.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_JOINT_H #define OXYGEN_JOINT_H +#include <oxygen/oxygen_defines.h> #include "odeobject.h" namespace oxygen @@ -46,7 +47,7 @@ rates) directly, instead you must set the corresponding body positions and velocities. */ -class Joint : public ODEObject +class OXYGEN_API Joint : public ODEObject { public: enum EBodyIndex @@ -136,10 +137,10 @@ salt::Vector3f GetFeedbackTorque(EBodyIndex idx) const; /** sets the fudgefactor parameter, making this value too small can - prevent the motor from being able to move the joint away from - a stop + prevent the motor from being able to move the joint away from + a stop */ - void SetFudgeFactor(EAxisIndex idx, float fudge_factor); + void SetFudgeFactor(EAxisIndex idx, float fudge_factor); /** returns the fudgefactor paramter */ float GetFudgeFactor(EAxisIndex idx) const; Modified: trunk/spark/lib/oxygen/physicsserver/odeobject.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/odeobject.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/odeobject.h 2009-03-17 18:03:47 UTC (rev 56) @@ -23,6 +23,7 @@ #ifndef OXYGEN_ODEOBJECT_H #define OXYGEN_ODEOBJECT_H +#include <oxygen/oxygen_defines.h> #include <oxygen/sceneserver/basenode.h> #include "odewrapper.h" @@ -33,7 +34,7 @@ /** ODEObject is the base of all classes encapsulating ODE concepts */ -class ODEObject : public BaseNode +class OXYGEN_API ODEObject : public BaseNode { public: // Modified: trunk/spark/lib/oxygen/physicsserver/physicsserver.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/physicsserver.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/physicsserver.h 2009-03-17 18:03:47 UTC (rev 56) @@ -24,7 +24,7 @@ #include <zeitgeist/class.h> #include <zeitgeist/leaf.h> -//#include <ode/ode.h> +#include <oxygen/oxygen_defines.h> #include "odewrapper.h" namespace oxygen @@ -32,7 +32,7 @@ class Body; class Collider; -class PhysicsServer : public zeitgeist::Leaf +class OXYGEN_API PhysicsServer : public zeitgeist::Leaf { // // Functions Modified: trunk/spark/lib/oxygen/physicsserver/planecollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/planecollider.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/planecollider.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_PLANECOLLIDER_H #define OXYGEN_PLANECOLLIDER_H +#include <oxygen/oxygen_defines.h> #include "collider.h" namespace oxygen @@ -34,7 +35,7 @@ words it is assumed that the plane is always part of the static environment and not tied to any movable object. */ -class PlaneCollider : public Collider +class OXYGEN_API PlaneCollider : public Collider { // // Functions Modified: trunk/spark/lib/oxygen/physicsserver/raycollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/raycollider.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/raycollider.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_RAYCOLLIDER_H #define OXYGEN_RAYCOLLIDER_H +#include <oxygen/oxygen_defines.h> #include "collider.h" namespace oxygen @@ -34,7 +35,7 @@ * from the geom's position and extends in the direction of the geom's * local Z-axis. */ -class RayCollider : public Collider +class OXYGEN_API RayCollider : public Collider { // // Functions Modified: trunk/spark/lib/oxygen/physicsserver/recorderhandler.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/recorderhandler.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/recorderhandler.h 2009-03-17 18:03:47 UTC (rev 56) @@ -25,14 +25,15 @@ #include "collisionhandler.h" #include "collider.h" #include <set> +#include <oxygen/oxygen_defines.h> namespace oxygen -{ +{ /** \class RecorderHandler is a CollisionHandler that accumulates collision information of the Collider it belongs to. It is the resonsibility of the user to reset the recorder. */ -class RecorderHandler : public CollisionHandler +class OXYGEN_API RecorderHandler : public CollisionHandler { public: typedef std::set<boost::weak_ptr<Collider> > TCollisionSet; @@ -66,12 +67,12 @@ \param list is the list that receives the parent nodes */ void GetParentsSupportingClass(const std::string &name, TParentList &list); - + /** same functionality as GetParentsSupportingClass, but using the C++ type system instead of string comparisons for improved performance - \param CLASS is the template parameter for the name of the class + \param CLASS is the template parameter for the name of the class the parent nodes must support \param list is the list that receives the parent nodes Modified: trunk/spark/lib/oxygen/physicsserver/sliderjoint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/sliderjoint.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/sliderjoint.h 2009-03-17 18:03:47 UTC (rev 56) @@ -20,13 +20,14 @@ #ifndef OXYGEN_SLIDERJOINT_H #define OXYGEN_SLIDERJOINT_H +#include <oxygen/oxygen_defines.h> #include "joint.h" namespace oxygen { class Body; -class SliderJoint : public Joint +class OXYGEN_API SliderJoint : public Joint { public: SliderJoint(); Modified: trunk/spark/lib/oxygen/physicsserver/space.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/space.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/space.h 2009-03-17 18:03:47 UTC (rev 56) @@ -24,6 +24,7 @@ #include "odeobject.h" #include <set> +#include <oxygen/oxygen_defines.h> namespace oxygen { @@ -36,7 +37,7 @@ similar to the rigid body concept of the `world', except that it applies to collision instead of dynamics. */ -class Space : public ODEObject +class OXYGEN_API Space : public ODEObject { public: typedef std::set<dSpaceID> TSpaceIdSet; Modified: trunk/spark/lib/oxygen/physicsserver/spherecollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/spherecollider.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/spherecollider.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_SPHERECOLLIDER_H #define OXYGEN_SPHERECOLLIDER_H +#include <oxygen/oxygen_defines.h> #include "collider.h" namespace oxygen @@ -29,7 +30,7 @@ /** SphereCollider encapsulates an ODE sphere geometry object. */ -class SphereCollider : public Collider +class OXYGEN_API SphereCollider : public Collider { // // Functions Modified: trunk/spark/lib/oxygen/physicsserver/transformcollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/transformcollider.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/transformcollider.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_TRANSFORMCOLLIDER_H #define OXYGEN_TRANSFORMCOLLIDER_H +#include <oxygen/oxygen_defines.h> #include "collider.h" namespace oxygen @@ -43,7 +44,7 @@ they allow multiple displaced geoms to be connected to one body. */ -class TransformCollider : public Collider +class OXYGEN_API TransformCollider : public Collider { // // Functions Modified: trunk/spark/lib/oxygen/physicsserver/universaljoint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/universaljoint.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/universaljoint.h 2009-03-17 18:03:47 UTC (rev 56) @@ -20,13 +20,14 @@ #ifndef OXYGEN_UNIVERSALJOINT_H #define OXYGEN_UNIVERSALJOINT_H +#include <oxygen/oxygen_defines.h> #include "joint.h" namespace oxygen { class Body; -class UniversalJoint : public Joint +class OXYGEN_API UniversalJoint : public Joint { public: UniversalJoint(); Modified: trunk/spark/lib/oxygen/physicsserver/velocitycontroller.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/velocitycontroller.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/velocitycontroller.h 2009-03-17 18:03:47 UTC (rev 56) @@ -20,6 +20,7 @@ #ifndef OXYGEN_VELOCITYCONTROLLER_H #define OXYGEN_VELOCITYCONTROLLER_H +#include <oxygen/oxygen_defines.h> #include <oxygen/physicsserver/bodycontroller.h> namespace oxygen @@ -28,7 +29,7 @@ /** \class VelocityController is a BodyController that restricts the maximum velocity a body can attain */ -class VelocityController : public BodyController +class OXYGEN_API VelocityController : public BodyController { // // Functions Modified: trunk/spark/lib/oxygen/physicsserver/world.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/world.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/oxygen/physicsserver/world.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,6 +22,7 @@ #ifndef OXYGEN_WORLD_H #define OXYGEN_WORLD_H +#include <oxygen/oxygen_defines.h> #include "odeobject.h" namespace oxygen @@ -34,7 +35,7 @@ time, thus one reason to use separate worlds is to simulate systems at different rates. */ -class World : public ODEObject +class OXYGEN_API World : public ODEObject { // // Functions Modified: trunk/spark/lib/salt/CMakeLists.txt =================================================================== --- trunk/spark/lib/salt/CMakeLists.txt 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/salt/CMakeLists.txt 2009-03-17 18:03:47 UTC (rev 56) @@ -14,6 +14,7 @@ rect.h sharedlibrary.h vector.h + salt_defines.h ) set(salt_LIB_SRCS Modified: trunk/spark/lib/salt/bounds.h =================================================================== --- trunk/spark/lib/salt/bounds.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/salt/bounds.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,7 +22,7 @@ #ifndef SALT_BOUNDS_H #define SALT_BOUNDS_H -#include "defines.h" +#include "salt_defines.h" #include "matrix.h" #include "vector.h" @@ -32,7 +32,7 @@ { /** AABB3 provides an axis aligned three dimensional bounding box */ -class AABB3 +class SALT_API AABB3 { public: // constructors @@ -142,7 +142,7 @@ }; /** AABB2 provides an axis aligned two dimensional bounding box */ -class AABB2 +class SALT_API AABB2 { public: // constructors @@ -234,7 +234,7 @@ /** BoundingSphere provides a three dimensional sphere */ -class BoundingSphere +class SALT_API BoundingSphere { public: // constructors Modified: trunk/spark/lib/salt/defines.h =================================================================== --- trunk/spark/lib/salt/defines.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/salt/defines.h 2009-03-17 18:03:47 UTC (rev 56) @@ -36,27 +36,32 @@ #if defined(_MSC_VER) // here we turn of a couple of pesky warnings VC emmits - #pragma warning (disable : 4786) // truncation of debug information + #pragma warning (disable : 4786) // truncation of debug information + #pragma warning (disable : 4251) // don't complain about missing dll interfaces #endif // some compiler-specific defines #if defined(_MSC_VER) - // shared library export stuff + // shared library export/import stuff #define SHARED_LIB_EXPORT __declspec(dllexport) + #define SHARED_LIB_IMPORT __declspec(dllimport) // other symbols #define f_inline __forceinline // hide the attribute definitions from MSVC #define __attribute__(x) /*NOTHING*/ #elif defined(__GNUC__) #define SHARED_LIB_EXPORT + #define SHARED_LIB_IMPORT #define f_inline inline #endif // this macro only exports the class in a header, if the shared library version is compiled #ifdef SHARED_LIB_COMPILE - #define CLASS_EXPORT SHARED_LIB_EXPORT + #define API_EXPORT SHARED_LIB_EXPORT + #define API_IMPORT SHARED_LIB_IMPORT #else - #define CLASS_EXPORT + #define API_EXPORT + #define API_IMPORT #endif #define Assert(expression, desc) assert(expression && desc) Modified: trunk/spark/lib/salt/fileclasses.h =================================================================== --- trunk/spark/lib/salt/fileclasses.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/salt/fileclasses.h 2009-03-17 18:03:47 UTC (rev 56) @@ -34,6 +34,7 @@ #include <cstdio> #include <cstdlib> #include <string> +#include "salt_defines.h" #ifndef PATH_MAX #define PATH_MAX 4096 @@ -45,7 +46,7 @@ /** RFile defines an interface and some basic support functions for * classes providing read only file services */ -class RFile +class SALT_API RFile { public: virtual ~RFile() {}; @@ -178,7 +179,7 @@ * buffer. On open() a file is completely read into the buffer and * from there on served from memory. */ -class MemFile : public RFile +class SALT_API MemFile : public RFile { public: MemFile(const char*fn=NULL, const char*mode="rb"); @@ -223,7 +224,7 @@ /** WFile extends the RFile interface with methods for writing to a * file and related support funtions */ -class WFile : public RFile +class SALT_API WFile : public RFile { public: virtual ~WFile() {}; @@ -306,7 +307,7 @@ }; /** StdFile implements the WFile interface using the standard file system */ -class StdFile : public WFile +class SALT_API StdFile : public WFile { public: StdFile(FILE*f); Modified: trunk/spark/lib/salt/frustum.h =================================================================== --- trunk/spark/lib/salt/frustum.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/salt/frustum.h 2009-03-17 18:03:47 UTC (rev 56) @@ -36,7 +36,7 @@ #ifndef SALT_FRUSTUM_H #define SALT_FRUSTUM_H -#include "defines.h" +#include "salt_defines.h" #include "plane.h" #include "bounds.h" @@ -47,7 +47,7 @@ * space (possibly infinite) defined by a set of planes. This class * also provides some 'special' frustra construction methods. */ -class Frustum +class SALT_API Frustum { // Members public: Modified: trunk/spark/lib/salt/matrix.h =================================================================== --- trunk/spark/lib/salt/matrix.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/salt/matrix.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,7 +22,7 @@ #ifndef SALT_MATRIX_H #define SALT_MATRIX_H -#include "defines.h" +#include "salt_defines.h" #include "vector.h" #include <memory.h> @@ -35,7 +35,7 @@ /** Matrix provides a 4x4 float Matrix along with methods to set * up and manipulate it. */ -class Matrix +class SALT_API Matrix { public: /** the values of the matrix */ Modified: trunk/spark/lib/salt/path.h =================================================================== --- trunk/spark/lib/salt/path.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/salt/path.h 2009-03-17 18:03:47 UTC (rev 56) @@ -44,6 +44,7 @@ #include <sparkconfig.h> #endif +#include "salt_defines.h" #include <string> #include <list> @@ -54,7 +55,7 @@ * hierarchy. It is capable of cleaning paths and separating a path * into path components. */ -class Path +class SALT_API Path { // // types Modified: trunk/spark/lib/salt/plane.h =================================================================== --- trunk/spark/lib/salt/plane.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/salt/plane.h 2009-03-17 18:03:47 UTC (rev 56) @@ -32,7 +32,7 @@ #ifndef SALT_PLANE_H #define SALT_PLANE_H -#include "defines.h" +#include "salt_defines.h" #include "vector.h" #include "bounds.h" @@ -68,7 +68,7 @@ * vector formed by the coefficients <A,B,C> is the normal vector to * the plane. */ -class Plane +class SALT_API Plane { // Members public: Modified: trunk/spark/lib/salt/random.h =================================================================== --- trunk/spark/lib/salt/random.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/salt/random.h 2009-03-17 18:03:47 UTC (rev 56) @@ -24,6 +24,7 @@ #include <boost/random.hpp> #include <boost/version.hpp> +#include "salt_defines.h" namespace salt { Modified: trunk/spark/lib/salt/rect.h =================================================================== --- trunk/spark/lib/salt/rect.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/salt/rect.h 2009-03-17 18:03:47 UTC (rev 56) @@ -22,13 +22,13 @@ #ifndef SALT_RECT_H #define SALT_RECT_H -#include "defines.h" +#include "salt_defines.h" namespace salt { /** this class provides rectangle in two dimensional space */ -class Rect +class SALT_API Rect { public: /** constucts undefined Rect for performance reasons */ Added: trunk/spark/lib/salt/salt_defines.h =================================================================== --- trunk/spark/lib/salt/salt_defines.h (rev 0) +++ trunk/spark/lib/salt/salt_defines.h 2009-03-17 18:03:47 UTC (rev 56) @@ -0,0 +1,32 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2009 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef SALT_SALT_DEFINES_H +#define SALT_SALT_DEFINES_H + +#include "defines.h" + +#ifdef salt_EXPORTS +#define SALT_API API_EXPORT +#else +#define SALT_API API_IMPORT +#endif + +#endif //SALT_SALT_DEFINES_H Property changes on: trunk/spark/lib/salt/salt_defines.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Id Modified: trunk/spark/lib/salt/sharedlibrary.h =================================================================== --- trunk/spark/lib/salt/sharedlibrary.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/salt/sharedlibrary.h 2009-03-17 18:03:47 UTC (rev 56) @@ -29,7 +29,7 @@ #ifndef SALT_SHAREDLIBRARY_H #define SALT_SHAREDLIBRARY_H -#include "defines.h" +#include "salt_defines.h" #include <string> #include <cstdio> @@ -42,7 +42,7 @@ * Windows using the Visual C++ Compiler and Linux using the gcc * compiler are available. */ -class SharedLibrary +class SALT_API SharedLibrary { // // types Modified: trunk/spark/lib/salt/tvector.h =================================================================== --- trunk/spark/lib/salt/tvector.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/salt/tvector.h 2009-03-17 18:03:47 UTC (rev 56) @@ -33,7 +33,7 @@ #ifndef SALT_TVECTOR_H #define SALT_TVECTOR_H -#include "defines.h" +#include "salt_defines.h" #include "gmath.h" #include <iostream> Modified: trunk/spark/lib/salt/vector.h =================================================================== --- trunk/spark/lib/salt/vector.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/salt/vector.h 2009-03-17 18:03:47 UTC (rev 56) @@ -37,7 +37,7 @@ namespace salt { -class Vector2f : public TVector2<float, Vector2f> +class SALT_API Vector2f : public TVector2<float, Vector2f> { // // Methods @@ -74,7 +74,7 @@ } }; -class Vector3f : public TVector3<float, Vector3f> +class SALT_API Vector3f : public TVector3<float, Vector3f> { // // Methods Modified: trunk/spark/lib/zeitgeist/CMakeLists.txt =================================================================== --- trunk/spark/lib/zeitgeist/CMakeLists.txt 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/zeitgeist/CMakeLists.txt 2009-03-17 18:03:47 UTC (rev 56) @@ -9,6 +9,7 @@ object.h object_c.h zeitgeist.h + zeitgeist_defines.h fileserver/fileserver.h fileserver/filesystem.h logserver/logserver.h Modified: trunk/spark/lib/zeitgeist/class.h =================================================================== --- trunk/spark/lib/zeitgeist/class.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/zeitgeist/class.h 2009-03-17 18:03:47 UTC (rev 56) @@ -127,7 +127,7 @@ * through a unified interface, therefore enabling Class objects to be * added at runtime to the Core. */ -class Class : public Leaf +class ZEITGEIST_API Class : public Leaf { // friends friend class Object; Modified: trunk/spark/lib/zeitgeist/core.h =================================================================== --- trunk/spark/lib/zeitgeist/core.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/zeitgeist/core.h 2009-03-17 18:03:47 UTC (rev 56) @@ -28,6 +28,7 @@ #include <set> #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> +#include "zeitgeist_defines.h" namespace salt { @@ -53,7 +54,7 @@ bundles- plugins containg new classes, that can be registered to the framework at runtime. */ -class Core +class ZEITGEIST_API Core { public: // Modified: trunk/spark/lib/zeitgeist/corecontext.h =================================================================== --- trunk/spark/lib/zeitgeist/corecontext.h 2009-03-07 11:38:32 UTC (rev 55) +++ trunk/spark/lib/zeitgeist/corecontext.h 2009-03-17 18:03:47 UTC (rev 56) @@ -34,6 +34,7 @@ #include <list> #include <boost/weak_ptr.hpp> #include <boost/shared_ptr.hpp> +#include "zeitgeist_defines.h" namespace zeitgeist { @@ -51,7 +52,7 @@ * browsing the same object hierarchy. Therefore it was necessary to * place the current browsing context into a distinct object. */ -class CoreContext +class ZEITGEIST_API CoreContext { // // types Modified: trunk/spark/lib/zeitgeist/fileserver/fileserver.h =================================================================== ---... [truncated message content] |
From: <he...@us...> - 2009-04-14 20:00:06
|
Revision: 60 http://simspark.svn.sourceforge.net/simspark/?rev=60&view=rev Author: hedayat Date: 2009-04-14 19:59:50 +0000 (Tue, 14 Apr 2009) Log Message: ----------- - print Skipping remaining time errors as warnings only in Debug mode - prevent a segfault on linux when simspark quit. Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp trunk/spark/plugin/CMakeLists.txt Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-04-08 11:39:36 UTC (rev 59) +++ trunk/spark/ChangeLog 2009-04-14 19:59:50 UTC (rev 60) @@ -1,3 +1,11 @@ +2009-04-15 Hedayat Vatankhah <he...@gr...> + + * plugin/CMakeLists.txt: + - don't link plugins to spark libraries to prevent segfault on Linux + + * lib/oxygen/simulationserver/simulationserver.cpp (UpdateDeltaTimeAfterStep): + - Skipping remaining time error is now a debug warning message + 2009-03-17 Hedayat Vatankhah <he...@gr...> * lib/kerosin/imageserver/imageserver.h (ImageServer): Modified: trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2009-04-08 11:39:36 UTC (rev 59) +++ trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2009-04-14 19:59:50 UTC (rev 60) @@ -520,8 +520,8 @@ if (mAdjustSpeed && mSumDeltaTime > mMaxStepsPerCycle * mSimStep) { - GetLog()->Error() - << "(SimulationServer) ERROR: Skipping remaining time: " + GetLog()->Debug() + << "(SimulationServer) Warning: Skipping remaining time: " << mSumDeltaTime - mSimStep << '\n'; mSumDeltaTime = 0; } Modified: trunk/spark/plugin/CMakeLists.txt =================================================================== --- trunk/spark/plugin/CMakeLists.txt 2009-04-08 11:39:36 UTC (rev 59) +++ trunk/spark/plugin/CMakeLists.txt 2009-04-14 19:59:50 UTC (rev 60) @@ -1,7 +1,10 @@ include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility ${Boost_INCLUDE_DIRS} ${ODE_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) -set(spark_libs kerosin oxygen zeitgeist salt) +# It is problematic under Linux! Will cause segfaults on simspark exit. +if (WIN32 OR APPLE) + set(spark_libs kerosin oxygen salt zeitgeist) +endif (WIN32 OR APPLE) if (APPLE AND USE_COREFOUNDATION) set(spark_libs ${spark_libs} /System/Library/Frameworks/CoreFoundation.framework) endif (APPLE AND USE_COREFOUNDATION) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sgv...@us...> - 2009-06-15 14:22:15
|
Revision: 67 http://simspark.svn.sourceforge.net/simspark/?rev=67&view=rev Author: sgvandijk Date: 2009-06-15 13:33:46 +0000 (Mon, 15 Jun 2009) Log Message: ----------- - Make reading client messages a bit more fail-safe by making sure the full message is read Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-05-27 15:31:10 UTC (rev 66) +++ trunk/spark/ChangeLog 2009-06-15 13:33:46 UTC (rev 67) @@ -1,3 +1,8 @@ +2009-06-15 Sander van Dijk <sgv...@gm...> + + * lib/oxygen/simulationserver/netcontrol.cpp + - Make reading client messages a bit more fail-safe by making sure the full message is read + 2009-04-15 Hedayat Vatankhah <he...@gr...> * plugin/CMakeLists.txt: @@ -242,4 +247,4 @@ * configure.ac: - fixed an issue with out of source builds, now it is possible to build - simspark in a separate directory. \ No newline at end of file + simspark in a separate directory. Modified: trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2009-05-27 15:31:10 UTC (rev 66) +++ trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2009-06-15 13:33:46 UTC (rev 67) @@ -627,14 +627,30 @@ // read a fragment shared_ptr<Client>& client = (*iter).second; - int rval = client->socket->recv(mBuffer.get(),mBufferSize); + + const unsigned int preSz = sizeof(unsigned int); + int nRead = 0; + int retval = 1; + while (nRead < preSz && retval > 0) + { + retval = client->socket->recv(mBuffer.get() + nRead, preSz - nRead); + nRead += retval; + } + + unsigned int len = ntohl(reinterpret_cast<unsigned int*>(mBuffer.get())[0]); - if (rval > 0) + while (nRead < preSz + len && retval > 0) + { + retval = client->socket->recv(mBuffer.get() + nRead, preSz + len - nRead); + nRead += retval; + } + + if (retval > 0) { - StoreFragment(client->addr,rval); + StoreFragment(client->addr,nRead); } else { - if (rval <= 0) + if (retval <= 0) { GetLog()->Error() << "(NetControl) ERROR: '" << GetName() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-07-29 12:18:49
|
Revision: 78 http://simspark.svn.sourceforge.net/simspark/?rev=78&view=rev Author: hedayat Date: 2009-07-29 12:18:34 +0000 (Wed, 29 Jul 2009) Log Message: ----------- Server will run in multi-threaded mode by default some fixes related to multi-threaded running. Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp trunk/spark/lib/oxygen/simulationserver/simulationserver.h trunk/spark/spark/spark.rb Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-07-27 09:36:56 UTC (rev 77) +++ trunk/spark/ChangeLog 2009-07-29 12:18:34 UTC (rev 78) @@ -1,3 +1,12 @@ +2009-07-29 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/simulationserver/simulationserver.h: + * lib/oxygen/simulationserver/simulationserver.cpp: + - fixed some issues in multi-threaded code + + * spark/spark.rb: + - making multi-threaded mode the default mode for running server + 2009-07-27 Hedayat Vatankhah <he...@gr...> * lib/zeitgeist/scriptserver/scriptserver.cpp: Modified: trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2009-07-27 09:36:56 UTC (rev 77) +++ trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2009-07-29 12:18:34 UTC (rev 78) @@ -221,7 +221,7 @@ { mSceneServer->PrePhysicsUpdate(mSimStep); mSceneServer->PhysicsUpdate(mSimStep); - UpdateDeltaTimeAfterStep(); + UpdateDeltaTimeAfterStep(mSumDeltaTime); finalStep += mSimStep; } mSceneServer->PostPhysicsUpdate(); @@ -421,28 +421,30 @@ shared_ptr<SimControlNode> renderControl = GetControlNode("RenderControl"); + float initDelta, finalDelta; while (true) { ++mCycle; mThreadBarrier->wait(); mSceneServer->PrePhysicsUpdate(mSimStep); mThreadBarrier->wait(); - mSceneServer->PhysicsUpdate(mSimStep); - if (mAutoTime) - AdvanceTime(mSimStep); - mThreadBarrier->wait(); if (mExit) // this check should be here so that all threads will quit break; + finalDelta = initDelta = mSumDeltaTime; - UpdateDeltaTimeAfterStep(); + mSceneServer->PhysicsUpdate(mSimStep); + if (mAutoTime) + AdvanceTime(mSimStep); + UpdateDeltaTimeAfterStep(finalDelta); + float finalStep = mSimStep; - while (int(mSumDeltaTime*100) >= int(mSimStep*100)) + while (int(finalDelta*100) >= int(mSimStep*100)) { mSceneServer->PhysicsUpdate(mSimStep); - UpdateDeltaTimeAfterStep(); + UpdateDeltaTimeAfterStep(finalDelta); finalStep += mSimStep; } mSceneServer->PostPhysicsUpdate(); @@ -452,6 +454,7 @@ && renderControl->GetTime() - mSimTime < 0.005f ) renderControl->EndCycle(); mThreadBarrier->wait(); + mSumDeltaTime -= initDelta - finalDelta; } // wait for threads @@ -485,14 +488,16 @@ controlNode->ActAgent(); controlNode->SetSimTime(mSimTime); } + mThreadBarrier->wait(); + if (mExit) + break; + if (isInputControl) { while (int(mSumDeltaTime*100) < int(mSimStep*100)) controlNode->StartCycle(); // advance the time } - mThreadBarrier->wait(); - if (mExit) - break; + // wait for physics update mThreadBarrier->wait(); if (!isRenderControl && newCycle) @@ -515,16 +520,16 @@ mMaxStepsPerCycle = max; } -inline void SimulationServer::UpdateDeltaTimeAfterStep() +inline void SimulationServer::UpdateDeltaTimeAfterStep(float &deltaTime) { - if (mAdjustSpeed && mSumDeltaTime > mMaxStepsPerCycle + if (mAdjustSpeed && deltaTime > mMaxStepsPerCycle * mSimStep) { GetLog()->Debug() << "(SimulationServer) Warning: Skipping remaining time: " - << mSumDeltaTime - mSimStep << '\n'; - mSumDeltaTime = 0; + << deltaTime - mSimStep << '\n'; + deltaTime = 0; } else - mSumDeltaTime -= mSimStep; + deltaTime -= mSimStep; } Modified: trunk/spark/lib/oxygen/simulationserver/simulationserver.h =================================================================== --- trunk/spark/lib/oxygen/simulationserver/simulationserver.h 2009-07-27 09:36:56 UTC (rev 77) +++ trunk/spark/lib/oxygen/simulationserver/simulationserver.h 2009-07-29 12:18:34 UTC (rev 78) @@ -174,7 +174,7 @@ void SimControlThread(boost::shared_ptr<SimControlNode> controlNode); /** updates mSumDeltaTime after a step in descreet simulations */ - void UpdateDeltaTimeAfterStep(); + void UpdateDeltaTimeAfterStep(float &deltaTime); protected: /** the argc parameter passed to Run() */ Modified: trunk/spark/spark/spark.rb =================================================================== --- trunk/spark/spark/spark.rb 2009-07-27 09:36:56 UTC (rev 77) +++ trunk/spark/spark/spark.rb 2009-07-29 12:18:34 UTC (rev 78) @@ -279,7 +279,7 @@ simulationServer = sparkGetSimulationServer() if (simulationServer != nil) - simulationServer.setMultiThreads(false); + simulationServer.setMultiThreads(true); simulationServer.initControlNode('oxygen/AgentControl','AgentControl') # set auto speed adjust mode. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-07-30 17:25:57
|
Revision: 80 http://simspark.svn.sourceforge.net/simspark/?rev=80&view=rev Author: hedayat Date: 2009-07-30 17:25:42 +0000 (Thu, 30 Jul 2009) Log Message: ----------- performance improvement: do not call dSpaceCollide() for spaces with disabled internal collision. do not output too small skipped times move PrePhysicsUpdate() call just before PhysicsUpdate() call in RunMultiThreaded() function => 1 less wait() call with no speed loss. Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/physicsserver/space.cpp trunk/spark/lib/oxygen/physicsserver/space.h trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-07-30 17:21:13 UTC (rev 79) +++ trunk/spark/ChangeLog 2009-07-30 17:25:42 UTC (rev 80) @@ -1,3 +1,15 @@ +2009-07-30 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/physicsserver/space.h (Space): + * lib/oxygen/physicsserver/space.cpp (Space::Collide): + - performance improvement: do not call dSpaceCollide() for spaces with + disabled internal collision. + + * lib/oxygen/simulationserver/simulationserver.cpp: + - do not output too small skipped times + - move PrePhysicsUpdate() call just before PhysicsUpdate() call in + RunMultiThreaded() function => 1 less wait() call with no speed loss. + 2009-07-29 Hedayat Vatankhah <he...@gr...> * lib/oxygen/simulationserver/simulationserver.h: Modified: trunk/spark/lib/oxygen/physicsserver/space.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/space.cpp 2009-07-30 17:21:13 UTC (rev 79) +++ trunk/spark/lib/oxygen/physicsserver/space.cpp 2009-07-30 17:25:42 UTC (rev 80) @@ -58,9 +58,17 @@ void Space::Collide() { // bind collision callback function to this object - dSpaceCollide(mODESpace, this, collisionNearCallback); + Collide(mODESpace); } +void Space::Collide(dSpaceID space) +{ + if (gDisabledInnerCollisionSet.find(space) == gDisabledInnerCollisionSet.end()) + { + dSpaceCollide(space, this, collisionNearCallback); + } +} + void Space::HandleSpaceCollide(dGeomID obj1, dGeomID obj2) { // collide all geoms internal to the space(s) @@ -68,12 +76,12 @@ if (dGeomIsSpace (obj1)) { - dSpaceCollide ((dSpaceID)(obj1),this,&collisionNearCallback); + Collide((dSpaceID)obj1); } if (dGeomIsSpace (obj2)) { - dSpaceCollide ((dSpaceID)(obj2),this,&collisionNearCallback); + Collide((dSpaceID)obj2); } } @@ -107,16 +115,17 @@ const dSpaceID s1 = dGeomGetSpace(obj1); const dSpaceID s2 = dGeomGetSpace(obj2); - if ( - (s1 == s2) && - (gDisabledInnerCollisionSet.find(s1) != gDisabledInnerCollisionSet.end()) - ) - { - return; - } + // NOTICE: this should not happen since it is checked in Collide(dSpaceID) +// if ( +// (s1 == s2) && +// (gDisabledInnerCollisionSet.find(s1) != gDisabledInnerCollisionSet.end()) +// ) +// { +// return; +// } - - // if obj1 and obj2 are in the same space, and + + // if obj1 and obj2 are in the same space, and // obj1 is in obj2's "mNotCollideWithSet" or ojb2 is in obj1's // reject the collision Modified: trunk/spark/lib/oxygen/physicsserver/space.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/space.h 2009-07-30 17:21:13 UTC (rev 79) +++ trunk/spark/lib/oxygen/physicsserver/space.h 2009-07-30 17:25:42 UTC (rev 80) @@ -84,6 +84,11 @@ /** registers the managed space to the containing parent space */ virtual void OnLink(); + /** calls ODE's collision detection for this space if internal collision + * detection is enabled for this space. + */ + void Collide(dSpaceID space); + /** callback to handle a potential collision between two contained geoms. It will look up and notify the corresponding colliders for a potential collision. Modified: trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2009-07-30 17:21:13 UTC (rev 79) +++ trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2009-07-30 17:25:42 UTC (rev 80) @@ -426,14 +426,13 @@ { ++mCycle; mThreadBarrier->wait(); - mSceneServer->PrePhysicsUpdate(mSimStep); mThreadBarrier->wait(); - mThreadBarrier->wait(); if (mExit) // this check should be here so that all threads will quit break; finalDelta = initDelta = mSumDeltaTime; + mSceneServer->PrePhysicsUpdate(mSimStep); mSceneServer->PhysicsUpdate(mSimStep); if (mAutoTime) AdvanceTime(mSimStep); @@ -477,8 +476,6 @@ while ( true ) { mThreadBarrier->wait(); - // wait for PrePhysicsUpdate() - mThreadBarrier->wait(); newCycle = false; if ( controlNode->GetTime() - mSimTime <= 0.005f ) { @@ -524,12 +521,16 @@ { if (mAdjustSpeed && deltaTime > mMaxStepsPerCycle * mSimStep) + { + float diff = deltaTime - mSimStep; + if (diff > 0.0001) { GetLog()->Debug() << "(SimulationServer) Warning: Skipping remaining time: " - << deltaTime - mSimStep << '\n'; - deltaTime = 0; + << diff << '\n'; } + deltaTime = 0; + } else deltaTime -= mSimStep; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-07-31 20:27:58
|
Revision: 81 http://simspark.svn.sourceforge.net/simspark/?rev=81&view=rev Author: hedayat Date: 2009-07-31 20:27:41 +0000 (Fri, 31 Jul 2009) Log Message: ----------- small code cleanup NetControl: reverting to the old behaviour; the intended logic of the new changes is already implemented. Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp trunk/spark/lib/oxygen/simulationserver/monitorcontrol.cpp trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-07-30 17:25:42 UTC (rev 80) +++ trunk/spark/ChangeLog 2009-07-31 20:27:41 UTC (rev 81) @@ -1,3 +1,11 @@ +2009-07-31 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/simulationserver/agentcontrol.cpp: + - a small cleanup + + * lib/oxygen/simulationserver/netcontrol.cpp (NetControl::ReadTCPMessages): + - reverting to the old behaviour; the intended logic is already implemented. + 2009-07-30 Hedayat Vatankhah <he...@gr...> * lib/oxygen/physicsserver/space.h (Space): Modified: trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp 2009-07-30 17:25:42 UTC (rev 80) +++ trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp 2009-07-31 20:27:41 UTC (rev 81) @@ -183,12 +183,10 @@ ++iter, idx++ ) { - if (sensesArray[idx].empty()) + if (!sensesArray[idx].empty()) { - continue; + SendClientMessage(iter->second, sensesArray[idx]); } - SendClientMessage(iter->second,sensesArray[idx]); } } - Modified: trunk/spark/lib/oxygen/simulationserver/monitorcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/monitorcontrol.cpp 2009-07-30 17:25:42 UTC (rev 80) +++ trunk/spark/lib/oxygen/simulationserver/monitorcontrol.cpp 2009-07-31 20:27:41 UTC (rev 81) @@ -64,7 +64,7 @@ string header = mMonitorServer->GetMonitorHeaderInfo(); mNetMessage->PrepareToSend(header); SendClientMessage(client->addr,header); - + shared_ptr<Scene> scene = GetActiveScene(); if (scene.get() != 0) { @@ -83,7 +83,7 @@ { return; } - + // send updates to all connected monitors if ( !mClients.empty() ) { @@ -99,7 +99,7 @@ { info = mMonitorServer->GetMonitorData(); } - + mNetMessage->PrepareToSend(info); for ( @@ -148,5 +148,3 @@ } } } - - Modified: trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2009-07-30 17:25:42 UTC (rev 80) +++ trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2009-07-31 20:27:41 UTC (rev 81) @@ -627,30 +627,14 @@ // read a fragment shared_ptr<Client>& client = (*iter).second; - - const unsigned int preSz = sizeof(unsigned int); - int nRead = 0; - int retval = 1; - while (nRead < preSz && retval > 0) - { - retval = client->socket->recv(mBuffer.get() + nRead, preSz - nRead); - nRead += retval; - } - - unsigned int len = ntohl(reinterpret_cast<unsigned int*>(mBuffer.get())[0]); + int rval = client->socket->recv(mBuffer.get(), mBufferSize); - while (nRead < preSz + len && retval > 0) - { - retval = client->socket->recv(mBuffer.get() + nRead, preSz + len - nRead); - nRead += retval; - } - - if (retval > 0) + if (rval > 0) { - StoreFragment(client->addr,nRead); + StoreFragment(client->addr,rval); } else { - if (retval <= 0) + if (rval <= 0) { GetLog()->Error() << "(NetControl) ERROR: '" << GetName() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-08-08 09:27:36
|
Revision: 84 http://simspark.svn.sourceforge.net/simspark/?rev=84&view=rev Author: hedayat Date: 2009-08-08 09:27:18 +0000 (Sat, 08 Aug 2009) Log Message: ----------- Updating release notes for 0.1.2 version Modified Paths: -------------- trunk/spark/NEWS trunk/spark/RELEASE Modified: trunk/spark/NEWS =================================================================== --- trunk/spark/NEWS 2009-08-07 12:27:42 UTC (rev 83) +++ trunk/spark/NEWS 2009-08-08 09:27:18 UTC (rev 84) @@ -1,3 +1,15 @@ +[0.1.2] +This release brings some bugfixes, better performance and also better Windows +support. A Windows installer will be available too. This is the first version +which runs in multi-threaded mode by default. The multi-threaded mode is still +in early stages, and it can be improved cosiderably in future. + +Main changes of this release are: + - improved Windows support, including Windows Installer. + - Multi-threaded mode now works, and is the default mode when running simspark + - Performance improvements + - Fixed a bug in networking code, which were introduced in 0.1.1 + [0.1.1] This release is mainly a bug-fix release, and is the last release before RoboCup 2009 competitions. It is not much different from version 0.1. Modified: trunk/spark/RELEASE =================================================================== --- trunk/spark/RELEASE 2009-08-07 12:27:42 UTC (rev 83) +++ trunk/spark/RELEASE 2009-08-08 09:27:18 UTC (rev 84) @@ -1,11 +1,15 @@ -RELEASE News of simspark-0.1.1 +RELEASE News of simspark-0.1.2 -This release is mainly a bugfix release, and is the last release before -RoboCup 2009 competitions. -Main changes are: - - improved MacOSX and Windows support - - compilation fixes for latest library versions - - more reliable and a bit more fair network communication with the agents +This release brings some bugfixes, better performance and also better Windows +support. A Windows installer will be available too. This is the first version +which runs in multi-threaded mode by default. The multi-threaded mode is still +in early stages, and it can be improved cosiderably in future. +Main changes of this release are: + - improved Windows support, including Windows Installer. + - Multi-threaded mode now works, and is the default mode when running simspark + - Performance improvements + - Fixed a bug in networking code, which were introduced in 0.1.1 + You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-08-11 16:18:12
|
Revision: 88 http://simspark.svn.sourceforge.net/simspark/?rev=88&view=rev Author: hedayat Date: 2009-08-11 16:17:37 +0000 (Tue, 11 Aug 2009) Log Message: ----------- Do not check for ode library name (for detecting correct ode compilation flags) in Linux and Mac Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/cmake/FindODE.cmake Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-08-09 17:02:16 UTC (rev 87) +++ trunk/spark/ChangeLog 2009-08-11 16:17:37 UTC (rev 88) @@ -1,3 +1,8 @@ +2009-08-11 Hedayat Vatankhah <he...@gr...> + + * cmake/FindODE.cmake: + - do not check for ODe library name under Linux + 2009-08-09 Hedayat Vatankhah <he...@gr...> * windows/install_extra.nsi: Modified: trunk/spark/cmake/FindODE.cmake =================================================================== --- trunk/spark/cmake/FindODE.cmake 2009-08-09 17:02:16 UTC (rev 87) +++ trunk/spark/cmake/FindODE.cmake 2009-08-11 16:17:37 UTC (rev 88) @@ -68,11 +68,13 @@ ReleaseSingleDLL ReleaseSingleLib ) - IF(WIN32 AND "${ODE_LIBRARY}" MATCHES ".*double.*") - SET(ODE_EXTRA_CFLAGS "-DdDOUBLE") - ELSE(WIN32 AND "${ODE_LIBRARY}" MATCHES ".*double.*") - SET(ODE_EXTRA_CFLAGS "-DdSINGLE") - ENDIF(WIN32 AND "${ODE_LIBRARY}" MATCHES ".*double.*") + IF (WIN32) + IF("${ODE_LIBRARY}" MATCHES ".*double.*") + SET(ODE_EXTRA_CFLAGS "-DdDOUBLE") + ELSE("${ODE_LIBRARY}" MATCHES ".*double.*") + SET(ODE_EXTRA_CFLAGS "-DdSINGLE") + ENDIF("${ODE_LIBRARY}" MATCHES ".*double.*") + ENDIF (WIN32) IF (ODE_EXTRA_CFLAGS) SET(ODE_CFLAGS ${ODE_EXTRA_CFLAGS} CACHE STRING "Additional ODE flags") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2009-10-31 09:39:50
|
Revision: 96 http://simspark.svn.sourceforge.net/simspark/?rev=96&view=rev Author: hedayat Date: 2009-10-31 09:39:27 +0000 (Sat, 31 Oct 2009) Log Message: ----------- Add SO_REUSEADDR option to the Socket class and use it in simspark Send senses after receiving action commands from the agents Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/RELEASE trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp trunk/spark/lib/oxygen/simulationserver/agentcontrol.h trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp trunk/spark/lib/oxygen/simulationserver/simulationserver.h trunk/spark/utility/rcssnet/socket.cpp trunk/spark/utility/rcssnet/socket.hpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2009-10-26 07:24:44 UTC (rev 95) +++ trunk/spark/ChangeLog 2009-10-31 09:39:27 UTC (rev 96) @@ -1,3 +1,24 @@ +2009-10-31 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/simulationserver/simulationserver.h: + * lib/oxygen/simulationserver/simulationserver.cpp: + - prevent a deadlock case (on exit) in multi-threaded mode + + * lib/oxygen/simulationserver/agentcontrol.h: + * lib/oxygen/simulationserver/agentcontrol.cpp: + - send senses in SenseAgent method, so that they'll be sent after receiving + commands from the agents. this will ensure that any commands sent after + sending senses will be executed in the next cycle, which results in a + more deterministic behaviour + +2009-10-30 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/simulationserver/netcontrol.cpp (NetControl::InitSimulation): + - try to set REUSEADDR flag to reuse local addresses. + + * utility/rcssnet/socket.cpp (Socket::setReuseAddr): + - added the new function + 2009-08-25 Marian Buchta <mar...@gm...> * plugin/openglsyswx/CMakeLists.txt: Modified: trunk/spark/RELEASE =================================================================== --- trunk/spark/RELEASE 2009-10-26 07:24:44 UTC (rev 95) +++ trunk/spark/RELEASE 2009-10-31 09:39:27 UTC (rev 96) @@ -1,15 +1,17 @@ -RELEASE News of simspark-0.1.2 +RELEASE News of simspark-0.1.3 (in progress) -This release brings some bugfixes, better performance and also better Windows -support. A Windows installer will be available too. This is the first version -which runs in multi-threaded mode by default. The multi-threaded mode is still -in early stages, and it can be improved cosiderably in future. +SOME INTERESTING COMMENTS! Main changes of this release are: - - improved Windows support, including Windows Installer. - - Multi-threaded mode now works, and is the default mode when running simspark - - Performance improvements - - Fixed a bug in networking code, which were introduced in 0.1.1 + - Compilation fixes + - Improved Windows support + - Simspark should always accept connections. No more "Connection refused" + messages and the need to wait for simspark's network port to be freed! + - Simspark will now collect received commands right before sending + sense data of the last cycle. So, any commands which is sent by agents + after receiving new sense data will be executed in the next cycle, not the + current one. This results in a more deterministic behavior, and agents' + efficiency should not change between remote and local runs considerably. You can get the package on the Simspark page on SourceForge at http://sourceforge.net/projects/simspark/ Modified: trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp 2009-10-26 07:24:44 UTC (rev 95) +++ trunk/spark/lib/oxygen/simulationserver/agentcontrol.cpp 2009-10-31 09:39:27 UTC (rev 96) @@ -51,6 +51,10 @@ void AgentControl::ClientConnect(shared_ptr<Client> client) { + // Make sure that there is enough space in sense message cache vector + if (client->id >= mClientSenses.size()) + mClientSenses.resize(client->id+1); + if (mGameControlServer.get() == 0) { return; @@ -61,6 +65,8 @@ void AgentControl::ClientDisconnect(shared_ptr<Client> client) { + mClientSenses[client->id].clear(); + if (mGameControlServer.get() == 0) { return; @@ -124,6 +130,23 @@ } } +void AgentControl::SenseAgent() +{ + int clientID; + for ( + TAddrMap::iterator iter = mClients.begin(); + iter != mClients.end(); + ++iter + ) + { + clientID = iter->second->id; + if (!mClientSenses[clientID].empty()) + { + SendClientMessage(iter->second, mClientSenses[clientID]); + } + } +} + void AgentControl::EndCycle() { NetControl::EndCycle(); @@ -146,17 +169,14 @@ return; } - // generate senses for all agents and send them to the - // corresponding net clients - int idx = 0; - vector<string> sensesArray(mClients.size()); + // generate senses for all agents for ( TAddrMap::iterator iter = mClients.begin(); iter != mClients.end(); - ++iter, idx++ + ++iter ) { - shared_ptr<Client>& client = (*iter).second; + const shared_ptr<Client> &client = (*iter).second; shared_ptr<AgentAspect> agent = mGameControlServer->GetAgentAspect(client->id); @@ -166,27 +186,12 @@ } shared_ptr<PredicateList> senseList = agent->QueryPerceptors(); - sensesArray[idx] = parser->Generate(senseList); - if (sensesArray[idx].empty()) + mClientSenses[client->id] = parser->Generate(senseList); + if (mClientSenses[client->id].empty()) { continue; } - mNetMessage->PrepareToSend(sensesArray[idx]); + mNetMessage->PrepareToSend(mClientSenses[client->id]); } - - // sending the senses - idx = 0; - for ( - TAddrMap::iterator iter = mClients.begin(); - iter != mClients.end(); - ++iter, idx++ - ) - { - if (!sensesArray[idx].empty()) - { - SendClientMessage(iter->second, sensesArray[idx]); - } - - } } Modified: trunk/spark/lib/oxygen/simulationserver/agentcontrol.h =================================================================== --- trunk/spark/lib/oxygen/simulationserver/agentcontrol.h 2009-10-26 07:24:44 UTC (rev 95) +++ trunk/spark/lib/oxygen/simulationserver/agentcontrol.h 2009-10-31 09:39:27 UTC (rev 96) @@ -47,7 +47,10 @@ GameControlServer */ virtual void StartCycle(); - /** generates and sends sense updates to all connected agents */ + /** sends sense updates to all connected agents */ + virtual void SenseAgent(); + + /** generates sense updates for all connected agents */ virtual void EndCycle(); protected: @@ -56,6 +59,8 @@ protected: /** cached reference to the GameControlServer */ CachedPath<GameControlServer> mGameControlServer; + + std::vector<std::string> mClientSenses; }; DECLARE_CLASS(AgentControl); Modified: trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2009-10-26 07:24:44 UTC (rev 95) +++ trunk/spark/lib/oxygen/simulationserver/netcontrol.cpp 2009-10-31 09:39:27 UTC (rev 96) @@ -159,6 +159,15 @@ return; } + ret = mSocket->setReuseAddr(true); + + if (ret < 0) + { + GetLog()->Warning() + << "(NetControl) failed to enable reuse of server socket " + << "with '" << strerror(errno) << "'\n"; + } + try { mSocket->bind(mLocalAddr); Modified: trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp =================================================================== --- trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2009-10-26 07:24:44 UTC (rev 95) +++ trunk/spark/lib/oxygen/simulationserver/simulationserver.cpp 2009-10-31 09:39:27 UTC (rev 96) @@ -45,7 +45,8 @@ } SimulationServer::SimulationServer() : - Node(), mAdjustSpeed(false), mMaxStepsPerCycle(3), mThreadBarrier(0) + Node(), mAdjustSpeed(false), mExitThreads(false), mMaxStepsPerCycle(3), + mThreadBarrier(0) { mSimTime = 0.0f; mSimStep = 0.2f; @@ -422,14 +423,15 @@ shared_ptr<SimControlNode> renderControl = GetControlNode("RenderControl"); float initDelta, finalDelta; - while (true) + while (!mExitThreads) { ++mCycle; mThreadBarrier->wait(); + if (mExit) + mExitThreads = true; + // Wait for SimControlNodes' acts at the begining of a cycle mThreadBarrier->wait(); - if (mExit) // this check should be here so that all threads will quit - break; finalDelta = initDelta = mSumDeltaTime; mSceneServer->PrePhysicsUpdate(mSimStep); @@ -452,6 +454,7 @@ if (renderControl && renderControl->GetTime() - mSimTime < 0.005f ) renderControl->EndCycle(); + mThreadBarrier->wait(); mSumDeltaTime -= initDelta - finalDelta; } @@ -473,7 +476,7 @@ bool isRenderControl = (controlNode->GetName() == "RenderControl"); bool newCycle = false; - while ( true ) + while (!mExitThreads) { mThreadBarrier->wait(); newCycle = false; @@ -486,8 +489,6 @@ controlNode->SetSimTime(mSimTime); } mThreadBarrier->wait(); - if (mExit) - break; if (isInputControl) { Modified: trunk/spark/lib/oxygen/simulationserver/simulationserver.h =================================================================== --- trunk/spark/lib/oxygen/simulationserver/simulationserver.h 2009-10-26 07:24:44 UTC (rev 95) +++ trunk/spark/lib/oxygen/simulationserver/simulationserver.h 2009-10-31 09:39:27 UTC (rev 96) @@ -220,6 +220,11 @@ /** skips physical simulation for some time to catch up real time */ bool mAdjustSpeed; + /** in multi-threaded mode, this indicates that all threads should be + * terminated. + */ + bool mExitThreads; + /** determines the number of allowed steps per cycle when mAdjustSpeed is true */ int mMaxStepsPerCycle; Modified: trunk/spark/utility/rcssnet/socket.cpp =================================================================== --- trunk/spark/utility/rcssnet/socket.cpp 2009-10-26 07:24:44 UTC (rev 95) +++ trunk/spark/utility/rcssnet/socket.cpp 2009-10-31 09:39:27 UTC (rev 96) @@ -304,7 +304,22 @@ return -1; } - Socket::SocketDesc + int + Socket::setReuseAddr( bool on ) + { + if( isOpen() ) + { + int doreuse = on; + return setsockopt( getFD(), SOL_SOCKET, + SO_REUSEADDR, + (const char*)&doreuse, + sizeof( int ) ); + } + errno = EPERM; + return -1; + } + + Socket::SocketDesc Socket::getFD() const { return ( isOpen() ? *(m_handle.get()) : Socket::INVALIDSOCKET ); } Modified: trunk/spark/utility/rcssnet/socket.hpp =================================================================== --- trunk/spark/utility/rcssnet/socket.hpp 2009-10-26 07:24:44 UTC (rev 95) +++ trunk/spark/utility/rcssnet/socket.hpp 2009-10-31 09:39:27 UTC (rev 96) @@ -95,6 +95,9 @@ int setBroadcast( bool on = true ); + int + setReuseAddr( bool on = true ); + SocketDesc getFD() const; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-03-28 08:27:29
|
Revision: 189 http://simspark.svn.sourceforge.net/simspark/?rev=189&view=rev Author: hedayat Date: 2010-03-28 08:27:22 +0000 (Sun, 28 Mar 2010) Log Message: ----------- Fixed a race condition in MonitorServer->GetMonitorData() Fixed the shared_ptr.hpp path Removed some extra cin/cout Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/oxygen/monitorserver/monitorserver.cpp trunk/spark/lib/oxygen/monitorserver/monitorserver.h trunk/spark/lib/oxygen/physicsserver/int/jointint.h trunk/spark/lib/oxygen/physicsserver/int/physicsobjectint.h trunk/spark/lib/oxygen/physicsserver/int/sliderjointint.h trunk/spark/plugin/odeimps/odejoint.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2010-03-10 06:24:22 UTC (rev 188) +++ trunk/spark/ChangeLog 2010-03-28 08:27:22 UTC (rev 189) @@ -1,3 +1,17 @@ +2010-03-28 Hedayat Vatankhah <he...@gr...> + + * lib/oxygen/monitorserver/monitorserver.h (MonitorServer): + * lib/oxygen/monitorserver/monitorserver.cpp (MonitorServer::GetMonitorData): + - protect GetMonitorData() on simultaneous access + + * lib/oxygen/physicsserver/int/sliderjointint.h: + * lib/oxygen/physicsserver/int/jointint.h: + * lib/oxygen/physicsserver/int/physicsobjectint.h: + - fixed the shared_ptr.hpp include path + + * plugin/odeimps/odejoint.cpp (JointImp::EnableFeedback): + - removed extra cin/cout commands + 2010-02-28 Marian Buchta <mar...@gm...> * lib/kerosin/fontserver/fontserver.cpp: Modified: trunk/spark/lib/oxygen/monitorserver/monitorserver.cpp =================================================================== --- trunk/spark/lib/oxygen/monitorserver/monitorserver.cpp 2010-03-10 06:24:22 UTC (rev 188) +++ trunk/spark/lib/oxygen/monitorserver/monitorserver.cpp 2010-03-28 08:27:22 UTC (rev 189) @@ -20,6 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <boost/thread/locks.hpp> #include <zeitgeist/logserver/logserver.h> #include <oxygen/simulationserver/simulationserver.h> #include "monitorserver.h" @@ -176,10 +177,12 @@ string MonitorServer::GetMonitorData() { int cycle = mSimulationServer->GetCycle(); + boost::mutex::scoped_lock dataLock(mDataMutex); + if ( cycle == mDataCycle ){ return mData; } - + boost::shared_ptr<MonitorSystem> monitorSystem = GetMonitorSystem(); if (monitorSystem.get() == 0) Modified: trunk/spark/lib/oxygen/monitorserver/monitorserver.h =================================================================== --- trunk/spark/lib/oxygen/monitorserver/monitorserver.h 2010-03-10 06:24:22 UTC (rev 188) +++ trunk/spark/lib/oxygen/monitorserver/monitorserver.h 2010-03-28 08:27:22 UTC (rev 189) @@ -22,6 +22,7 @@ #ifndef OXYGEN_MONITORSERVER_H #define OXYGEN_MONITORSERVER_H +#include <boost/thread/mutex.hpp> #include <oxygen/oxygen_defines.h> #include <zeitgeist/class.h> #include <zeitgeist/node.h> @@ -90,6 +91,9 @@ /** the cycle of cacahed data */ int mDataCycle; + + /** a mutex to protect mData and mDataCycle variables */ + boost::mutex mDataMutex; }; DECLARE_CLASS(MonitorServer); Modified: trunk/spark/lib/oxygen/physicsserver/int/jointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/jointint.h 2010-03-10 06:24:22 UTC (rev 188) +++ trunk/spark/lib/oxygen/physicsserver/int/jointint.h 2010-03-28 08:27:22 UTC (rev 189) @@ -24,7 +24,7 @@ #define OXYGEN_JOINTINT_H #include <oxygen/physicsserver/genericphysicsobjects.h> -#include <boost/smart_ptr/shared_ptr.hpp> +#include <boost/shared_ptr.hpp> #include <salt/vector.h> #include <oxygen/oxygen_defines.h> #include <string> @@ -41,22 +41,22 @@ specified by \param jointID. */ virtual Joint* GetJoint(long jointID) = 0; - - /** Checks if two bodies, specified by \param bodyID1 and + + /** Checks if two bodies, specified by \param bodyID1 and \param bodyID2, are connected by a joint. */ virtual bool AreConnected(long bodyID1, long bodyID2) = 0; - - /** Checks if two bodies, specified by \param bodyID1 and + + /** Checks if two bodies, specified by \param bodyID1 and \param bodyID2, are connected by a joint that is not of the type specified by \param joint_type. */ virtual bool AreConnectedExcluding(long bodyID1, long bodyID2, int joint_type) = 0; - + /** Destroys the Joint specified by \param jointID */ virtual void DestroyJoint(long jointID, boost::shared_ptr<GenericJointFeedback> feedback) = 0; - + /** attaches the joint to some new bodies. If the joint is already attached, it will be detached from the old bodies first. To attach this joint to only one body, set body1 or body2 to @@ -65,21 +65,21 @@ have no effect on the simulation. */ virtual void Attach(long bodyID1, long bodiID2, long jointID) = 0; - + /** returns the type of the managed joint, possible return values from ODE are dJointTypeNone, dJointTypeBall, dJointTypeHinge, dJointTypeSlider, dJointTypeContact, dJointTypeUniversal, dJointTypeHinge2, dJointTypeFixed or dJointTypeAMotor. */ virtual int GetType(long jointID) const = 0; - - /** Returns the ID of one of the bodies the joint specified + + /** Returns the ID of one of the bodies the joint specified by \param jointID is connected to. Since a joint is always connected to two bodies, use \param idx to address the first or second body. */ virtual long GetBodyID(int idx, long jointID) = 0; - + /** during the world time step, the forces that are applied by each joint are added directly to the joined bodies, and the user normally has no way of telling which joint contributed @@ -89,80 +89,80 @@ */ virtual void EnableFeedback(bool enable, long jointID, boost::shared_ptr<GenericJointFeedback> feedback) = 0; - + /** returns true if the joint is set to collect feedback - information + information */ virtual bool FeedbackEnabled(long jointID) const = 0; - + /** queries the force that the joint applied to one body attached to it during the last timestep. */ virtual salt::Vector3f GetFeedbackForce(int idx, boost::shared_ptr<GenericJointFeedback> feedback) const = 0; - + /** queries the torque that the joint applied to one body attached to it during the last timestep. */ virtual salt::Vector3f GetFeedbackTorque(int idx, boost::shared_ptr<GenericJointFeedback> feedback) const = 0; - + /** sets the fudgefactor parameter, making this value too small can prevent the motor from being able to move the joint away from a stop */ virtual void SetFudgeFactor(int idx, float fudge_factor, long jointID) = 0; - + /** returns the fudgefactor paramter */ virtual float GetFudgeFactor(int idx, long jointID) const = 0; - + /** sets the bouncyness of the stops. This is a restitution parameter in the range 0..1. 0 means the stops are not bouncy at all, 1 means maximum bouncyness. */ virtual void SetBounce(int idx, float bounce, long jointID) = 0; - + /** returns the bouncyness of the stops */ virtual float GetBounce(int idx, long jointID) const = 0; - + /** sets the low stop angle in degrees, this stop must be greater than -180 to be effective */ virtual void SetLowStopDeg(int idx, float deg, long jointID) = 0; - + /** returns the low stop angle in degrees */ virtual float GetLowStopDeg(int idx, long jointID) const = 0; - + /** sets the high stop angle in degrees, this stop must be less than +180 to be effective */ virtual void SetHighStopDeg(int idx, float deg, long jointID) = 0; - + /** returns the high stop angle in degrees */ virtual float GetHighStopDeg(int idx, long jointID) const = 0; - + /** sets the low stop position */ virtual void SetLowStopPos(int idx, float deg, long jointID) = 0; - + /** returns the low stop position */ virtual float GetLowStopPos(int idx, long jointID) const = 0; - + /** sets the high stop position */ virtual void SetHighStopPos(int idx, float deg, long jointID) = 0; - + /** returns the high stop position */ virtual float GetHighStopPos(int idx, long jointID) const = 0; - + /** the constraint force mixing (CFM) value used when not at a - stop + stop */ virtual void SetCFM(int idx, float cfm, long jointID) = 0; - + /** returns the constraint force mixing value used when not a a - stop + stop */ virtual float GetCFM(int idx, long jointID) const = 0; - + /** sets the constraint force mixing (CFM) value used by the stops. Together with the ERP value this can be used to get spongy or soft stops. This is intended for unpowered joints, @@ -170,73 +170,73 @@ reaches its limit. */ virtual void SetStopCFM(int idx, float cfm, long jointID) = 0; - + /** returns the constraint force mixing value used by the stops */ virtual float GetStopCFM(int idx, long jointID) const = 0; - + /** sets the error reduction parameter (ERP) used by the stops. */ virtual void SetStopERP(int idx, float erp, long jointID) = 0; - + /** returns the error reduction parameter used by the stops */ virtual float GetStopERP(int idx, long jointID) const = 0; - + /** sets the suspension error reduction parameter (ERP). As of ode 0.039 this is only implemented on the hinge-2 joint. */ virtual void SetSuspensionERP(int idx, float erp, long jointID) = 0; - + /** returns the suspension error reduction parameter (ERP). As of ode 0.039 this is only implemented on the hinge-2 joint. */ virtual float GetSuspensionERP(int idx, long jointID) const = 0; - + /** sets the suspension constraint force mixing value. As of ode 0.039 this is only implemented on the hinge-2 joint. */ virtual void SetSuspensionCFM(int idx, float cfm, long jointID) = 0; - + /** returns the suspension constraint force mixing value. As of ode 0.039 this is only implemented on the hinge-2 joint. */ virtual float GetSuspensionCFM(int idx, long jointID) const = 0; - + /** sets the linear motor velocity */ virtual void SetLinearMotorVelocity(int idx, float vel, long jointID) = 0; - + /** returns the linear motor velocity */ virtual float GetLinearMotorVelocity(int idx, long jointID) const = 0; - + /** sets the angular motor velocity in degrees */ virtual void SetAngularMotorVelocity(int idx, float deg, long jointID) = 0; - + /** returns the angular motor velocity in degrees */ virtual float GetAngularMotorVelocity(int idx, long jointID) const = 0; - + /** sets the maximum force or torque that the motor will use to achieve the desired velocity. This must always be greater than or equal to zero. Setting this to zero (the default value) turns off the motor. */ virtual void SetMaxMotorForce(int idx, float f, long jointID) = 0; - + /** returns the maximum force or torque that the motor will use to achieve the desired velocity. */ virtual float GetMaxMotorForce(int idx, long jointID) const = 0; - + /** Sets the joint parameter indexed by \param parameter of the joint specified by \param jointID to \param value - */ + */ virtual void SetParameter(int parameter, float value, long jointID) = 0; - + /** Returns the joint parameter indexed by \param parameter of the joint specified by \param jointID - */ + */ virtual float GetParameter(int parameter, long jointID) const = 0; - + /** Links the ID of the joint specified by \param jointID to the Joint - object specified by \param joint. Doing this allows us to later - find the Joint object that manages the joint specified + object specified by \param joint. Doing this allows us to later + find the Joint object that manages the joint specified by \param jointID. */ virtual void OnLink(long jointID, Joint* joint) = 0; Modified: trunk/spark/lib/oxygen/physicsserver/int/physicsobjectint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2010-03-10 06:24:22 UTC (rev 188) +++ trunk/spark/lib/oxygen/physicsserver/int/physicsobjectint.h 2010-03-28 08:27:22 UTC (rev 189) @@ -23,7 +23,7 @@ #ifndef OXYGEN_PHYSICSOBJECTINT_H #define OXYGEN_PHYSICSOBJECTINT_H -#include <boost/smart_ptr/shared_ptr.hpp> +#include <boost/shared_ptr.hpp> #include <salt/matrix.h> #include <oxygen/oxygen_defines.h> #include <oxygen/physicsserver/genericphysicsobjects.h> @@ -34,12 +34,12 @@ class OXYGEN_API PhysicsObjectInt { -public: +public: /** converts the rotation part of a salt::Matrix to an engine-specific matrix that arranges the values in a different way */ virtual void ConvertRotationMatrix(const salt::Matrix& rot, GenericPhysicsMatrix& matrix) = 0; - + /** coverts an engine-specific matrix to the rotation part of a salt::Matrix */ virtual void ConvertRotationMatrix(const GenericPhysicsMatrix* matrix, salt::Matrix& rot) const = 0; }; Modified: trunk/spark/lib/oxygen/physicsserver/int/sliderjointint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2010-03-10 06:24:22 UTC (rev 188) +++ trunk/spark/lib/oxygen/physicsserver/int/sliderjointint.h 2010-03-28 08:27:22 UTC (rev 189) @@ -23,7 +23,7 @@ #ifndef OXYGEN_SLIDERJOINTINT_H #define OXYGEN_SLIDERJOINTINT_H -#include <boost/smart_ptr/shared_ptr.hpp> +#include <boost/shared_ptr.hpp> #include <oxygen/oxygen_defines.h> namespace oxygen @@ -35,17 +35,17 @@ public: /** Creates a Slider Joint within the given world */ virtual long CreateSliderJoint(long world) = 0; - + /** returns the slider linear position, i.e. the slider's `extension'. When the axis is set, the current position of the attached bodies is examined and that position will be the zero position. */ virtual float GetPosition(long jointID) = 0; - + /** returns the time derivative of the sliders linear position */ virtual float GetPositionRate(long jointID) = 0; - + /** Sets the direction of the slider joint's axis */ virtual void SetSliderAxis(salt::Vector3f& up, long jointID) = 0; }; Modified: trunk/spark/plugin/odeimps/odejoint.cpp =================================================================== --- trunk/spark/plugin/odeimps/odejoint.cpp 2010-03-10 06:24:22 UTC (rev 188) +++ trunk/spark/plugin/odeimps/odejoint.cpp 2010-03-28 08:27:22 UTC (rev 189) @@ -25,7 +25,7 @@ using namespace std; using namespace salt; -JointImp::JointImp() : PhysicsObjectImp() +JointImp::JointImp() : PhysicsObjectImp() { } @@ -73,11 +73,11 @@ return (long) ODEBodyID; } -void JointImp::EnableFeedback(bool enable, long jointID, +void JointImp::EnableFeedback(bool enable, long jointID, boost::shared_ptr<GenericJointFeedback> feedback) { dJointID JointImp = (dJointID) jointID; - + if (enable) { if (feedback.get() == 0) @@ -94,8 +94,6 @@ } } - cout << "bla"; - std::cin; dJointFeedback* ODEFeedback = (dJointFeedback*) feedback.get(); dJointSetFeedback(JointImp,ODEFeedback); @@ -107,7 +105,7 @@ return (dJointGetFeedback(JointImp) != 0); } -Vector3f JointImp::GetFeedbackForce(int idx, +Vector3f JointImp::GetFeedbackForce(int idx, boost::shared_ptr<GenericJointFeedback> feedback) const { dJointFeedback* fb = (dJointFeedback*) feedback.get(); @@ -166,7 +164,7 @@ return Vector3f(0,0,0); } } - + void JointImp::SetFudgeFactor(int idx, float fudge_factor, long jointID) { SetParameter(dParamFudgeFactor + (idx * dParamGroup), fudge_factor, jointID); @@ -307,7 +305,7 @@ return GetParameter(dParamFMax + (idx * dParamGroup), jointID); } -void JointImp::DestroyJoint(long jointID, +void JointImp::DestroyJoint(long jointID, boost::shared_ptr<GenericJointFeedback> feedback) { dJointID JointImp = (dJointID) jointID; @@ -328,7 +326,7 @@ case dJointTypeUniversal: dJointSetUniversalParam(JointImp, parameter, value); break; case dJointTypeAMotor: dJointSetAMotorParam(JointImp, parameter, value); - break; + break; default: return; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <he...@us...> - 2010-05-09 17:45:39
|
Revision: 196 http://simspark.svn.sourceforge.net/simspark/?rev=196&view=rev Author: hedayat Date: 2010-05-09 17:45:33 +0000 (Sun, 09 May 2010) Log Message: ----------- Fixed a bug in num to pointer conversion in 64bit systems Modified Paths: -------------- trunk/spark/ChangeLog trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp Modified: trunk/spark/ChangeLog =================================================================== --- trunk/spark/ChangeLog 2010-05-07 18:57:03 UTC (rev 195) +++ trunk/spark/ChangeLog 2010-05-09 17:45:33 UTC (rev 196) @@ -1,3 +1,8 @@ +2010-05-09 Hedayat Vatankhah <he...@gr...> + + * lib/zeitgeist/scriptserver/scriptserver.cpp (thisCall): + - Fixed a bug in number to pointer conversion in 64bit systems + 2010-03-28 Hedayat Vatankhah <he...@gr...> * lib/oxygen/monitorserver/monitorserver.h (MonitorServer): Modified: trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp =================================================================== --- trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2010-05-07 18:57:03 UTC (rev 195) +++ trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp 2010-05-09 17:45:33 UTC (rev 196) @@ -147,7 +147,7 @@ ParameterList in; getParameterList(args, in); - Object *obj = (Object*)NUM2INT(objPointer); + Object *obj = (Object*)NUM2ULONG(objPointer); Class::TCmdProc cmd = obj->GetClass()->GetCmdProc(STR2CSTR(functionName)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <a-...@us...> - 2009-11-17 11:29:38
|
Revision: 99 http://simspark.svn.sourceforge.net/simspark/?rev=99&view=rev Author: a-held Date: 2009-11-17 11:29:29 +0000 (Tue, 17 Nov 2009) Log Message: ----------- Reverted changes in last revision added abstract layer on World via bridge pattern refactored CappedCylinder to Capsule moved ODE-specific classes to a new ODE folder moved implementation classes to a new imp folder Modified Paths: -------------- trunk/spark/lib/oxygen/CMakeLists.txt trunk/spark/lib/oxygen/oxygen.cpp trunk/spark/lib/oxygen/oxygen.h trunk/spark/lib/oxygen/physicsserver/body.cpp trunk/spark/lib/oxygen/physicsserver/body.h trunk/spark/lib/oxygen/physicsserver/boxcollider.h trunk/spark/lib/oxygen/physicsserver/collider.h trunk/spark/lib/oxygen/physicsserver/collisionhandler.h trunk/spark/lib/oxygen/physicsserver/joint.h trunk/spark/lib/oxygen/physicsserver/physicsserver.h trunk/spark/lib/oxygen/physicsserver/space.h trunk/spark/lib/oxygen/physicsserver/world.cpp trunk/spark/lib/oxygen/physicsserver/world.h trunk/spark/lib/oxygen/physicsserver/world_c.cpp trunk/spark/plugin/collisionperceptor/forceresistanceperceptor.cpp trunk/spark/plugin/collisionperceptor/forceresistanceperceptor.h Added Paths: ----------- trunk/spark/lib/oxygen/physicsserver/imp/ trunk/spark/lib/oxygen/physicsserver/imp/worldimp.h trunk/spark/lib/oxygen/physicsserver/imp/worldimp_c.cpp trunk/spark/lib/oxygen/physicsserver/ode/ trunk/spark/lib/oxygen/physicsserver/ode/odeobject.cpp trunk/spark/lib/oxygen/physicsserver/ode/odeobject.h trunk/spark/lib/oxygen/physicsserver/ode/odeobject_c.cpp trunk/spark/lib/oxygen/physicsserver/ode/odeworld.cpp trunk/spark/lib/oxygen/physicsserver/ode/odeworld.h trunk/spark/lib/oxygen/physicsserver/ode/odeworld_c.cpp trunk/spark/lib/oxygen/physicsserver/ode/odewrapper.h Removed Paths: ------------- trunk/spark/lib/oxygen/physicsserver/odeobject.cpp trunk/spark/lib/oxygen/physicsserver/odeobject.h trunk/spark/lib/oxygen/physicsserver/odeobject_c.cpp trunk/spark/lib/oxygen/physicsserver/odewrapper.h Modified: trunk/spark/lib/oxygen/CMakeLists.txt =================================================================== --- trunk/spark/lib/oxygen/CMakeLists.txt 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/CMakeLists.txt 2009-11-17 11:29:29 UTC (rev 99) @@ -21,8 +21,6 @@ physicsserver/collider.h physicsserver/collisionhandler.h physicsserver/contactjointhandler.h - physicsserver/odeobject.h - physicsserver/odewrapper.h physicsserver/physicsserver.h physicsserver/planecollider.h physicsserver/raycollider.h @@ -41,6 +39,15 @@ physicsserver/universaljoint.h physicsserver/hinge2joint.h physicsserver/angularmotor.h + + #interfaces + physicsserver/imp/worldimp.h + + #ode-specific files + physicsserver/ode/odeobject.h + physicsserver/ode/odeworld.h + physicsserver/ode/odewrapper.h + sceneserver/sceneimporter.h sceneserver/basenode.h sceneserver/fpscontroller.h @@ -116,8 +123,6 @@ physicsserver/collisionhandler_c.cpp physicsserver/contactjointhandler.cpp physicsserver/contactjointhandler_c.cpp - physicsserver/odeobject.cpp - physicsserver/odeobject_c.cpp physicsserver/physicsserver.cpp physicsserver/physicsserver_c.cpp physicsserver/planecollider.cpp @@ -152,6 +157,16 @@ physicsserver/hinge2joint_c.cpp physicsserver/angularmotor.cpp physicsserver/angularmotor_c.cpp + + #interfaces + physicsserver/imp/worldimp_c.cpp + + #ODE-specific files + physicsserver/ode/odeworld.cpp + physicsserver/ode/odeworld_c.cpp + physicsserver/ode/odeobject.cpp + physicsserver/ode/odeobject_c.cpp + sceneserver/basenode.cpp sceneserver/basenode_c.cpp sceneserver/fpscontroller.cpp Modified: trunk/spark/lib/oxygen/oxygen.cpp =================================================================== --- trunk/spark/lib/oxygen/oxygen.cpp 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/oxygen.cpp 2009-11-17 11:29:29 UTC (rev 99) @@ -57,9 +57,9 @@ zg.GetCore()->RegisterClassObject(new CLASS(BodyController), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(DragController), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(VelocityController), "oxygen/"); - zg.GetCore()->RegisterClassObject(new CLASS(ODEObject), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(Space), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(World), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(WorldImp), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(Joint), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(BallJoint), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(HingeJoint), "oxygen/"); @@ -86,6 +86,11 @@ zg.GetCore()->RegisterClassObject(new CLASS(AgentAspect), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(Effector), "oxygen/"); zg.GetCore()->RegisterClassObject(new CLASS(Perceptor), "oxygen/"); + + //ODE-specific classes + zg.GetCore()->RegisterClassObject(new CLASS(ODEObject), "oxygen/"); + zg.GetCore()->RegisterClassObject(new CLASS(ODEWorld), "oxygen/"); + #ifdef HAVE_SPADES_HEADERS // spades Modified: trunk/spark/lib/oxygen/oxygen.h =================================================================== --- trunk/spark/lib/oxygen/oxygen.h 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/oxygen.h 2009-11-17 11:29:29 UTC (rev 99) @@ -34,6 +34,7 @@ #include "gamecontrolserver/actionobject.h" #include "gamecontrolserver/behavior.h" +//abstract physics classes #include "physicsserver/body.h" #include "physicsserver/bodycontroller.h" #include "physicsserver/dragcontroller.h" @@ -42,7 +43,6 @@ #include "physicsserver/boxcollider.h" #include "physicsserver/ccylindercollider.h" #include "physicsserver/collider.h" -#include "physicsserver/odeobject.h" #include "physicsserver/physicsserver.h" #include "physicsserver/planecollider.h" #include "physicsserver/raycollider.h" @@ -60,6 +60,13 @@ #include "physicsserver/universaljoint.h" #include "physicsserver/hinge2joint.h" +//physics interfaces +#include "physicsserver/imp/worldimp.h" + +//ode-specific includes +#include <oxygen/physicsserver/ode/odeobject.h> +#include <oxygen/physicsserver/ode/odeworld.h> + #include "sceneserver/basenode.h" #include "sceneserver/camera.h" #include "sceneserver/fpscontroller.h" Modified: trunk/spark/lib/oxygen/physicsserver/body.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/body.cpp 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/body.cpp 2009-11-17 11:29:29 UTC (rev 99) @@ -339,7 +339,7 @@ // direction: (1=x, 2=y, 3=z) int direction = 3; - dMassSetCappedCylinder (&mass, density, direction, radius, length); + dMassSetCapsule (&mass, density, direction, radius, length); } void Body::SetCappedCylinder (float density, float radius, float length) @@ -361,7 +361,7 @@ // direction: (1=x, 2=y, 3=z) int direction = 3; - dMassSetCappedCylinderTotal(&mass, total_mass, direction, radius, length); + dMassSetCapsuleTotal(&mass, total_mass, direction, radius, length); } void Body::SetCappedCylinderTotal(float total_mass, float radius, float length) Modified: trunk/spark/lib/oxygen/physicsserver/body.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/body.h 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/body.h 2009-11-17 11:29:29 UTC (rev 99) @@ -23,7 +23,7 @@ #define OXYGEN_BODY_H #include <oxygen/oxygen_defines.h> -#include "odeobject.h" +#include <oxygen/physicsserver/ode/odeobject.h> namespace oxygen { Modified: trunk/spark/lib/oxygen/physicsserver/boxcollider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/boxcollider.h 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/boxcollider.h 2009-11-17 11:29:29 UTC (rev 99) @@ -23,7 +23,7 @@ #define OXYGEN_BOXCOLLIDER_H #include <oxygen/oxygen_defines.h> -#include "collider.h" +#include <oxygen/physicsserver/collider.h> namespace oxygen { Modified: trunk/spark/lib/oxygen/physicsserver/collider.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/collider.h 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/collider.h 2009-11-17 11:29:29 UTC (rev 99) @@ -22,7 +22,7 @@ #ifndef OXYGEN_COLLIDER_H #define OXYGEN_COLLIDER_H -#include "odeobject.h" +#include <oxygen/physicsserver/ode/odeobject.h> #include <string> #include <set> #include <oxygen/oxygen_defines.h> Modified: trunk/spark/lib/oxygen/physicsserver/collisionhandler.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/collisionhandler.h 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/collisionhandler.h 2009-11-17 11:29:29 UTC (rev 99) @@ -24,7 +24,7 @@ #include <oxygen/sceneserver/basenode.h> #include <oxygen/oxygen_defines.h> -#include "odewrapper.h" +#include <oxygen/physicsserver/ode/odewrapper.h> namespace oxygen { Added: trunk/spark/lib/oxygen/physicsserver/imp/worldimp.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/imp/worldimp.h (rev 0) +++ trunk/spark/lib/oxygen/physicsserver/imp/worldimp.h 2009-11-17 11:29:29 UTC (rev 99) @@ -0,0 +1,116 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: world.h 56 2009-03-17 18:03:47Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_WORLDIMP_H +#define OXYGEN_WORLDIMP_H + +#include <oxygen/oxygen_defines.h> +#include <oxygen/physicsserver/ode/odeobject.h> + +namespace oxygen +{ + +/** World encapsulates an ODE world object. It is a container for + rigid bodies and joints. Objects in different worlds can not + interact, for example rigid bodies from two different worlds can + not collide. All the objects in a world exist at the same point in + time, thus one reason to use separate worlds is to simulate + systems at different rates. +*/ +class OXYGEN_API WorldImp : public ODEObject +{ + // + // Functions + // +public: + WorldImp() : ODEObject(){}; + virtual ~WorldImp(){}; + + /** returns the ID of the managed ODE world */ + virtual dWorldID GetODEWorldImp() const = 0; + + /** sets the gravity vector of this vorld */ + virtual void SetGravityImp(const salt::Vector3f& gravity) = 0; + + /** gets the gravity vector of this world */ + virtual salt::Vector3f GetGravityImp() const = 0; + + /** sets the Error Reduction Parameter of this world. The ERP + specifies what proportion of a joint error will be fixed + during the next simulation step. if ERP=0 then no correcting + force is applied and the bodies will eventually drift apart as + the simulation proceeds. If ERP=1 then the simulation will + attempt to fix all joint error during the next time + step. However, setting ERP=1 is not recommended, as the joint + error will not be completely fixed due to various internal + approximations. A value of ERP=0.1 to 0.8 is recommended (0.2 + is the default). + */ + virtual void SetERPImp(float erp) = 0; + + /** returns the Error Reduction Parameter of this World. + */ + virtual float GetERPImp() const = 0; + + /** sets the Constraint Force mixing (CFM) value. If CFM is set to + zero, the constraint will be hard. If CFM is set to a positive + value, it will be possible to violate the constraint by + `pushing on it' (for example, for contact constraints by + forcing the two contacting objects together). In other words + the constraint will be soft, and the softness will increase as + CFM increases. Note that setting CFM to a negative value can + have undesirable bad effects, such as instability. + */ + virtual void SetCFMImp(float cfm) = 0; + + /** returns the Constraint Force mixing (CFM) value. */ + virtual float GetCFMImp() const = 0; + + /** steps the world deltatime forward, i.e. performs physics + simulation for a deltaTime seconds interval. + */ + virtual void StepImp(float deltaTime) = 0; + + virtual bool GetAutoDisableFlagImp() const = 0; + virtual void SetAutoDisableFlagImp(bool flag) = 0; + + /** Set and get the depth of the surface layer around all geometry + objects. Contacts are allowed to sink into the surface layer up to + the given depth before coming to rest. The default value is + zero. Increasing this to some small value (e.g. 0.001) can help + prevent jittering problems due to contacts being repeatedly made + and broken. + */ + virtual void SetContactSurfaceLayerImp(float depth) = 0; + virtual float GetContactSurfaceLayerImp() const = 0; + + /** destroy the managed ODE object */ + virtual void DestroyODEObjectImp() = 0; + + /** creates them managed ODE world */ + virtual bool ConstructInternalImp() = 0; +}; + +DECLARE_ABSTRACTCLASS(WorldImp); + +} + +#endif //OXYGEN_WORLDIMP_H Added: trunk/spark/lib/oxygen/physicsserver/imp/worldimp_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/imp/worldimp_c.cpp (rev 0) +++ trunk/spark/lib/oxygen/physicsserver/imp/worldimp_c.cpp 2009-11-17 11:29:29 UTC (rev 99) @@ -0,0 +1,29 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + +this file is part of rcssserver3D +Fri May 9 2003 +Copyright (C) 2003 Koblenz University +$Id: world_c.cpp 3 2008-11-21 02:38:08Z hedayat $ + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/imp/worldimp.h> + +using namespace oxygen; + +void CLASS(WorldImp)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/ODEObject); +} Modified: trunk/spark/lib/oxygen/physicsserver/joint.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/joint.h 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/joint.h 2009-11-17 11:29:29 UTC (rev 99) @@ -23,7 +23,7 @@ #define OXYGEN_JOINT_H #include <oxygen/oxygen_defines.h> -#include "odeobject.h" +#include <oxygen/physicsserver/ode/odeobject.h> namespace oxygen { Added: trunk/spark/lib/oxygen/physicsserver/ode/odeobject.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/ode/odeobject.cpp (rev 0) +++ trunk/spark/lib/oxygen/physicsserver/ode/odeobject.cpp 2009-11-17 11:29:29 UTC (rev 99) @@ -0,0 +1,167 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#include <oxygen/physicsserver/ode/odeobject.h> +#include <oxygen/physicsserver/space.h> +#include <oxygen/physicsserver/world.h> +#include <oxygen/sceneserver/scene.h> +#include <zeitgeist/logserver/logserver.h> + +using namespace oxygen; +using namespace boost; + +ODEObject::ODEObject() : BaseNode() +{ +} + +ODEObject::~ODEObject() +{ +} + +void ODEObject::OnUnlink() +{ + DestroyODEObject(); +} + +/** returns the world node */ +shared_ptr<World> ODEObject::GetWorld() +{ + shared_ptr<Scene> scene = GetScene(); + if (scene.get() == 0) + { + GetLog()->Error() << "(ODEObject) ERROR: found no Scene node\n"; + return shared_ptr<World>(); + } + + shared_ptr<World> worldNode = shared_dynamic_cast<World> + (scene->GetChildOfClass("World")); + if (worldNode.get() == 0) + { + GetLog()->Error() << "(ODEObject) ERROR: found no World node\n"; + } + + return worldNode; +} + +shared_ptr<Space> ODEObject::GetSpace() +{ + // try to find the nearest parent space object + weak_ptr<Space> parentSpace = FindParentSupportingClass<Space>(); + if (! parentSpace.expired()) + { + return parentSpace.lock(); + } + + // return the global space instance + shared_ptr<Scene> scene = GetScene(); + if (scene.get() == 0) + { + GetLog()->Error() << "(ODEObject) ERROR: found no Scene node\n"; + return shared_ptr<Space>(); + } + + shared_ptr<Space> spaceNode = shared_dynamic_cast<Space> + (scene->GetChildOfClass("Space")); + if (spaceNode.get() == 0) + { + GetLog()->Error() << "(ODEObject) ERROR: found no Space node\n"; + } + + return spaceNode; +} + +dWorldID ODEObject::GetWorldID() +{ + shared_ptr<World> world = GetWorld(); + if (world.get() == 0) + { + return 0; + } + + dWorldID worldId = world->GetODEWorld(); + if (worldId == 0) + { + GetLog()->Error() + << "(ODEObject) ERROR: World returned empty ODE handle\n"; + } + + return worldId; +} + +dSpaceID ODEObject::FindSpaceID() +{ + shared_ptr<Space> space = GetSpace(); + if (space.get() == 0) + { + return 0; + } + + dSpaceID spaceId = space->GetODESpace(); + + if (spaceId == 0) + { + GetLog()->Error() + << "(ODEObject) ERROR: Space returned empty ODE handle\n"; + } + + return spaceId; +} + +dSpaceID ODEObject::GetParentSpaceID() +{ + return 0; +} + +void ODEObject::ConvertRotationMatrix(const salt::Matrix& rot, dMatrix3& matrix) +{ + matrix[0] = rot.m[0]; + matrix[1] = rot.m[4]; + matrix[2] = rot.m[8]; + matrix[3] = 0; + matrix[4] = rot.m[1]; + matrix[5] = rot.m[5]; + matrix[6] = rot.m[9]; + matrix[7] = 0; + matrix[8] = rot.m[2]; + matrix[9] = rot.m[6]; + matrix[10] = rot.m[10]; + matrix[11] = 0; +} + +void ODEObject::ConvertRotationMatrix(const dReal* matrix, salt::Matrix& rot) const +{ + rot.m[0] = matrix[0] ; + rot.m[4] = matrix[1] ; + rot.m[8] = matrix[2]; + rot.m[12] = matrix[3]; + rot.m[1] = matrix[4]; + rot.m[5] = matrix[5]; + rot.m[9] = matrix[6]; + rot.m[13] = matrix[7]; + rot.m[2] = matrix[8]; + rot.m[6] = matrix[9]; + rot.m[10] = matrix[10] ; + rot.m[14] = matrix[11]; + rot.m[3] = 0.0; + rot.m[7] = 0.0; + rot.m[11] = 0.0; + rot.m[15] = 1.0; +} Added: trunk/spark/lib/oxygen/physicsserver/ode/odeobject.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/ode/odeobject.h (rev 0) +++ trunk/spark/lib/oxygen/physicsserver/ode/odeobject.h 2009-11-17 11:29:29 UTC (rev 99) @@ -0,0 +1,83 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odeobject.h 56 2009-03-17 18:03:47Z hedayat $ + $Id: odeobject.h 56 2009-03-17 18:03:47Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_ODEOBJECT_H +#define OXYGEN_ODEOBJECT_H + +#include <oxygen/oxygen_defines.h> +#include <oxygen/sceneserver/basenode.h> +#include <oxygen/physicsserver/ode/odewrapper.h> + +namespace oxygen +{ +class Space; +class World; + +/** ODEObject is the base of all classes encapsulating ODE concepts + */ +class OXYGEN_API ODEObject : public BaseNode +{ +public: + // + // Functions + // + ODEObject(); + virtual ~ODEObject(); + + /** This rountine is called, before the hierarchy object is + removed from the parent. It can be overridden to support + custom 'unlink' behavior. + */ + virtual void OnUnlink(); + + /** returns the ODE world handle */ + dWorldID GetWorldID(); + + /** returns the nearest parent space ODE handle */ + dSpaceID FindSpaceID(); + + /** returns the ODE handle ID of the containing parent space */ + virtual dSpaceID GetParentSpaceID(); + + /** destroy the managed ODE object */ + virtual void DestroyODEObject(){}; + +protected: + /** returns the world node */ + boost::shared_ptr<World> GetWorld(); + + /** finds the nearest parent space node */ + boost::shared_ptr<Space> GetSpace(); + + /** converts the rotation part of a salt::Matrix to an ODE + dMatrix3 */ + void ConvertRotationMatrix(const salt::Matrix& rot, dMatrix3& matrix); + + /** coverts the ODE dMatrix3 to the rotation part of a salt::Matrix */ + void ConvertRotationMatrix(const dReal* matrix, salt::Matrix& rot) const; +}; + +DECLARE_ABSTRACTCLASS(ODEObject); + +} //namespace oxygen + +#endif //OXYGEN_ODEOBJECT_H Added: trunk/spark/lib/oxygen/physicsserver/ode/odeobject_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/ode/odeobject_c.cpp (rev 0) +++ trunk/spark/lib/oxygen/physicsserver/ode/odeobject_c.cpp 2009-11-17 11:29:29 UTC (rev 99) @@ -0,0 +1,29 @@ +/* -*- mode: c++ -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id: odeobject_c.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/ode/odeobject.h> + +using namespace oxygen; + +void CLASS(ODEObject)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/BaseNode); +} Added: trunk/spark/lib/oxygen/physicsserver/ode/odeworld.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/ode/odeworld.cpp (rev 0) +++ trunk/spark/lib/oxygen/physicsserver/ode/odeworld.cpp 2009-11-17 11:29:29 UTC (rev 99) @@ -0,0 +1,138 @@ +/* -*- mode: c++ -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2003 Koblenz University + $Id: world.cpp 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/ode/odeworld.h> +#include <oxygen/physicsserver/space.h> +#include <oxygen/sceneserver/scene.h> + +using namespace boost; +using namespace oxygen; +using namespace salt; + +ODEWorld::ODEWorld() : WorldImp(), mODEWorld(0) +{ +} + +ODEWorld::~ODEWorld() +{ +} + +dWorldID ODEWorld::GetODEWorldImp() const +{ + return mODEWorld; +} + +void ODEWorld::SetGravityImp(const Vector3f& gravity) +{ + dWorldSetGravity(mODEWorld, + gravity.x(), + gravity.y(), + gravity.z() + ); +} + +salt::Vector3f ODEWorld::GetGravityImp() const +{ + dVector3 dGravity; + dWorldGetGravity(mODEWorld,dGravity); + return Vector3f(dGravity[0],dGravity[1],dGravity[2]); +} + +void ODEWorld::SetERPImp(float erp) +{ + dWorldSetERP(mODEWorld, erp); +} + +float ODEWorld::GetERPImp() const +{ + return dWorldGetERP(mODEWorld); +} + +void ODEWorld::SetCFMImp(float cfm) +{ + dWorldSetCFM(mODEWorld, cfm); +} + +float ODEWorld::GetCFMImp() const +{ + return dWorldGetCFM(mODEWorld); +} + +void ODEWorld::StepImp(float deltaTime) +{ + dWorldStep(mODEWorld, deltaTime); +} + +bool ODEWorld::GetAutoDisableFlagImp() const +{ + return (dWorldGetAutoDisableFlag(mODEWorld) == 1); +} + +void ODEWorld::SetAutoDisableFlagImp(bool flag) +{ + dWorldSetAutoDisableFlag(mODEWorld, static_cast<int>(flag)); +} + +void ODEWorld::SetContactSurfaceLayerImp(float depth) +{ + dWorldSetContactSurfaceLayer(mODEWorld, depth); +} + +float ODEWorld::GetContactSurfaceLayerImp() const +{ + return dWorldGetContactSurfaceLayer(mODEWorld); +} + +bool ODEWorld::ConstructInternalImp() +{ + // create an ode world + mODEWorld = dWorldCreate(); + + return (mODEWorld != 0); +} + +void ODEWorld::DestroyODEObjectImp() +{ + static bool recurseLock = false; + if (recurseLock) + { + return; + } + + recurseLock = true; + + shared_ptr<Space> space = GetSpace(); + if (space.get() != 0) + { + space->DestroyODEObject(); + } + + if (mODEWorld == 0) + { + return; + } + + // release the ODE world + dWorldDestroy(mODEWorld); + mODEWorld = 0; + + recurseLock = false; +} Added: trunk/spark/lib/oxygen/physicsserver/ode/odeworld.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/ode/odeworld.h (rev 0) +++ trunk/spark/lib/oxygen/physicsserver/ode/odeworld.h 2009-11-17 11:29:29 UTC (rev 99) @@ -0,0 +1,124 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: world.h 56 2009-03-17 18:03:47Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_ODEWORLD_H +#define OXYGEN_ODEWORLD_H + +#include <oxygen/oxygen_defines.h> +#include <oxygen/physicsserver/imp/worldimp.h> + +namespace oxygen +{ + +/** World encapsulates an ODE world object. It is a container for + rigid bodies and joints. Objects in different worlds can not + interact, for example rigid bodies from two different worlds can + not collide. All the objects in a world exist at the same point in + time, thus one reason to use separate worlds is to simulate + systems at different rates. +*/ +class OXYGEN_API ODEWorld : public WorldImp +{ + // + // Functions + // +public: + ODEWorld(); + virtual ~ODEWorld(); + + /** returns the ID of the managed ODE world */ + dWorldID GetODEWorldImp() const; + + /** sets the gravity vector of this vorld */ + void SetGravityImp(const salt::Vector3f& gravity); + + /** gets the gravity vector of this world */ + salt::Vector3f GetGravityImp() const; + + /** sets the Error Reduction Parameter of this world. The ERP + specifies what proportion of a joint error will be fixed + during the next simulation step. if ERP=0 then no correcting + force is applied and the bodies will eventually drift apart as + the simulation proceeds. If ERP=1 then the simulation will + attempt to fix all joint error during the next time + step. However, setting ERP=1 is not recommended, as the joint + error will not be completely fixed due to various internal + approximations. A value of ERP=0.1 to 0.8 is recommended (0.2 + is the default). + */ + void SetERPImp(float erp); + + /** returns the Error Reduction Parameter of this World. + */ + float GetERPImp() const; + + /** sets the Constraint Force mixing (CFM) value. If CFM is set to + zero, the constraint will be hard. If CFM is set to a positive + value, it will be possible to violate the constraint by + `pushing on it' (for example, for contact constraints by + forcing the two contacting objects together). In other words + the constraint will be soft, and the softness will increase as + CFM increases. Note that setting CFM to a negative value can + have undesirable bad effects, such as instability. + */ + void SetCFMImp(float cfm); + + /** returns the Constraint Force mixing (CFM) value. */ + float GetCFMImp() const; + + /** steps the world deltatime forward, i.e. performs physics + simulation for a deltaTime seconds interval. + */ + void StepImp(float deltaTime); + + bool GetAutoDisableFlagImp() const; + void SetAutoDisableFlagImp(bool flag); + + /** Set and get the depth of the surface layer around all geometry + objects. Contacts are allowed to sink into the surface layer up to + the given depth before coming to rest. The default value is + zero. Increasing this to some small value (e.g. 0.001) can help + prevent jittering problems due to contacts being repeatedly made + and broken. + */ + void SetContactSurfaceLayerImp(float depth); + float GetContactSurfaceLayerImp() const; + + /** destroy the managed ODE object */ + virtual void DestroyODEObjectImp(); + +protected: + /** creates them managed ODE world */ + virtual bool ConstructInternalImp(); + + // + // Members + // +private: + /** the dynamics world represented by this object */ + dWorldID mODEWorld; +}; + +DECLARE_CLASS(ODEWorld); + +}; + +#endif //OXYGEN_WORLD_H Added: trunk/spark/lib/oxygen/physicsserver/ode/odeworld_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/ode/odeworld_c.cpp (rev 0) +++ trunk/spark/lib/oxygen/physicsserver/ode/odeworld_c.cpp 2009-11-17 11:29:29 UTC (rev 99) @@ -0,0 +1,29 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + +this file is part of rcssserver3D +Fri May 9 2003 +Copyright (C) 2003 Koblenz University +$Id: world_c.cpp 3 2008-11-21 02:38:08Z hedayat $ + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <oxygen/physicsserver/ode/odeworld.h> + +using namespace oxygen; + +void CLASS(ODEWorld)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/WorldImp); +} Added: trunk/spark/lib/oxygen/physicsserver/ode/odewrapper.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/ode/odewrapper.h (rev 0) +++ trunk/spark/lib/oxygen/physicsserver/ode/odewrapper.h 2009-11-17 11:29:29 UTC (rev 99) @@ -0,0 +1,80 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Fri May 9 2003 + Copyright (C) 2002,2003 Koblenz University + Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group + $Id: odewrapper.h 3 2008-11-21 02:38:08Z hedayat $ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ +#ifndef OXYGEN_ODEWRAPPER_H +#define OXYGEN_ODEWRAPPER_H + +#undef EXTERN +#undef HAVE_VPRINTF +#undef PACKAGE +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION +#undef PREFIX +#undef VERSION + +#ifdef WIN32 + +#ifdef copysignf +#undef copysignf +#endif + +#ifdef copysign +#undef copysign +#endif + +#endif // WIN32 + +#ifdef __APPLE__ + +// there is a conflicting type in a system header (Leopard) +// so we define a dummy here +#define uint32 dummy + +#endif + +#include <ode/ode.h> + +#ifdef __APPLE__ + +// undefine the dummy +#undef uint32 + +#endif + +#undef EXTERN +#undef HAVE_VPRINTF +#undef PACKAGE +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION +#undef PREFIX +#undef VERSION + +#ifdef HAVE_CONFIG_H +#include <sparkconfig.h> +#endif + +#endif // OXYGEN_ODEWRAPPER Deleted: trunk/spark/lib/oxygen/physicsserver/odeobject.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/odeobject.cpp 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/odeobject.cpp 2009-11-17 11:29:29 UTC (rev 99) @@ -1,167 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - - this file is part of rcssserver3D - Fri May 9 2003 - Copyright (C) 2002,2003 Koblenz University - Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id$ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ -#include "odeobject.h" -#include "space.h" -#include "world.h" -#include <oxygen/sceneserver/scene.h> -#include <zeitgeist/logserver/logserver.h> - -using namespace oxygen; -using namespace boost; - -ODEObject::ODEObject() : BaseNode() -{ -} - -ODEObject::~ODEObject() -{ -} - -void ODEObject::OnUnlink() -{ - DestroyODEObject(); -} - -/** returns the world node */ -shared_ptr<World> ODEObject::GetWorld() -{ - shared_ptr<Scene> scene = GetScene(); - if (scene.get() == 0) - { - GetLog()->Error() << "(ODEObject) ERROR: found no Scene node\n"; - return shared_ptr<World>(); - } - - shared_ptr<World> worldNode = shared_dynamic_cast<World> - (scene->GetChildOfClass("World")); - if (worldNode.get() == 0) - { - GetLog()->Error() << "(ODEObject) ERROR: found no World node\n"; - } - - return worldNode; -} - -shared_ptr<Space> ODEObject::GetSpace() -{ - // try to find the nearest parent space object - weak_ptr<Space> parentSpace = FindParentSupportingClass<Space>(); - if (! parentSpace.expired()) - { - return parentSpace.lock(); - } - - // return the global space instance - shared_ptr<Scene> scene = GetScene(); - if (scene.get() == 0) - { - GetLog()->Error() << "(ODEObject) ERROR: found no Scene node\n"; - return shared_ptr<Space>(); - } - - shared_ptr<Space> spaceNode = shared_dynamic_cast<Space> - (scene->GetChildOfClass("Space")); - if (spaceNode.get() == 0) - { - GetLog()->Error() << "(ODEObject) ERROR: found no Space node\n"; - } - - return spaceNode; -} - -dWorldID ODEObject::GetWorldID() -{ - shared_ptr<World> world = GetWorld(); - if (world.get() == 0) - { - return 0; - } - - dWorldID worldId = world->GetODEWorld(); - if (worldId == 0) - { - GetLog()->Error() - << "(ODEObject) ERROR: World returned empty ODE handle\n"; - } - - return worldId; -} - -dSpaceID ODEObject::FindSpaceID() -{ - shared_ptr<Space> space = GetSpace(); - if (space.get() == 0) - { - return 0; - } - - dSpaceID spaceId = space->GetODESpace(); - - if (spaceId == 0) - { - GetLog()->Error() - << "(ODEObject) ERROR: Space returned empty ODE handle\n"; - } - - return spaceId; -} - -dSpaceID ODEObject::GetParentSpaceID() -{ - return 0; -} - -void ODEObject::ConvertRotationMatrix(const salt::Matrix& rot, dMatrix3& matrix) -{ - matrix[0] = rot.m[0]; - matrix[1] = rot.m[4]; - matrix[2] = rot.m[8]; - matrix[3] = 0; - matrix[4] = rot.m[1]; - matrix[5] = rot.m[5]; - matrix[6] = rot.m[9]; - matrix[7] = 0; - matrix[8] = rot.m[2]; - matrix[9] = rot.m[6]; - matrix[10] = rot.m[10]; - matrix[11] = 0; -} - -void ODEObject::ConvertRotationMatrix(const dReal* matrix, salt::Matrix& rot) const -{ - rot.m[0] = matrix[0] ; - rot.m[4] = matrix[1] ; - rot.m[8] = matrix[2]; - rot.m[12] = matrix[3]; - rot.m[1] = matrix[4]; - rot.m[5] = matrix[5]; - rot.m[9] = matrix[6]; - rot.m[13] = matrix[7]; - rot.m[2] = matrix[8]; - rot.m[6] = matrix[9]; - rot.m[10] = matrix[10] ; - rot.m[14] = matrix[11]; - rot.m[3] = 0.0; - rot.m[7] = 0.0; - rot.m[11] = 0.0; - rot.m[15] = 1.0; -} Deleted: trunk/spark/lib/oxygen/physicsserver/odeobject.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/odeobject.h 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/odeobject.h 2009-11-17 11:29:29 UTC (rev 99) @@ -1,83 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - - this file is part of rcssserver3D - Fri May 9 2003 - Copyright (C) 2002,2003 Koblenz University - Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id$ - $Id$ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ -#ifndef OXYGEN_ODEOBJECT_H -#define OXYGEN_ODEOBJECT_H - -#include <oxygen/oxygen_defines.h> -#include <oxygen/sceneserver/basenode.h> -#include "odewrapper.h" - -namespace oxygen -{ -class Space; -class World; - -/** ODEObject is the base of all classes encapsulating ODE concepts - */ -class OXYGEN_API ODEObject : public BaseNode -{ -public: - // - // Functions - // - ODEObject(); - virtual ~ODEObject(); - - /** This rountine is called, before the hierarchy object is - removed from the parent. It can be overridden to support - custom 'unlink' behavior. - */ - virtual void OnUnlink(); - - /** returns the ODE world handle */ - dWorldID GetWorldID(); - - /** returns the nearest parent space ODE handle */ - dSpaceID FindSpaceID(); - - /** returns the ODE handle ID of the containing parent space */ - virtual dSpaceID GetParentSpaceID(); - - /** destroy the managed ODE object */ - virtual void DestroyODEObject() = 0; - -protected: - /** returns the world node */ - boost::shared_ptr<World> GetWorld(); - - /** finds the nearest parent space node */ - boost::shared_ptr<Space> GetSpace(); - - /** converts the rotation part of a salt::Matrix to an ODE - dMatrix3 */ - void ConvertRotationMatrix(const salt::Matrix& rot, dMatrix3& matrix); - - /** coverts the ODE dMatrix3 to the rotation part of a salt::Matrix */ - void ConvertRotationMatrix(const dReal* matrix, salt::Matrix& rot) const; -}; - -DECLARE_ABSTRACTCLASS(ODEObject); - -} //namespace oxygen - -#endif //OXYGEN_ODEOBJECT_H Deleted: trunk/spark/lib/oxygen/physicsserver/odeobject_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/odeobject_c.cpp 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/odeobject_c.cpp 2009-11-17 11:29:29 UTC (rev 99) @@ -1,29 +0,0 @@ -/* -*- mode: c++ -*- - - this file is part of rcssserver3D - Fri May 9 2003 - Copyright (C) 2003 Koblenz University - $Id$ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include "odeobject.h" - -using namespace oxygen; - -void CLASS(ODEObject)::DefineClass() -{ - DEFINE_BASECLASS(oxygen/BaseNode); -} Deleted: trunk/spark/lib/oxygen/physicsserver/odewrapper.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/odewrapper.h 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/odewrapper.h 2009-11-17 11:29:29 UTC (rev 99) @@ -1,80 +0,0 @@ -/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- - - this file is part of rcssserver3D - Fri May 9 2003 - Copyright (C) 2002,2003 Koblenz University - Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group - $Id$ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ -#ifndef OXYGEN_ODEWRAPPER_H -#define OXYGEN_ODEWRAPPER_H - -#undef EXTERN -#undef HAVE_VPRINTF -#undef PACKAGE -#undef PACKAGE_BUGREPORT -#undef PACKAGE_NAME -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION -#undef PREFIX -#undef VERSION - -#ifdef WIN32 - -#ifdef copysignf -#undef copysignf -#endif - -#ifdef copysign -#undef copysign -#endif - -#endif // WIN32 - -#ifdef __APPLE__ - -// there is a conflicting type in a system header (Leopard) -// so we define a dummy here -#define uint32 dummy - -#endif - -#include <ode/ode.h> - -#ifdef __APPLE__ - -// undefine the dummy -#undef uint32 - -#endif - -#undef EXTERN -#undef HAVE_VPRINTF -#undef PACKAGE -#undef PACKAGE_BUGREPORT -#undef PACKAGE_NAME -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION -#undef PREFIX -#undef VERSION - -#ifdef HAVE_CONFIG_H -#include <sparkconfig.h> -#endif - -#endif // OXYGEN_ODEWRAPPER Modified: trunk/spark/lib/oxygen/physicsserver/physicsserver.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/physicsserver.h 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/physicsserver.h 2009-11-17 11:29:29 UTC (rev 99) @@ -25,7 +25,7 @@ #include <zeitgeist/class.h> #include <zeitgeist/leaf.h> #include <oxygen/oxygen_defines.h> -#include "odewrapper.h" +#include <oxygen/physicsserver/ode/odewrapper.h> namespace oxygen { Modified: trunk/spark/lib/oxygen/physicsserver/space.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/space.h 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/space.h 2009-11-17 11:29:29 UTC (rev 99) @@ -22,7 +22,7 @@ #ifndef OXYGEN_SPACE_H #define OXYGEN_SPACE_H -#include "odeobject.h" +#include <oxygen/physicsserver/ode/odeobject.h> #include <set> #include <oxygen/oxygen_defines.h> Modified: trunk/spark/lib/oxygen/physicsserver/world.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/world.cpp 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/world.cpp 2009-11-17 11:29:29 UTC (rev 99) @@ -19,16 +19,19 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "world.h" -#include "space.h" +#include <oxygen/physicsserver/ode/odeworld.h> +#include <oxygen/physicsserver/world.h> +#include <oxygen/physicsserver/space.h> #include <oxygen/sceneserver/scene.h> using namespace boost; using namespace oxygen; using namespace salt; -World::World() : ODEObject(), mODEWorld(0) +World::World() : ODEObject() { + shared_ptr<ODEWorld> odeworld(new ODEWorld()); + mWorldImp = (shared_dynamic_cast<WorldImp>(odeworld)); } World::~World() @@ -37,102 +40,70 @@ dWorldID World::GetODEWorld() const { - return mODEWorld; + return mWorldImp->GetODEWorldImp(); } void World::SetGravity(const Vector3f& gravity) { - dWorldSetGravity(mODEWorld, - gravity.x(), - gravity.y(), - gravity.z() - ); + mWorldImp->SetGravityImp(gravity); } salt::Vector3f World::GetGravity() const { - dVector3 dGravity; - dWorldGetGravity(mODEWorld,dGravity); - return Vector3f(dGravity[0],dGravity[1],dGravity[2]); + return mWorldImp->GetGravityImp(); } void World::SetERP(float erp) { - dWorldSetERP(mODEWorld, erp); + mWorldImp->SetERPImp(erp); } float World::GetERP() const { - return dWorldGetERP(mODEWorld); + return mWorldImp->GetERPImp(); } void World::SetCFM(float cfm) { - dWorldSetCFM(mODEWorld, cfm); + mWorldImp->SetCFMImp(cfm); } float World::GetCFM() const { - return dWorldGetCFM(mODEWorld); + return mWorldImp->GetCFMImp(); } void World::Step(float deltaTime) { - dWorldStep(mODEWorld, deltaTime); + mWorldImp->StepImp(deltaTime); } bool World::GetAutoDisableFlag() const { - return (dWorldGetAutoDisableFlag(mODEWorld) == 1); + return mWorldImp->GetAutoDisableFlagImp(); } void World::SetAutoDisableFlag(bool flag) { - dWorldSetAutoDisableFlag(mODEWorld, static_cast<int>(flag)); + mWorldImp->SetAutoDisableFlagImp(flag); } void World::SetContactSurfaceLayer(float depth) { - dWorldSetContactSurfaceLayer(mODEWorld, depth); + mWorldImp->SetContactSurfaceLayerImp(depth); } float World::GetContactSurfaceLayer() const { - return dWorldGetContactSurfaceLayer(mODEWorld); + return mWorldImp->GetContactSurfaceLayerImp(); } bool World::ConstructInternal() { - // create an ode world - mODEWorld = dWorldCreate(); - - return (mODEWorld != 0); + return mWorldImp->ConstructInternalImp(); } void World::DestroyODEObject() { - static bool recurseLock = false; - if (recurseLock) - { - return; - } - - recurseLock = true; - - shared_ptr<Space> space = GetSpace(); - if (space.get() != 0) - { - space->DestroyODEObject(); - } - - if (mODEWorld == 0) - { - return; - } - - // release the ODE world - dWorldDestroy(mODEWorld); - mODEWorld = 0; - - recurseLock = false; + mWorldImp->DestroyODEObjectImp(); } Modified: trunk/spark/lib/oxygen/physicsserver/world.h =================================================================== --- trunk/spark/lib/oxygen/physicsserver/world.h 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/world.h 2009-11-17 11:29:29 UTC (rev 99) @@ -23,11 +23,14 @@ #define OXYGEN_WORLD_H #include <oxygen/oxygen_defines.h> -#include "odeobject.h" +#include <oxygen/physicsserver/ode/odeobject.h> namespace oxygen { +class WorldImp; +class ODEWorld; + /** World encapsulates an ODE world object. It is a container for rigid bodies and joints. Objects in different worlds can not interact, for example rigid bodies from two different worlds can @@ -113,12 +116,11 @@ // Members // private: - /** the dynamics world represented by this object */ - dWorldID mODEWorld; + boost::shared_ptr<WorldImp> mWorldImp; }; DECLARE_CLASS(World); -}; +} #endif //OXYGEN_WORLD_H Modified: trunk/spark/lib/oxygen/physicsserver/world_c.cpp =================================================================== --- trunk/spark/lib/oxygen/physicsserver/world_c.cpp 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/lib/oxygen/physicsserver/world_c.cpp 2009-11-17 11:29:29 UTC (rev 99) @@ -19,7 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "world.h" +#include <oxygen/physicsserver/world.h> using namespace boost; using namespace oxygen; Modified: trunk/spark/plugin/collisionperceptor/forceresistanceperceptor.cpp =================================================================== --- trunk/spark/plugin/collisionperceptor/forceresistanceperceptor.cpp 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/plugin/collisionperceptor/forceresistanceperceptor.cpp 2009-11-17 11:29:29 UTC (rev 99) @@ -21,7 +21,7 @@ */ #include "forceresistanceperceptor.h" -#include <oxygen/physicsserver/odewrapper.h> +#include <oxygen/physicsserver/ode/odewrapper.h> #include <oxygen/sceneserver/transform.h> using namespace std; Modified: trunk/spark/plugin/collisionperceptor/forceresistanceperceptor.h =================================================================== --- trunk/spark/plugin/collisionperceptor/forceresistanceperceptor.h 2009-11-16 10:24:11 UTC (rev 98) +++ trunk/spark/plugin/collisionperceptor/forceresistanceperceptor.h 2009-11-17 11:29:29 UTC (rev 99) @@ -24,7 +24,7 @@ #define FORCERESISTANCEPERCEPTOR_H_ #include <oxygen/agentaspect/perceptor.h> -#include <oxygen/physicsserver/odewrapper.h> +#include <oxygen/physicsserver/ode/odewrapper.h> #include <oxygen/sceneserver/transform.h> #include <salt/vector.h> #include <list> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |