[52] | 1 | ################################################################################################# |
---|
| 2 | # This file allows to configure osgVisual with CMAKE to generate native build solutions. # |
---|
| 3 | # # |
---|
| 4 | # Specify the following environment variables to use osgVisual and this CMAKE script: # |
---|
| 5 | # * OSG_ROOT: Path to your 32 bit (x86) OSG, e.g. D:\OSG\OpenSceneGraph-2.9.8_x86 # |
---|
| 6 | # * OSG_ROOT_X64: Path to your 64 bit (x64) OSG, e.g. D:\OSG\OpenSceneGraph-2.9.8_x64 # |
---|
| 7 | # * OSG: Path to your 32 bit (x86) OSG and 3rdParty binary folder, # |
---|
| 8 | # e.g. %OSG_ROOT%\bin;D:\OSG\3rdParty\bin\x86 # |
---|
| 9 | # * OSG_X64: Path to your 64 bit (x64) OSG and 3rdParty binary folder, # |
---|
| 10 | # e.g. %OSG_ROOT_X64%\bin;D:\OSG\3rdParty\bin\x64 # |
---|
| 11 | # * PATH: Extend with %OSG% or %OSG_X64% to use OSG and osgVisual from command line, # |
---|
| 12 | # e.g. PATH=%PATH%;%OSG% # |
---|
| 13 | # # |
---|
| 14 | # NOTE: On Visual Studio and x64 Arch, CMAKE uses the project settings to specify the # |
---|
| 15 | # correct x64 OSG path, so you can use osg as 32 bit in your system path. # |
---|
| 16 | # # |
---|
| 17 | # # |
---|
| 18 | ################################################################################################# |
---|
| 19 | |
---|
[28] | 20 | cmake_minimum_required(VERSION 2.8) |
---|
| 21 | |
---|
[52] | 22 | |
---|
[28] | 23 | PROJECT(osgVisual) |
---|
| 24 | #SET(CMAKE_MODULE_PATH "${osgVisual_SOURCE_DIR}/../CMakeModules;${CMAKE_MODULE_PATH}") |
---|
| 25 | |
---|
[51] | 26 | #INCLUDE( CheckTypeSize ) |
---|
| 27 | #CHECK_TYPE_SIZE( "void*" SIZE_OF_VOID_P ) |
---|
| 28 | IF( CMAKE_SIZEOF_VOID_P EQUAL 4 ) |
---|
| 29 | MESSAGE( STATUS "32 bit architecture detected" ) |
---|
| 30 | SET(DESTINATION_ARCH "x86") |
---|
| 31 | ENDIF() |
---|
| 32 | IF( CMAKE_SIZEOF_VOID_P EQUAL 8 ) |
---|
| 33 | MESSAGE( STATUS "64 bit architecture detected" ) |
---|
| 34 | SET(DESTINATION_ARCH "x64") |
---|
| 35 | ENDIF() |
---|
| 36 | |
---|
[52] | 37 | |
---|
[28] | 38 | # Get OSG Settings |
---|
[52] | 39 | IF(DESTINATION_ARCH STREQUAL "x64") |
---|
| 40 | SET(OSG_ROOT_BKP $ENV{OSG_ROOT}) # BACKUP old OSG_ROOT |
---|
| 41 | SET(ENV{OSG_ROOT} $ENV{OSG_ROOT_X64}) # Replace OSGROOT with OSG_ROOT_X64 to force CMAKE to find the correct OSG version (64 bit) |
---|
| 42 | ENDIF () |
---|
| 43 | |
---|
| 44 | SET(OpenSceneGraph_MARK_AS_ADVANCED ON) |
---|
[58] | 45 | FIND_PACKAGE(OpenSceneGraph 2.9.8 REQUIRED osgViewer OpenThreads osgDB osgTerrain osgGA osgText osgSim osgUtil) |
---|
[28] | 46 | FIND_PACKAGE(OpenGL REQUIRED) |
---|
| 47 | |
---|
[52] | 48 | IF(DESTINATION_ARCH STREQUAL "x64") |
---|
| 49 | SET(ENV{OSG_ROOT} ${OSG_ROOT_BKP}) # Restore old OSG_ROOT |
---|
| 50 | UNSET(OSG_ROOT_BKP) # Delete backup |
---|
| 51 | ENDIF () |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | |
---|
[51] | 55 | # Module sky-silverlining - At the moment only for Win32, will be opened to Unix ASAP |
---|
[28] | 56 | # OPTION( OPTION_VAR "description string" [initial value] ) |
---|
| 57 | IF ( WIN32 ) |
---|
| 58 | |
---|
| 59 | SET(USE_SKY_SILVERLINING ON CACHE BOOL "Enable to use Sundog-soft's Silverlining SDK for sky & weather") |
---|
| 60 | IF(USE_SKY_SILVERLINING ) |
---|
| 61 | SET(SOURCES |
---|
| 62 | ${SOURCES} |
---|
| 63 | include/sky_Silverlining/skySilverLining_AtmosphereReference.h |
---|
[101] | 64 | include/sky_Silverlining/skySilverLining_cloudLayerSlot.h |
---|
[28] | 65 | include/sky_Silverlining/skySilverLining_cloudsDrawable.h |
---|
| 66 | include/sky_Silverlining/skySilverLining_ProjectionMatrixCallback.h |
---|
| 67 | include/sky_Silverlining/skySilverLining_skyDrawable.h |
---|
| 68 | include/sky_Silverlining/visual_skySilverLining.h |
---|
| 69 | src/sky_Silverlining/skySilverLining_cloudsDrawable.cpp |
---|
| 70 | src/sky_Silverlining/skySilverLining_skyDrawable.cpp |
---|
| 71 | src/sky_Silverlining/visual_skySilverLining.cpp |
---|
| 72 | ) |
---|
| 73 | |
---|
[51] | 74 | IF (DESTINATION_ARCH STREQUAL "x86") |
---|
| 75 | SET(SILVERLINING_ARCH "win32") |
---|
| 76 | ELSEIF ( DESTINATION_ARCH STREQUAL "x64" ) |
---|
| 77 | SET(SILVERLINING_ARCH "x64") |
---|
| 78 | ENDIF () |
---|
| 79 | SET(SILVERLINING_LIBRARY_RELEASE $ENV{SILVERLINING_PATH}\\lib\\vc9\\${SILVERLINING_ARCH}\\SilverLining-MT-DLL.lib CACHE FILEPATH "Select the release library of Sundog-Soft's Silverlining SDK to link against." ) |
---|
| 80 | SET(SILVERLINING_LIBRARY_DEBUG $ENV{SILVERLINING_PATH}\\lib\\vc9\\${SILVERLINING_ARCH}\\SilverLining-MTD-DLL.lib CACHE FILEPATH "Select the debug library of Sundog-Soft's Silverlining SDK to link against." ) |
---|
[28] | 81 | SET(SILVERLINING_INCLUDE_DIR "$ENV{SILVERLINING_PATH}\\Public Headers" CACHE PATH "Enter the path to the the public Include directory of Sundog-Soft's Silverlining SDK" ) |
---|
| 82 | SET(SILVERLINING_LICENSEE "Your user name" CACHE STRING "Enter your Silverlining licensee name. If you license available, osgVisual will work with silverlining as 5 minute demo with the default value." ) |
---|
| 83 | SET(SILVERLINING_LICENSE "Your license code" CACHE STRING "Enter your Silverlining license key. If you license available, osgVisual will work with silverlining as 5 minute demo with the default value." ) |
---|
| 84 | INCLUDE_DIRECTORIES(${SILVERLINING_INCLUDE_DIR} include/sky_Silverlining) |
---|
| 85 | ADD_DEFINITIONS( "-DUSE_SKY_SILVERLINING" ) |
---|
| 86 | ADD_DEFINITIONS( "-DSILVERLINING_LICENSEE=\"${SILVERLINING_LICENSEE}\"" ) |
---|
| 87 | ADD_DEFINITIONS( "-DSILVERLINING_LICENSE=\"${SILVERLINING_LICENSE}\"" ) |
---|
| 88 | |
---|
| 89 | ELSE(USE_SKY_SILVERLINING) |
---|
| 90 | UNSET(SILVERLINING_LIBRARY_RELEASE CACHE) |
---|
| 91 | UNSET(SILVERLINING_LIBRARY_DEBUG CACHE) |
---|
| 92 | UNSET(SILVERLINING_INCLUDE_DIR CACHE) |
---|
| 93 | UNSET(SILVERLINING_LICENSEE) |
---|
| 94 | UNSET(SILVERLINING_LICENSE) |
---|
| 95 | ENDIF(USE_SKY_SILVERLINING) |
---|
| 96 | ENDIF(WIN32) |
---|
[100] | 97 | IF(UNIX) |
---|
[88] | 98 | |
---|
| 99 | SET(USE_SKY_SILVERLINING ON CACHE BOOL "Enable to use Sundog-soft's Silverlining SDK for sky & weather") |
---|
| 100 | IF(USE_SKY_SILVERLINING ) |
---|
| 101 | SET(SOURCES |
---|
| 102 | ${SOURCES} |
---|
| 103 | include/sky_Silverlining/skySilverLining_AtmosphereReference.h |
---|
| 104 | include/sky_Silverlining/skySilverlining_cloudLayerSlot.h |
---|
| 105 | include/sky_Silverlining/skySilverLining_cloudsDrawable.h |
---|
| 106 | include/sky_Silverlining/skySilverLining_ProjectionMatrixCallback.h |
---|
| 107 | include/sky_Silverlining/skySilverLining_skyDrawable.h |
---|
| 108 | include/sky_Silverlining/visual_skySilverLining.h |
---|
| 109 | src/sky_Silverlining/skySilverLining_cloudsDrawable.cpp |
---|
| 110 | src/sky_Silverlining/skySilverLining_skyDrawable.cpp |
---|
| 111 | src/sky_Silverlining/visual_skySilverLining.cpp |
---|
| 112 | ) |
---|
| 113 | |
---|
| 114 | IF (DESTINATION_ARCH STREQUAL "x86") |
---|
| 115 | SET(SILVERLINING_ARCH "win32") |
---|
| 116 | ELSEIF ( DESTINATION_ARCH STREQUAL "x64" ) |
---|
| 117 | SET(SILVERLINING_ARCH "x64") |
---|
| 118 | ENDIF () |
---|
| 119 | SET(SILVERLINING_LIBRARY_RELEASE $ENV{SILVERLINING_PATH}\\lib\\vc9\\${SILVERLINING_ARCH}\\SilverLining-MT-DLL.lib CACHE FILEPATH "Select the release library of Sundog-Soft's Silverlining SDK to link against." ) |
---|
| 120 | SET(SILVERLINING_LIBRARY_DEBUG $ENV{SILVERLINING_PATH}\\lib\\vc9\\${SILVERLINING_ARCH}\\SilverLining-MTD-DLL.lib CACHE FILEPATH "Select the debug library of Sundog-Soft's Silverlining SDK to link against." ) |
---|
| 121 | SET(SILVERLINING_INCLUDE_DIR "$ENV{SILVERLINING_PATH}\\Public Headers" CACHE PATH "Enter the path to the the public Include directory of Sundog-Soft's Silverlining SDK" ) |
---|
| 122 | SET(SILVERLINING_LICENSEE "Your user name" CACHE STRING "Enter your Silverlining licensee name. If you license available, osgVisual will work with silverlining as 5 minute demo with the default value." ) |
---|
| 123 | SET(SILVERLINING_LICENSE "Your license code" CACHE STRING "Enter your Silverlining license key. If you license available, osgVisual will work with silverlining as 5 minute demo with the default value." ) |
---|
| 124 | INCLUDE_DIRECTORIES(${SILVERLINING_INCLUDE_DIR} include/sky_Silverlining) |
---|
| 125 | ADD_DEFINITIONS( "-DUSE_SKY_SILVERLINING" ) |
---|
| 126 | ADD_DEFINITIONS( "-DSILVERLINING_LICENSEE=\"${SILVERLINING_LICENSEE}\"" ) |
---|
| 127 | ADD_DEFINITIONS( "-DSILVERLINING_LICENSE=\"${SILVERLINING_LICENSE}\"" ) |
---|
| 128 | |
---|
| 129 | ELSE(USE_SKY_SILVERLINING) |
---|
| 130 | UNSET(SILVERLINING_LIBRARY_RELEASE CACHE) |
---|
| 131 | UNSET(SILVERLINING_LIBRARY_DEBUG CACHE) |
---|
| 132 | UNSET(SILVERLINING_INCLUDE_DIR CACHE) |
---|
| 133 | UNSET(SILVERLINING_LICENSEE) |
---|
| 134 | UNSET(SILVERLINING_LICENSE) |
---|
| 135 | ENDIF(USE_SKY_SILVERLINING) |
---|
| 136 | ENDIF() |
---|
[28] | 137 | |
---|
| 138 | # Module distortion |
---|
| 139 | SET(USE_DISTORTION OFF CACHE BOOL "Enable to use distortion with Projection Designer's distortion maps") |
---|
| 140 | IF(USE_DISTORTION) |
---|
| 141 | SET(SOURCES |
---|
| 142 | ${SOURCES} |
---|
| 143 | include/distortion/visual_distortion.h |
---|
| 144 | src/distortion/visual_distortion.cpp |
---|
| 145 | ) |
---|
| 146 | INCLUDE_DIRECTORIES(include/distortion) |
---|
| 147 | ADD_DEFINITIONS( "-DUSE_DISTORTION" ) |
---|
| 148 | ENDIF(USE_DISTORTION) |
---|
| 149 | |
---|
| 150 | |
---|
| 151 | # Module Vista2D - Only available under Win32 |
---|
| 152 | if( WIN32 ) |
---|
| 153 | SET(USE_VISTA2D OFF CACHE BOOL "Enable to use Vista2D by Wetzel Technology") |
---|
| 154 | IF( USE_VISTA2D ) |
---|
| 155 | INCLUDE_DIRECTORIES( include/vista2D ) |
---|
| 156 | SET(SOURCES |
---|
| 157 | ${SOURCES} |
---|
| 158 | include/vista2D/visual_vista2D.h |
---|
| 159 | src/vista2D/visual_vista2D.cpp |
---|
| 160 | ) |
---|
| 161 | SET(VISTA2D_INCLUDE_DIR . CACHE PATH "Select the INCLUDE directory path for Vista2D by Wetzel Technology." ) |
---|
| 162 | SET(VISTA2D_LIBRARY_DEBUG . CACHE FILEPATH "Select debug LIBRARY path for linking against Vista2D by Wetzel Technology." ) |
---|
| 163 | SET(VISTA2D_LIBRARY_RELEASE . CACHE FILEPATH "Select release LIBRARY path for linking against Vista2D by Wetzel Technology." ) |
---|
| 164 | INCLUDE_DIRECTORIES(${VISTA2D_INCLUDE_DIR}) |
---|
| 165 | ADD_DEFINITIONS( "-DUSE_VISTA2D" ) |
---|
| 166 | ELSE(USE_VISTA2D) |
---|
| 167 | UNSET(VISTA2D_INCLUDE_DIR CACHE) |
---|
| 168 | UNSET(VISTA2D_LIBRARY_DEBUG CACHE) |
---|
| 169 | UNSET(VISTA2D_LIBRARY_RELEASE CACHE) |
---|
| 170 | ENDIF(USE_VISTA2D) |
---|
| 171 | ENDIF(WIN32) |
---|
| 172 | |
---|
| 173 | |
---|
| 174 | # Module Spacenavigator manipulator - ONLY under WIN32 |
---|
| 175 | if( WIN32 ) |
---|
| 176 | # No header or linking required, because WIN32 COM interface used. |
---|
| 177 | SET(USE_SPACEMOUSE ON CACHE BOOL "Enable to use camera manipulator based on Spacenavigator by 3DConnexion") |
---|
| 178 | IF( USE_SPACEMOUSE ) |
---|
| 179 | SET(SOURCES |
---|
| 180 | ${SOURCES} |
---|
| 181 | include/manip_Spacemouse/manip_spaceMouse.h |
---|
| 182 | include/manip_Spacemouse/manip_freeSpaceMouse.h |
---|
| 183 | include/manip_Spacemouse/manip_nodeTrackerSpaceMouse.h |
---|
| 184 | src/manip_Spacemouse/manip_spaceMouse.cpp |
---|
| 185 | src/manip_Spacemouse/manip_freeSpaceMouse.cpp |
---|
| 186 | src/manip_Spacemouse/manip_nodeTrackerSpaceMouse.cpp |
---|
| 187 | ) |
---|
| 188 | INCLUDE_DIRECTORIES(include/manip_Spacemouse) |
---|
| 189 | ADD_DEFINITIONS( "-DUSE_SPACENAVIGATOR" ) |
---|
| 190 | ENDIF(USE_SPACEMOUSE) |
---|
| 191 | ENDIF(WIN32) |
---|
| 192 | |
---|
| 193 | |
---|
| 194 | # Module cluster |
---|
[65] | 195 | SET(USE_CLUSTER_ASIO_TCP_IOSTREAM OFF CACHE BOOL "Enable to use the Boost ASIO TCP iostream implementation for the cluster interface") |
---|
| 196 | SET(USE_CLUSTER_ENET ON CACHE BOOL "Enable to use the ENet reliable UDP library implementation for the cluster interface") |
---|
[58] | 197 | IF( USE_CLUSTER_ASIO_TCP_IOSTREAM ) |
---|
[28] | 198 | SET(SOURCES |
---|
| 199 | ${SOURCES} |
---|
| 200 | include/cluster/dataIO_cluster.h |
---|
[58] | 201 | include/cluster/dataIO_clusterAsioTcpIostream.h |
---|
| 202 | src/cluster/dataIO_clusterAsioTcpIostream.cpp |
---|
| 203 | ) |
---|
| 204 | ADD_DEFINITIONS( "-DUSE_CLUSTER_ASIO_TCP_IOSTREAM" ) |
---|
[60] | 205 | ADD_DEFINITIONS( "-D_WIN32_WINNT=0x0501" ) |
---|
| 206 | SET(BOOST_LIBRARY_PATH "../../3rdParty_x86_x64/lib/${DESTINATION_ARCH}/" CACHE PATH "Select the library folder of Boost libraries to link against." ) |
---|
[58] | 207 | SET(BOOST_INCLUDE_DIR "../../3rdParty_x86_x64/include/boost-1.43.0/" CACHE PATH "Enter the path to the the include directory of Boost" ) |
---|
[60] | 208 | INCLUDE_DIRECTORIES(${BOOST_INCLUDE_DIR}) |
---|
| 209 | LINK_DIRECTORIES(${BOOST_LIBRARY_PATH}) |
---|
[58] | 210 | ELSE() |
---|
[60] | 211 | UNSET(BOOST_LIBRARY_PATH CACHE) |
---|
[58] | 212 | UNSET(BOOST_ASIO_INCLUDE_DIR CACHE) |
---|
| 213 | ENDIF() |
---|
| 214 | |
---|
[65] | 215 | IF( USE_CLUSTER_ENET ) |
---|
[58] | 216 | SET(SOURCES |
---|
| 217 | ${SOURCES} |
---|
| 218 | include/cluster/dataIO_cluster.h |
---|
[65] | 219 | include/cluster/dataIO_clusterENet.h |
---|
| 220 | src/cluster/dataIO_clusterENet.cpp |
---|
| 221 | include/cluster/dataIO_clusterENet_implementation.h |
---|
| 222 | src/cluster/dataIO_clusterENet_implementation.cpp |
---|
| 223 | src/cluster/enet/callbacks.c |
---|
| 224 | src/cluster/enet/compress.c |
---|
| 225 | src/cluster/enet/host.c |
---|
| 226 | src/cluster/enet/list.c |
---|
| 227 | src/cluster/enet/packet.c |
---|
| 228 | src/cluster/enet/peer.c |
---|
| 229 | src/cluster/enet/protocol.c |
---|
| 230 | src/cluster/enet/unix.c |
---|
| 231 | src/cluster/enet/win32.c |
---|
| 232 | include/cluster/enet/callbacks.h |
---|
| 233 | include/cluster/enet/enet.h |
---|
| 234 | include/cluster/enet/list.h |
---|
| 235 | include/cluster/enet/protocol.h |
---|
| 236 | include/cluster/enet/time.h |
---|
| 237 | include/cluster/enet/types.h |
---|
| 238 | include/cluster/enet/unix.h |
---|
| 239 | include/cluster/enet/utility.h |
---|
| 240 | include/cluster/enet/win32.h |
---|
| 241 | ) |
---|
| 242 | ADD_DEFINITIONS( "-DUSE_CLUSTER_ENET" ) |
---|
| 243 | |
---|
| 244 | ENDIF() |
---|
| 245 | |
---|
[83] | 246 | IF(NOT USE_CLUSTER_ASIO_TCP_IOSTREAM AND NOT USE_CLUSTER_ENET) |
---|
[65] | 247 | SET(SOURCES |
---|
| 248 | ${SOURCES} |
---|
| 249 | include/cluster/dataIO_cluster.h |
---|
[28] | 250 | include/cluster/dataIO_clusterDummy.h |
---|
| 251 | src/cluster/dataIO_clusterDummy.cpp |
---|
| 252 | ) |
---|
| 253 | ADD_DEFINITIONS( "-DUSE_CLUSTER_DUMMY" ) |
---|
[58] | 254 | ENDIF() |
---|
[28] | 255 | |
---|
| 256 | |
---|
| 257 | # Module extLink |
---|
| 258 | SET(SOURCES |
---|
| 259 | ${SOURCES} |
---|
| 260 | include/extLink/dataIO_extLink.h |
---|
| 261 | include/extLink/manip_extLink.h |
---|
| 262 | src/extLink/manip_extLink.cpp |
---|
| 263 | ) |
---|
| 264 | IF ( WIN32 ) |
---|
| 265 | SET(USE_EXTLINK_VCL ON CACHE BOOL "Enable to use the VCL Implementation for the externalLink interface") |
---|
| 266 | IF( USE_EXTLINK_VCL ) |
---|
| 267 | SET(EXTLINK_VCL_INCLUDE_DIR ../VCL_1.0.3.4/source/include/VCL CACHE PATH "Select the INCLUDE directory path for extLink VCL Implementation." ) |
---|
| 268 | SET(SOURCES |
---|
| 269 | ${SOURCES} |
---|
| 270 | include/extLink/dataIO_extLinkVCL.h |
---|
| 271 | src/extLink/dataIO_extLinkVCL.cpp |
---|
| 272 | ) |
---|
| 273 | INCLUDE_DIRECTORIES(${EXTLINK_VCL_INCLUDE_DIR}) |
---|
| 274 | ADD_DEFINITIONS( "-DUSE_EXTLINK_VCL" ) |
---|
[51] | 275 | #Linking: VCL uses #pragma to link, no need for linking configuration in CMAKE |
---|
[28] | 276 | ELSE(USE_EXTLINK_VCL) |
---|
| 277 | SET(SOURCES |
---|
| 278 | ${SOURCES} |
---|
| 279 | include/extLink/dataIO_extLinkDummy.h |
---|
| 280 | src/extLink/dataIO_extLinkDummy.cpp |
---|
| 281 | ) |
---|
| 282 | UNSET(EXTLINK_VCL_INCLUDE_DIR CACHE) |
---|
| 283 | ADD_DEFINITIONS( "-DUSE_EXTLINK_DUMMY" ) |
---|
| 284 | ENDIF(USE_EXTLINK_VCL) |
---|
| 285 | ELSE(WIN32) |
---|
| 286 | UNSET(EXTLINK_VCL_INCLUDE_DIR CACHE) |
---|
| 287 | SET(SOURCES |
---|
| 288 | ${SOURCES} |
---|
| 289 | include/extLink/dataIO_extLinkDummy.h |
---|
| 290 | src/extLink/dataIO_extLinkDummy.cpp |
---|
| 291 | ) |
---|
| 292 | ADD_DEFINITIONS( "-DUSE_EXTLINK_DUMMY" ) |
---|
| 293 | ENDIF(WIN32) |
---|
| 294 | |
---|
| 295 | |
---|
| 296 | |
---|
| 297 | # Set core sources |
---|
| 298 | SET(SOURCES |
---|
| 299 | ${SOURCES} |
---|
| 300 | # Core |
---|
| 301 | include/core/visual_core.h |
---|
| 302 | src/core/visual_core.cpp |
---|
| 303 | src/core/osgVisual.cpp |
---|
[86] | 304 | # Memory Leak debugging |
---|
| 305 | include/core/leakDetection.h |
---|
[28] | 306 | # Util |
---|
| 307 | include/util/visual_util.h |
---|
| 308 | src/util/visual_util.cpp |
---|
| 309 | # Draw 2D |
---|
| 310 | include/draw2D/visual_draw2D.h |
---|
| 311 | src/draw2D/visual_draw2D.cpp |
---|
| 312 | # Debug HUD |
---|
| 313 | include/draw2D/visual_debug_hud.h |
---|
| 314 | src/draw2D/visual_debug_hud.cpp |
---|
| 315 | # Example HUD |
---|
| 316 | include/draw2D/visual_hud.h |
---|
| 317 | src/draw2D/visual_hud.cpp |
---|
| 318 | # Draw 3D |
---|
| 319 | include/draw3D/visual_draw3D.h |
---|
| 320 | src/draw3D/visual_draw3D.cpp |
---|
| 321 | # Object Mounted Manipulator |
---|
| 322 | include/manip_ObjectMounted/manip_objectMounted.h |
---|
| 323 | src/manip_ObjectMounted/manip_objectMounted.cpp |
---|
| 324 | # Objects |
---|
| 325 | include/object/visual_object.h |
---|
| 326 | include/object/object_updater.h |
---|
| 327 | src/object/visual_object.cpp |
---|
| 328 | src/object/object_updater.cpp |
---|
| 329 | # DataIO |
---|
| 330 | include/dataIO/visual_dataIO.h |
---|
| 331 | include/dataIO/dataIO_transportContainer.h |
---|
| 332 | include/dataIO/dataIO_slot.h |
---|
| 333 | include/dataIO/dataIO_executer.h |
---|
| 334 | src/dataIO/visual_dataIO.cpp |
---|
| 335 | src/dataIO/dataIO_transportContainer.cpp |
---|
| 336 | src/dataIO/dataIO_slot.cpp |
---|
| 337 | src/dataIO/dataIO_executer.cpp |
---|
| 338 | ) |
---|
| 339 | |
---|
[60] | 340 | INCLUDE_DIRECTORIES(include/core include/util include/draw2D include/draw3D include/object include/manip_ObjectMounted) |
---|
[28] | 341 | INCLUDE_DIRECTORIES(include/dataIO include/cluster include/extLink ${OPENSCENEGRAPH_INCLUDE_DIRS} .) |
---|
| 342 | |
---|
| 343 | |
---|
| 344 | # Executable Output |
---|
| 345 | SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) |
---|
| 346 | ADD_EXECUTABLE(osgVisual ${SOURCES}) |
---|
| 347 | |
---|
| 348 | |
---|
| 349 | # Linking |
---|
[100] | 350 | #IF(WIN32) |
---|
| 351 | # TARGET_LINK_LIBRARIES(osgVisual ${OPENSCENEGRAPH_LIBRARIES} "OpenGL32.lib") |
---|
| 352 | #ENDIF(WIN32) |
---|
| 353 | #IF(UNIX) |
---|
| 354 | # TARGET_LINK_LIBRARIES(osgVisual ${OPENSCENEGRAPH_LIBRARIES} "libGL.so") |
---|
| 355 | #ENDIF(UNIX) |
---|
| 356 | TARGET_LINK_LIBRARIES(osgVisual ${OPENSCENEGRAPH_LIBRARIES} ${OPENGL_LIBRARIES}) |
---|
| 357 | |
---|
| 358 | |
---|
[28] | 359 | IF(USE_SKY_SILVERLINING ) |
---|
| 360 | TARGET_LINK_LIBRARIES(osgVisual "winmm.lib" debug ${SILVERLINING_LIBRARY_DEBUG} optimized ${SILVERLINING_LIBRARY_RELEASE}) |
---|
| 361 | ENDIF(USE_SKY_SILVERLINING) |
---|
| 362 | |
---|
| 363 | IF(USE_VISTA2D) |
---|
| 364 | TARGET_LINK_LIBRARIES(osgVisual debug ${VISTA2D_LIBRARY_DEBUG} optimized ${VISTA2D_LIBRARY_RELEASE}) |
---|
| 365 | ENDIF(USE_VISTA2D) |
---|
| 366 | |
---|
[65] | 367 | IF(USE_CLUSTER_ENET) |
---|
| 368 | TARGET_LINK_LIBRARIES(osgVisual "winmm.lib" "ws2_32.lib" ) |
---|
| 369 | ENDIF(USE_CLUSTER_ENET) |
---|
[28] | 370 | |
---|
| 371 | # CMAKE Fix for VS to not prepend build type to path. |
---|
| 372 | SET_TARGET_PROPERTIES(osgVisual PROPERTIES PREFIX "../") |
---|
| 373 | SET_TARGET_PROPERTIES( osgVisual PROPERTIES DEBUG_POSTFIX d ) |
---|
| 374 | |
---|
| 375 | |
---|
| 376 | # Generating vcproj file, if MSVC to preset debugging parameter - based on http://stackoverflow.com/questions/1005901/how-to-set-path-environment-variable-using-cmake-and-visual-studio-to-run-test |
---|
| 377 | IF (MSVC) |
---|
| 378 | # Set up a default .user file that contains the debugging setup |
---|
| 379 | ## Find user and system name |
---|
| 380 | SET(SYSTEM_NAME $ENV{USERDOMAIN} CACHE STRING "Build System Name") |
---|
| 381 | SET(USER_NAME $ENV{USERNAME} CACHE STRING "Build System UserName") |
---|
| 382 | SET(USERFILE_COMMAND_DEBUG "$(TargetPath)" CACHE STRING "Command to execute on debugging (VS Project settings)" ) |
---|
| 383 | SET(USERFILE_WORKING_DIRECTORY_DEBUG "bin" CACHE STRING "Working directory on debugging (VS Project settings)" ) |
---|
| 384 | SET(USERFILE_COMMAND_ARGUMENTS_DEBUG "-C center --window 100 100 800 600 -m D:/OpenSceneGraph/VPB-Testdatensatz/DB_Small/database.ive -p salzburg.path" CACHE STRING "Command arguments (VS Project settings)" ) |
---|
| 385 | SET(USERFILE_REMOTE_MACHINE_DEBUG ${USER_NAME} CACHE STRING "Remote Debugging Machine (VS Project settings)") |
---|
[51] | 386 | IF (DESTINATION_ARCH STREQUAL "x64") |
---|
| 387 | SET(USERFILE_ENVIRONMENT "PATH=%OSG_X64%;%PATH%" CACHE STRING "Environment Variables that VS should merge on thy fly with system environment to run osgVisual (VS Project settings)") |
---|
| 388 | ENDIF () |
---|
[28] | 389 | |
---|
[51] | 390 | |
---|
[28] | 391 | # Only do this if one doesn't already exist |
---|
| 392 | SET (USER_FILE ${PROJECT_NAME}.vcproj.${SYSTEM_NAME}.${USER_NAME}.user) |
---|
| 393 | IF (NOT EXISTS "${USER_FILE}") |
---|
| 394 | message (STATUS "Creating ${USER_FILE} with default debug settings") |
---|
| 395 | # These are the configuration variables |
---|
| 396 | IF (CMAKE_GENERATOR MATCHES "Win64") |
---|
| 397 | SET (USERFILE_PLATFORM "x64") |
---|
| 398 | ELSE () |
---|
| 399 | SET (USERFILE_PLATFORM "Win32") |
---|
| 400 | ENDIF () |
---|
| 401 | |
---|
| 402 | # Configure the template file |
---|
| 403 | # MSC_VER 1300: MSC 13.0, VC 7.0, VS 2002 |
---|
| 404 | # MSC_VER 1310: MSC 13.1, VC 7.1, VS 2003 |
---|
| 405 | # MSC_VER 1400: MSC 14.0, VC 8.0, VS 2005 |
---|
| 406 | # MSC_VER 1500: MSC 15.0, VC 9.0, VS 2008 |
---|
| 407 | # MSC_VER 1600: MSC ??.0, VC 10.0, VS 2010 |
---|
| 408 | IF (MSVC_VERSION EQUAL 1400) |
---|
| 409 | CONFIGURE_FILE(VC80.vcproj.user.template ${USER_FILE} @ONLY) |
---|
| 410 | ENDIF() |
---|
| 411 | IF (MSVC_VERSION EQUAL 1500) |
---|
| 412 | CONFIGURE_FILE(VC90.vcproj.user.template ${USER_FILE} @ONLY) |
---|
| 413 | ENDIF() |
---|
| 414 | ELSE() |
---|
| 415 | message (STATUS "Userfile ${USER_FILE} already exist: Skipping") |
---|
| 416 | ENDIF() |
---|
| 417 | ENDIF() |
---|
| 418 | |
---|
| 419 | |
---|