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