#------------------------------------------------------------------- # This file is part of the CMake build system for Scol # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. #------------------------------------------------------------------- ############################################################ # Building so3engine project ############################################################ PROJECT(so3engine) message(STATUS "CMAKE SRC: ${CMAKE_CURRENT_SOURCE_DIR}") OPTION(SO3_USE_GLES "USE GLES2 ON WINDOWS" FALSE) if(APPLE) OPTION(SO3_USE_METAL "USE METAL ON APPLE" FALSE) endif(APPLE) if (NOT ANDROID) if (Scol_BUILD_WITH_QT) set(SCOL_USE_QT TRUE) elseif (Scol_BUILD_WITH_SDL) set(SCOL_USE_SDL TRUE) elseif (UNIX OR APPLE) # default set(SCOL_USE_QT TRUE) endif() endif(NOT ANDROID) if(WIN32) OPTION(SO3_BUILD_DEFERRED "BUILD_DEFERRED" FALSE) #SET (SO3_USE_DX11 FALSE CACHE BOOL "" FORCE) #SET (SO3_USE_GL3 FALSE CACHE BOOL "" FORCE) endif() find_package(Harfbuzz) find_package(OgreCrowd) # define header and source files for the library set (SO3ENGINE_RENDERER_HEADER_FILES include/SO3Renderer/SO3KeyboardHook.h include/SO3Renderer/SO3LogListener.h include/SO3Renderer/SO3Root.h include/SO3Renderer/SO3CompositorLogic.h include/SO3Renderer/SO3SsaoHandler.h include/SO3Renderer/SO3StereoManager.h include/SO3Renderer/SO3HdrHandler.h include/SO3Renderer/SO3ViewPort.h include/SO3Renderer/SO3Window.h include/SO3Renderer/SO3ScreenshotManager.h) set (SO3ENGINE_RENDERER_SOURCE_FILES src/SO3Renderer/SO3KeyboardHook.cpp src/SO3Renderer/SO3Root.cpp src/SO3Renderer/SO3SsaoHandler.cpp src/SO3Renderer/SO3StereoManager.cpp src/SO3Renderer/SO3HdrHandler.cpp src/SO3Renderer/SO3ViewPort.cpp src/SO3Renderer/SO3Window.cpp src/SO3Renderer/SO3ScreenshotManager.cpp) if (SO3_BUILD_DEFERRED) set (SO3ENGINE_RENDERER_DEFERRED_HEADER_FILES include/SO3Renderer/DeferredShading/SO3DeferredPermutation.h include/SO3Renderer/DeferredShading/SO3DeferredShading.h include/SO3Renderer/DeferredShading/SO3DeferredShadowManager.h include/SO3Renderer/DeferredShading/SO3MaterialGenerator.h) set (SO3ENGINE_RENDERER_DEFERRED_SOURCE_FILES src/SO3Renderer/DeferredShading/SO3DeferredShading.cpp src/SO3Renderer/DeferredShading/SO3DeferredShadowManager.cpp) set (SO3ENGINE_RENDERER_DEFERRED_COMPOSITORS_HEADER_FILES include/SO3Renderer/DeferredShading/SO3CompositorListenerLogic.h include/SO3Renderer/DeferredShading/SO3DeferredCompositor.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorAA.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorDebug.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorGBuffer.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorLighting.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorNFAA.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorShowDepth.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorShowDiffuse.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorShowEmissive.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorShowMaterialID.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorShowNormal.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorShowSpecular.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorShowVelocity.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorSSAA.h include/SO3Renderer/DeferredShading/SO3DeferredCompositorSSAO.h include/SO3Renderer/DeferredShading/SO3DeferredLightCompositionPass.h include/SO3Renderer/DeferredShading/SO3SSAOLogic.h) set (SO3ENGINE_RENDERER_DEFERRED_COMPOSITORS_SOURCE_FILES src/SO3Renderer/DeferredShading/SO3CompositorListenerLogic.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositor.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorAA.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorDebug.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorGBuffer.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorLighting.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorNFAA.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorShowDepth.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorShowDiffuse.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorShowEmissive.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorShowMaterialID.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorShowNormal.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorShowSpecular.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorShowVelocity.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorSSAA.cpp src/SO3Renderer/DeferredShading/SO3DeferredCompositorSSAO.cpp src/SO3Renderer/DeferredShading/SO3DeferredLightCompositionPass.cpp src/SO3Renderer/DeferredShading/SO3SSAOLogic.cpp) set (SO3ENGINE_RENDERER_DEFERRED_GBUFFERS_HEADER_FILES include/SO3Renderer/DeferredShading/SO3GBuffer.h include/SO3Renderer/DeferredShading/SO3GBufferHigh.h include/SO3Renderer/DeferredShading/SO3GBufferLow.h) set (SO3ENGINE_RENDERER_DEFERRED_GBUFFERS_SOURCE_FILES src/SO3Renderer/DeferredShading/SO3GBuffer.cpp src/SO3Renderer/DeferredShading/SO3GBufferHigh.cpp src/SO3Renderer/DeferredShading/SO3GBufferLow.cpp) set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_HEADER_FILES include/SO3Renderer/DeferredShading/SO3DeferredLight.h include/SO3Renderer/DeferredShading/SO3DeferredLightImpl.h include/SO3Renderer/DeferredShading/SO3DeferredLightManager.h include/SO3Renderer/DeferredShading/SO3DeferredLightMaterialGenerator.h include/SO3Renderer/DeferredShading/SO3DeferredLightPermutation.h) set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_SOURCE_FILES src/SO3Renderer/DeferredShading/SO3DeferredLight.cpp src/SO3Renderer/DeferredShading/SO3DeferredLightImpl.cpp src/SO3Renderer/DeferredShading/SO3DeferredLightManager.cpp src/SO3Renderer/DeferredShading/SO3DeferredLightMaterialGenerator.cpp src/SO3Renderer/DeferredShading/SO3DeferredLightPermutation.cpp) set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_AMBIENT_HEADER_FILES include/SO3Renderer/DeferredShading/SO3DeferredLightAmbient.h include/SO3Renderer/DeferredShading/SO3DeferredLightAmbientMaterialGenerator.h) set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_AMBIENT_SOURCE_FILES src/SO3Renderer/DeferredShading/SO3DeferredLightAmbient.cpp src/SO3Renderer/DeferredShading/SO3DeferredLightAmbientMaterialGenerator.cpp) set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_DIRECTIONAL_HEADER_FILES include/SO3Renderer/DeferredShading/SO3DeferredLightDirectional.h include/SO3Renderer/DeferredShading/SO3DeferredLightDirectionalMaterialGenerator.h) set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_DIRECTIONAL_SOURCE_FILES src/SO3Renderer/DeferredShading/SO3DeferredLightDirectional.cpp src/SO3Renderer/DeferredShading/SO3DeferredLightDirectionalMaterialGenerator.cpp) set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_POINT_HEADER_FILES include/SO3Renderer/DeferredShading/SO3DeferredLightPoint.h include/SO3Renderer/DeferredShading/SO3DeferredLightPointMaterialGenerator.h) set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_POINT_SOURCE_FILES src/SO3Renderer/DeferredShading/SO3DeferredLightPoint.cpp src/SO3Renderer/DeferredShading/SO3DeferredLightPointMaterialGenerator.cpp) set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_SPOT_HEADER_FILES include/SO3Renderer/DeferredShading/SO3DeferredLightSpot.h include/SO3Renderer/DeferredShading/SO3DeferredLightSpotMaterialGenerator.h) set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_SPOT_SOURCE_FILES src/SO3Renderer/DeferredShading/SO3DeferredLightSpot.cpp src/SO3Renderer/DeferredShading/SO3DeferredLightSpotMaterialGenerator.cpp) set (SO3ENGINE_RENDERER_DEFERRED_MATERIALS_HEADER_FILES include/SO3Renderer/DeferredShading/SO3GBufferMaterialGenerator.h include/SO3Renderer/DeferredShading/SO3GBufferMaterialPermutation.h include/SO3Renderer/DeferredShading/SO3GBufferSchemeHandler.h include/SO3Renderer/DeferredShading/SO3NoGBufferSchemeHandler.h) set (SO3ENGINE_RENDERER_DEFERRED_MATERIALS_SOURCE_FILES src/SO3Renderer/DeferredShading/SO3GBufferMaterialGenerator.cpp src/SO3Renderer/DeferredShading/SO3GBufferMaterialPermutation.cpp src/SO3Renderer/DeferredShading/SO3GBufferSchemeHandler.cpp src/SO3Renderer/DeferredShading/SO3NoGBufferSchemeHandler.cpp) else (SO3_BUILD_DEFERRED) set (SO3ENGINE_RENDERER_DEFERRED_HEADER_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_SOURCE_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_COMPOSITORS_HEADER_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_COMPOSITORS_SOURCE_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_GBUFFERS_HEADER_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_GBUFFERS_SOURCE_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_HEADER_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_SOURCE_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_AMBIENT_HEADER_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_AMBIENT_SOURCE_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_DIRECTIONAL_HEADER_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_DIRECTIONAL_SOURCE_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_POINT_HEADER_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_POINT_SOURCE_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_SPOT_HEADER_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_LIGHTS_SPOT_SOURCE_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_MATERIALS_HEADER_FILES "") set (SO3ENGINE_RENDERER_DEFERRED_MATERIALS_SOURCE_FILES "") endif (SO3_BUILD_DEFERRED) set (SO3ENGINE_RENDERER_LIGHTING_HEADER_FILES include/SO3Renderer/SO3LightingManager.h include/SO3Renderer/SO3Shadow.h include/SO3Renderer/SO3LightShaft.h include/SO3Renderer/SO3ShadowDeferred.h include/SO3Renderer/SO3ShadowLiSPSM.h include/SO3Renderer/SO3ShadowCSM.h include/SO3Renderer/SO3ShadowPSSM.h include/SO3Renderer/SO3ShadowManager.h include/SO3Renderer/SO3ShadowStencil.h) set (SO3ENGINE_RENDERER_LIGHTING_SOURCE_FILES src/SO3Renderer/SO3LightingManager.cpp src/SO3Renderer/SO3Shadow.cpp src/SO3Renderer/SO3LightShaft.cpp src/SO3Renderer/SO3ShadowDeferred.cpp src/SO3Renderer/SO3ShadowLiSPSM.cpp src/SO3Renderer/SO3ShadowCSM.cpp src/SO3Renderer/SO3ShadowPSSM.cpp src/SO3Renderer/SO3ShadowManager.cpp src/SO3Renderer/SO3ShadowStencil.cpp) set (SO3ENGINE_RENDERER_WIDGET_HEADER_FILES include/SO3Renderer/SO3Widget.h include/SO3Renderer/SO3WidgetFactory.h include/SO3Renderer/SO3WidgetListener.h include/SO3Renderer/SO3WidgetManager.h) set (SO3ENGINE_RENDERER_WIDGET_SOURCE_FILES src/SO3Renderer/SO3Widget.cpp src/SO3Renderer/SO3WidgetFactory.cpp src/SO3Renderer/SO3WidgetManager.cpp) set (SO3ENGINE_RENDERER_WIDGET_BITMAP_HEADER_FILES include/SO3Renderer/SO3BitmapWidget.h include/SO3Renderer/SO3BitmapWidgetFactory.h) set (SO3ENGINE_RENDERER_WIDGET_BITMAP_SOURCE_FILES src/SO3Renderer/SO3BitmapWidget.cpp src/SO3Renderer/SO3BitmapWidgetFactory.cpp) set (SO3ENGINE_RENDERER_WIDGET_WINDOW_HEADER_FILES include/SO3Renderer/SO3ObjWindowWidget.h include/SO3Renderer/SO3ObjWindowWidgetFactory.h) set (SO3ENGINE_RENDERER_WIDGET_WINDOW_SOURCE_FILES src/SO3Renderer/SO3ObjWindowWidget.cpp src/SO3Renderer/SO3ObjWindowWidgetFactory.cpp) set (SO3ENGINE_RENDERER_WIDGET_WEB_BROWSER_HEADER_FILES include/SO3Renderer/SO3WebNavigatorWidget.h include/SO3Renderer/SO3WebNavigatorWidgetFactory.h) set (SO3ENGINE_RENDERER_WIDGET_WEB_BROWSER_SOURCE_FILES src/SO3Renderer/SO3WebNavigatorWidget.cpp src/SO3Renderer/SO3WebNavigatorWidgetFactory.cpp) set (SO3ENGINE_SCENE_GRAPH_HEADER_FILES include/SO3SceneGraph/SO3Bone.h include/SO3SceneGraph/SO3Camera.h include/SO3SceneGraph/SO3Entity.h include/SO3SceneGraph/SO3Light.h include/SO3SceneGraph/SO3LineEntity.h include/SO3SceneGraph/SO3NodeScol.h include/SO3SceneGraph/SO3ParticleSystem.h include/SO3SceneGraph/SO3Physics.h include/SO3SceneGraph/SO3Scene.h include/SO3SceneGraph/SO3Skeleton.h include/SO3SceneGraph/SO3VirtualPointer.h include/SO3SceneGraph/SO3Recast.h include/SO3SceneGraph/SO3Terrain.h) set (SO3ENGINE_SCENE_GRAPH_SOURCE_FILES src/SO3SceneGraph/SO3Bone.cpp src/SO3SceneGraph/SO3Camera.cpp src/SO3SceneGraph/SO3Entity.cpp src/SO3SceneGraph/SO3Light.cpp src/SO3SceneGraph/SO3LineEntity.cpp src/SO3SceneGraph/SO3NodeScol.cpp src/SO3SceneGraph/SO3ParticleSystem.cpp src/SO3SceneGraph/SO3Physics.cpp src/SO3SceneGraph/SO3Scene.cpp src/SO3SceneGraph/SO3Skeleton.cpp src/SO3SceneGraph/SO3VirtualPointer.cpp src/SO3SceneGraph/SO3Recast.cpp src/SO3SceneGraph/SO3Terrain.cpp) set (SO3ENGINE_SCENE_GRAPH_ENVIRONMENT_HEADER_FILES include/SO3SceneGraph/SO3Environment.h include/SO3SceneGraph/SO3EnvironmentComponent.h include/SO3SceneGraph/SO3Moon.h include/SO3SceneGraph/SO3Sky.h include/SO3SceneGraph/SO3SkyAstronomicalModel.h include/SO3SceneGraph/SO3SkyLight.h include/SO3SceneGraph/SO3Sun.h include/SO3SceneGraph/SO3Water.h) set (SO3ENGINE_SCENE_GRAPH_ENVIRONMENT_SOURCE_FILES src/SO3SceneGraph/SO3Environment.cpp src/SO3SceneGraph/SO3EnvironmentComponent.cpp src/SO3SceneGraph/SO3Moon.cpp src/SO3SceneGraph/SO3Sky.cpp src/SO3SceneGraph/SO3SkyAstronomicalModel.cpp src/SO3SceneGraph/SO3SkyLight.cpp src/SO3SceneGraph/SO3Sun.cpp src/SO3SceneGraph/SO3Water.cpp) set (SO3ENGINE_SCENE_GRAPH_SELECTOR_BUFFER_HEADER_FILES include/SO3SceneGraph/SO3SubEntitySelectorBuffer.h include/SO3SceneGraph/SO3SubEntityCameraSelectorBuffer.h include/SO3SceneGraph/SO3SubEntitySelectorMaterialSwitcher.h) set (SO3ENGINE_SCENE_GRAPH_SELECTOR_BUFFER_SOURCE_FILES src/SO3SceneGraph/SO3SubEntitySelectorBuffer.cpp src/SO3SceneGraph/SO3SubEntityCameraSelectorBuffer.cpp src/SO3SceneGraph/SO3SubEntitySelectorMaterialSwitcher.cpp) if (WIN32) file (GLOB SO3ENGINE_WEB_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/SO3Web/*.cpp) file (GLOB SO3ENGINE_WEB_HEADER_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/SO3Web/*.h) endif() file (GLOB SO3ENGINE_EXTERNAL_OGRENEWT_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/External/ogrenewt/*.cpp) file (GLOB SO3ENGINE_EXTERNAL_OGRENEWT_HEADER_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/External/ogrenewt/*.h) file (GLOB SO3ENGINE_BASIC_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/SCOLBasic/*.cpp) file (GLOB SO3ENGINE_BASIC_HEADER_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/SCOLBasic/*.h) if (Scol_STATIC) set (SO3ENGINE_BASIC_HEADER_FILES ${SO3ENGINE_BASIC_HEADER_FILES} include/loadScolSO3Engine.h) endif() # remove platform includes if (WIN32) list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3Linux.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3Android.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3OSX.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3IOS.h") elseif (ANDROID) list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3Linux.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3MsWindows.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3OSX.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3IOS.h") elseif (APPLE AND NOT APPLE_IOS) list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3Linux.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3MsWindows.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3Linux.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3IOS.h") elseif (APPLE_IOS) list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3Linux.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3MsWindows.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3OSX.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3Linux.h") else() list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3MsWindows.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3Android.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3OSX.h") list(REMOVE_ITEM SO3ENGINE_BASIC_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SCOLBasic/SO3IOS.h") endif() file (GLOB SO3ENGINE_BINDING_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/SCOLPack/*.cpp) file (GLOB SO3ENGINE_BINDING_HEADER_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/SCOLPack/*.h) file (GLOB SO3ENGINE_ANIMATION_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/SO3Animation/*.cpp) file (GLOB SO3ENGINE_ANIMATION_HEADER_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/SO3Animation/*.h) file (GLOB SO3ENGINE_MATERIAL_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/SO3Material/*.cpp) file (GLOB SO3ENGINE_MATERIAL_HEADER_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/SO3Material/*.h) file (GLOB SO3ENGINE_PHYSIC_GRAPH_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/SO3PhysicGraph/*.cpp) file (GLOB SO3ENGINE_PHYSIC_GRAPH_HEADER_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/SO3PhysicGraph/*.h) file (GLOB SO3ENGINE_SCENE_GRAPH_SELECTOR_BUFFER_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/SO3SceneGraph/*.cpp) file (GLOB SO3ENGINE_SCENE_GRAPH_SELECTOR_BUFFER_HEADER_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/SO3SceneGraph/*.h) file (GLOB SO3ENGINE_UTILS_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/SO3Utils/*.cpp) file (GLOB SO3ENGINE_UTILS_HEADER_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/SO3Utils/*.h) file (GLOB SO3ENGINE_SCENE_LOADER_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} src/SO3SceneLoader/*.cpp) file (GLOB SO3ENGINE_SCENE_LOADER_HDRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} include/SO3SceneLoader/*.h) # This is how visual studio directories (or filters) are generated. source_group(Header\ Files\\External\\OgreNewt FILES ${SO3ENGINE_EXTERNAL_OGRENEWT_HEADER_FILES}) source_group(Header\ Files\\External\\Stereoscopy FILES ${SO3ENGINE_EXTERNAL_STEREO_HEADER_FILES}) source_group(Header\ Files\\External\\stbi FILES ${SO3ENGINE_EXTERNAL_STBI_HEADER_FILES}) source_group(Header\ Files\\Common FILES ${SO3ENGINE_BASIC_HEADER_FILES}) source_group(Header\ Files\\ScolBindings FILES ${SO3ENGINE_BINDING_HEADER_FILES}) source_group(Header\ Files\\Animations FILES ${SO3ENGINE_ANIMATION_HEADER_FILES}) source_group(Header\ Files\\Materials FILES ${SO3ENGINE_MATERIAL_HEADER_FILES}) source_group(Header\ Files\\Physics FILES ${SO3ENGINE_PHYSIC_GRAPH_HEADER_FILES}) source_group(Header\ Files\\Rendering FILES ${SO3ENGINE_RENDERER_HEADER_FILES}) if (SO3_BUILD_DEFERRED) source_group(Header\ Files\\Rendering\\Deferred FILES ${SO3ENGINE_RENDERER_DEFERRED_HEADER_FILES}) source_group(Header\ Files\\Rendering\\Deferred\\Compositors FILES ${SO3ENGINE_RENDERER_DEFERRED_COMPOSITORS_HEADER_FILES}) source_group(Header\ Files\\Rendering\\Deferred\\GBuffers FILES ${SO3ENGINE_RENDERER_DEFERRED_GBUFFERS_HEADER_FILES}) source_group(Header\ Files\\Rendering\\Deferred\\Lights FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_HEADER_FILES}) source_group(Header\ Files\\Rendering\\Deferred\\Lights\\Ambient FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_AMBIENT_HEADER_FILES}) source_group(Header\ Files\\Rendering\\Deferred\\Lights\\Directional FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_DIRECTIONAL_HEADER_FILES}) source_group(Header\ Files\\Rendering\\Deferred\\Lights\\Point FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_POINT_HEADER_FILES}) source_group(Header\ Files\\Rendering\\Deferred\\Lights\\Spot FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_SPOT_HEADER_FILES}) source_group(Header\ Files\\Rendering\\Deferred\\Materials FILES ${SO3ENGINE_RENDERER_DEFERRED_MATERIALS_HEADER_FILES}) endif(SO3_BUILD_DEFERRED) source_group(Header\ Files\\Rendering\\Lighting FILES ${SO3ENGINE_RENDERER_LIGHTING_HEADER_FILES}) source_group(Header\ Files\\Rendering\\Widgets FILES ${SO3ENGINE_RENDERER_WIDGET_HEADER_FILES}) source_group(Header\ Files\\Rendering\\Widgets\\Bitmap FILES ${SO3ENGINE_RENDERER_WIDGET_BITMAP_HEADER_FILES}) source_group(Header\ Files\\Scene FILES ${SO3ENGINE_SCENE_GRAPH_HEADER_FILES}) source_group(Header\ Files\\Scene\\Environment FILES ${SO3ENGINE_SCENE_GRAPH_ENVIRONMENT_HEADER_FILES}) source_group(Header\ Files\\Scene\\SelectorBuffer FILES ${SO3ENGINE_SCENE_GRAPH_SELECTOR_BUFFER_HEADER_FILES}) source_group(Header\ Files\\Utils FILES ${SO3ENGINE_UTILS_HEADER_FILES}) source_group(Header\ Files\\SceneLoader FILES ${SO3ENGINE_SCENE_LOADER_HDRS}) if (WIN32) source_group(Header\ Files\\Rendering\\Widgets\\Window FILES ${SO3ENGINE_RENDERER_WIDGET_WINDOW_HEADER_FILES}) source_group(Header\ Files\\Rendering\\Widgets\\Web FILES ${SO3ENGINE_RENDERER_WIDGET_WEB_BROWSER_HEADER_FILES}) source_group(Header\ Files\\Web FILES ${SO3ENGINE_WEB_HEADER_FILES}) endif() # Same thing for sources files source_group(Source\ Files\\External\\OgreNewt FILES ${SO3ENGINE_EXTERNAL_OGRENEWT_SOURCE_FILES}) source_group(Source\ Files\\External\\Stereoscopy FILES ${SO3ENGINE_EXTERNAL_STEREO_SOURCE_FILES}) source_group(Source\ Files\\Common FILES ${SO3ENGINE_BASIC_SOURCE_FILES}) source_group(Source\ Files\\ScolBindings FILES ${SO3ENGINE_BINDING_SOURCE_FILES}) source_group(Source\ Files\\Animations FILES ${SO3ENGINE_ANIMATION_SOURCE_FILES}) source_group(Source\ Files\\Materials FILES ${SO3ENGINE_MATERIAL_SOURCE_FILES}) source_group(Source\ Files\\Physics FILES ${SO3ENGINE_PHYSIC_GRAPH_SOURCE_FILES}) source_group(Source\ Files\\Rendering FILES ${SO3ENGINE_RENDERER_SOURCE_FILES}) if (SO3_BUILD_DEFERRED) source_group(Source\ Files\\Rendering\\Deferred FILES ${SO3ENGINE_RENDERER_DEFERRED_SOURCE_FILES}) source_group(Source\ Files\\Rendering\\Deferred\\Compositors FILES ${SO3ENGINE_RENDERER_DEFERRED_COMPOSITORS_SOURCE_FILES}) source_group(Source\ Files\\Rendering\\Deferred\\GBuffers FILES ${SO3ENGINE_RENDERER_DEFERRED_GBUFFERS_SOURCE_FILES}) source_group(Source\ Files\\Rendering\\Deferred\\Lights FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_SOURCE_FILES}) source_group(Source\ Files\\Rendering\\Deferred\\Lights\\Ambient FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_AMBIENT_SOURCE_FILES}) source_group(Source\ Files\\Rendering\\Deferred\\Lights\\Directional FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_DIRECTIONAL_SOURCE_FILES}) source_group(Source\ Files\\Rendering\\Deferred\\Lights\\Point FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_POINT_SOURCE_FILES}) source_group(Source\ Files\\Rendering\\Deferred\\Lights\\Spot FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_SPOT_SOURCE_FILES}) source_group(Source\ Files\\Rendering\\Deferred\\Materials FILES ${SO3ENGINE_RENDERER_DEFERRED_MATERIALS_SOURCE_FILES}) endif(SO3_BUILD_DEFERRED) source_group(Source\ Files\\Rendering\\Lighting FILES ${SO3ENGINE_RENDERER_LIGHTING_SOURCE_FILES}) source_group(Source\ Files\\Rendering\\Widgets FILES ${SO3ENGINE_RENDERER_WIDGET_SOURCE_FILES}) source_group(Source\ Files\\Rendering\\Widgets\\Bitmap FILES ${SO3ENGINE_RENDERER_WIDGET_BITMAP_SOURCE_FILES}) source_group(Source\ Files\\Scene FILES ${SO3ENGINE_SCENE_GRAPH_SOURCE_FILES}) source_group(Source\ Files\\Scene\\Environment FILES ${SO3ENGINE_SCENE_GRAPH_ENVIRONMENT_SOURCE_FILES}) source_group(Source\ Files\\Scene\\SelectorBuffer FILES ${SO3ENGINE_SCENE_GRAPH_SELECTOR_BUFFER_SOURCE_FILES}) source_group(Source\ Files\\Utils FILES ${SO3ENGINE_UTILS_SOURCE_FILES}) source_group(Source\ Files\\SceneLoader FILES ${SO3ENGINE_SCENE_LOADER_SRCS}) if (WIN32) source_group(Source\ Files\\Rendering\\Widgets\\Window FILES ${SO3ENGINE_RENDERER_WIDGET_WINDOW_SOURCE_FILES}) source_group(Source\ Files\\Rendering\\Widgets\\Web FILES ${SO3ENGINE_RENDERER_WIDGET_WEB_BROWSER_SOURCE_FILES}) source_group(Source\ Files\\Web FILES ${SO3ENGINE_WEB_SOURCE_FILES}) endif() if(APPLE AND SO3_USE_METAL) add_definitions(-DSO3_USE_METAL) endif() if(SO3_USE_GLES OR ANDROID OR RPI OR APPLE_IOS) add_definitions(-DSO3_USE_OPENGLES2) endif() if (SO3_USE_DX11 AND WIN32) add_definitions(-DSO3_USE_DX11) find_host_package(DirectX11 REQUIRED) endif() if (SO3_USE_GL3 AND WIN32) add_definitions(-DSO3_USE_GL3) endif() if (SCOL_USE_QT) add_definitions(-DSCOL_QT) elseif (SCOL_USE_SDL) add_definitions(-DSCOL_SDL) endif () if (SO3_BUILD_DEFERRED) add_definitions(-DSO3_BUILD_DEFERRED) endif (SO3_BUILD_DEFERRED) # Add definition for P4 optimizations, warnings removal. if (WIN32) add_definitions(-DOPTI_P4 -D_CRT_SECURE_NO_WARNINGS -DSO3_DEVELOPPER_BUILD -DSO3_STATIC_BUILD -DSO3_NON_CLIENT_BUILD -DSO3_PLUGIN_WEBNAVIGATOR_NON_CLIENT_BUILD -DDG_DISABLE_ASSERT -DHYDRAX_STATIC_LIB -DSKYX_STATIC_LIB -DASSIMP_STATIC_LIB -D_MT -D_USRDLL) #Newton add_definitions(-D_NEWTON_USE_LIB -D_NEWTON_STATIC_LIB -D_CNEWTON_STATIC_LIB -DPTW32_STATIC_LIB -D_CUSTOM_JOINTS_STATIC_LIB) else() add_definitions(-D_CRT_SECURE_NO_WARNINGS -DSO3_DEVELOPPER_BUILD -DSO3_STATIC_BUILD -DSO3_NON_CLIENT_BUILD -DDG_DISABLE_ASSERT -DHYDRAX_STATIC_LIB -DSKYX_STATIC_LIB -DASSIMP_STATIC_LIB) #Newton add_definitions(-D_NEWTON_USE_LIB -D_NEWTON_STATIC_LIB -D_CNEWTON_STATIC_LIB -D_CUSTOM_JOINTS_STATIC_LIB) endif() if (MSVC_VERSION GREATER 1500 OR MSVC_VERSION EQUAL 1500) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") endif() if(MSVC_VERSION GREATER 1400 OR MSVC_VERSION EQUAL 1400) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm256") endif() #if (ANDROID) # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_USE_PLATFORM_ANDROID_KHR") #endif() if (WIN32) set(SO3ENGINE_PLATFORM_FEATURES ${SO3ENGINE_RENDERER_WIDGET_WINDOW_HEADER_FILES} ${SO3ENGINE_RENDERER_WIDGET_WINDOW_SOURCE_FILES} ${SO3ENGINE_RENDERER_WIDGET_WEB_BROWSER_HEADER_FILES} ${SO3ENGINE_RENDERER_WIDGET_WEB_BROWSER_SOURCE_FILES} ${SO3ENGINE_WEB_HEADER_FILES} ${SO3ENGINE_WEB_SOURCE_FILES} ) else() set(SO3ENGINE_PLATFORM_FEATURES) endif() #link_directories(${Scol_DEPENDENCIES_DIR}/lib) # setup Scol lib3d target add_library(so3engine ${Scol_LIB_TYPE} ${SO3ENGINE_EXTERNAL_OGRENEWT_HEADER_FILES} ${SO3ENGINE_EXTERNAL_OGRENEWT_SOURCE_FILES} ${SO3ENGINE_EXTERNAL_STEREO_HEADER_FILES} ${SO3ENGINE_EXTERNAL_STEREO_SOURCE_FILES} ${SO3ENGINE_EXTERNAL_STBI_HEADER_FILES} ${SO3ENGINE_BASIC_HEADER_FILES} ${SO3ENGINE_BASIC_SOURCE_FILES} ${SO3ENGINE_BINDING_HEADER_FILES} ${SO3ENGINE_BINDING_SOURCE_FILES} ${SO3ENGINE_ANIMATION_HEADER_FILES} ${SO3ENGINE_ANIMATION_SOURCE_FILES} ${SO3ENGINE_MATERIAL_HEADER_FILES} ${SO3ENGINE_MATERIAL_SOURCE_FILES} ${SO3ENGINE_PHYSIC_GRAPH_HEADER_FILES} ${SO3ENGINE_PHYSIC_GRAPH_SOURCE_FILES} ${SO3ENGINE_RENDERER_HEADER_FILES} ${SO3ENGINE_RENDERER_SOURCE_FILES} ${SO3ENGINE_RENDERER_DEFERRED_HEADER_FILES} ${SO3ENGINE_RENDERER_DEFERRED_SOURCE_FILES} ${SO3ENGINE_RENDERER_DEFERRED_COMPOSITORS_HEADER_FILES} ${SO3ENGINE_RENDERER_DEFERRED_COMPOSITORS_SOURCE_FILES} ${SO3ENGINE_RENDERER_DEFERRED_GBUFFERS_HEADER_FILES} ${SO3ENGINE_RENDERER_DEFERRED_GBUFFERS_SOURCE_FILES} ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_HEADER_FILES} ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_SOURCE_FILES} ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_AMBIENT_HEADER_FILES} ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_AMBIENT_SOURCE_FILES} ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_DIRECTIONAL_HEADER_FILES} ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_DIRECTIONAL_SOURCE_FILES} ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_POINT_HEADER_FILES} ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_POINT_SOURCE_FILES} ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_SPOT_HEADER_FILES} ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_SPOT_SOURCE_FILES} ${SO3ENGINE_RENDERER_DEFERRED_MATERIALS_HEADER_FILES} ${SO3ENGINE_RENDERER_DEFERRED_MATERIALS_SOURCE_FILES} ${SO3ENGINE_RENDERER_LIGHTING_HEADER_FILES} ${SO3ENGINE_RENDERER_LIGHTING_SOURCE_FILES} ${SO3ENGINE_RENDERER_WIDGET_HEADER_FILES} ${SO3ENGINE_RENDERER_WIDGET_SOURCE_FILES} ${SO3ENGINE_RENDERER_WIDGET_BITMAP_HEADER_FILES} ${SO3ENGINE_RENDERER_WIDGET_BITMAP_SOURCE_FILES} ${SO3ENGINE_SCENE_GRAPH_HEADER_FILES} ${SO3ENGINE_SCENE_GRAPH_SOURCE_FILES} ${SO3ENGINE_SCENE_GRAPH_ENVIRONMENT_HEADER_FILES} ${SO3ENGINE_SCENE_GRAPH_ENVIRONMENT_SOURCE_FILES} ${SO3ENGINE_SCENE_GRAPH_SELECTOR_BUFFER_HEADER_FILES} ${SO3ENGINE_SCENE_GRAPH_SELECTOR_BUFFER_SOURCE_FILES} ${SO3ENGINE_UTILS_HEADER_FILES} ${SO3ENGINE_UTILS_SOURCE_FILES} ${SO3ENGINE_SCENE_LOADER_SRCS} ${SO3ENGINE_SCENE_LOADER_HDRS} ${SO3ENGINE_PLATFORM_FEATURES} ) add_dependencies(so3engine kernel) scol_include_plugin("SO3ENGINE" "${PROJECT_SOURCE_DIR}/include" "loadScolSO3Engine.h") # Add directories includes if(WIN32) if(NOT SO3_USE_DX11) target_include_directories(so3engine PUBLIC include ${OPENGLES2_INCLUDE_DIRS} ${DirectX9_INCLUDE_DIR} ${OGRE_INCLUDE_DIRS} ${SKYX_INCLUDE_DIRS} ${HYDRAX_INCLUDE_DIRS} ${NEWTON_INCLUDE_DIRS} ${CEF_INCLUDE_DIRS}) else() target_include_directories(so3engine PUBLIC include ${OPENGLES2_INCLUDE_DIRS} ${DirectX11_INCLUDE_DIR} ${OGRE_INCLUDE_DIRS} ${SKYX_INCLUDE_DIRS} ${HYDRAX_INCLUDE_DIRS} ${NEWTON_INCLUDE_DIRS} ${CEF_INCLUDE_DIRS}) endif() elseif(ANDROID OR APPLE_IOS OR RPI) target_include_directories(so3engine PUBLIC include ${OPENGLES2_INCLUDE_DIRS} ${OGRE_INCLUDE_DIRS} ${SKYX_INCLUDE_DIRS} ${HYDRAX_INCLUDE_DIRS} ${NEWTON_INCLUDE_DIRS}) else() if (APPLE) find_package(Cg) target_include_directories(so3engine PUBLIC include ${OGRE_INCLUDE_DIRS} ${SKYX_INCLUDE_DIRS} ${HYDRAX_INCLUDE_DIRS} ${NEWTON_INCLUDE_DIRS} ${Cg_INCLUDE_DIRS}) else(APPLE) target_include_directories(so3engine PUBLIC include ${OGRE_INCLUDE_DIRS} ${SKYX_INCLUDE_DIRS} ${HYDRAX_INCLUDE_DIRS} ${NEWTON_INCLUDE_DIRS}) endif(APPLE) endif(WIN32) # set the dll version. #set_target_properties(so3engine PROPERTIES VERSION ${Scol_VERSION} SOVERSION ${Scol_VERSION_MAJOR}) # Link dependencies set(SO3LIBRARIES "") if (WIN32 AND NOT ANDROID) if(NOT WIN64) if(NOT SO3_USE_DX11) find_package(DirectX) find_library(DirectX9_SETUP_LIBRARY NAMES dsetup HINTS ${DirectX9_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX9_LIBPATH_SUFFIX}) set(SO3LIBRARIES ${DirectX9_SETUP_LIBRARY} ${DirectX9_LIBRARIES}) else(NOT SO3_USE_DX11) #find_library(DirectX9_SETUP_LIBRARY NAMES dsetup HINTS ${DirectX9_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX9_LIBPATH_SUFFIX}) set(SO3LIBRARIES ${DirectX11_LIBRARIES}) endif(NOT SO3_USE_DX11) else (NOT WIN64) if(NOT SO3_USE_DX11) set(SO3LIBRARIES ${DirectX9_LIBRARIES}) else(NOT SO3_USE_DX11) set(SO3LIBRARIES ${DirectX11_LIBRARIES}) endif(NOT SO3_USE_DX11) endif (NOT WIN64) set(SO3LIBRARIES ${SO3LIBRARIES} version.lib ${SKYX_LIBRARIES} ${HYDRAX_LIBRARIES} OgreCrowd::OgreCrowd ${OGRE_LIBRARIES} ${FREETYPE_LIBRARIES} ${Boost_LIBRARIES} ${NEWTON_LIBRARIES} ${CEF_LIBRARIES} assimp::assimp ${OPENGLES2_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${HARFBUZZ_LIBRARIES}) else() if(ANDROID OR APPLE_IOS OR RPI) set(SO3LIBRARIES ${OPENGLES2_LIBRARIES}) endif() set(SO3LIBRARIES ${SO3LIBRARIES} ${SKYX_LIBRARIES} ${HYDRAX_LIBRARIES} OgreCrowd::OgreCrowd ${NEWTON_LIBRARIES} assimp::assimp ${OGRE_LIBRARIES} ${FREETYPE_LIBRARIES} ${PNG_LIBRARIES} ${ZZip_LIBRARIES} ${ZLIB_LIBRARIES} ${Boost_LIBRARIES}) if (UNIX AND NOT APPLE AND NOT ANDROID) if(NOT OPENGL_glx_LIBRARY) set(OPENGL_glx_LIBRARY ${OPENGL_gl_LIBRARY}) endif() set(SO3LIBRARIES ${SO3LIBRARIES} -lX11 -lXt -lXaw ${OPENGL_glx_LIBRARY}) endif() if (RPI) set(SO3LIBRARIES ${SO3LIBRARIES} -latomic -ldrm -lgbm) endif() if (UNIX AND NOT APPLE AND NOT ANDROID) set(SO3LIBRARIES ${SO3LIBRARIES} -lXrandr) endif() endif() if (SCOL_USE_QT) if (NOT Qt5Widgets_FOUND) #find_host_package(Qt5 COMPONENTS Widgets REQUIRED) set(QtModule "Widgets") find_host_package(Qt5 REQUIRED) endif() set(SO3LIBRARIES ${SO3LIBRARIES} Qt5::Widgets ${Qt5Widgets_STATIC_DEPS}) set_target_properties(so3engine PROPERTIES AUTOMOC ON) elseif(SCOL_USE_SDL) if (NOT SDL2_FOUND) find_host_package(SDL2 REQUIRED) endif() set(SO3LIBRARIES ${SO3LIBRARIES} ${SDL2_LIBRARIES}) include_directories(${SDL2_INCLUDE_DIRS}) endif() if (ANDROID) set(SO3LIBRARIES ${SO3LIBRARIES} ndk_helper log android cpufeatures native_app_glue) # if (ANDROID_NSIGHT) # set(SO3LIBDIR "${ENV_SCOL_DEPENDENCIES_PATH}/sdk/android/${ANDROID_ABI}/lib") # set(SO3LIBRARIES ${SO3LIBRARIES} "${SO3LIBDIR}/libTegra_gfx_debugger.a") # set(Scol_ANDROID_SHARED_LIBS ${Scol_ANDROID_SHARED_LIBS} "${SO3LIBDIR}/libEGL_tgd.so" "${SO3LIBDIR}/libGLESv1_CM_tgd.so" "${SO3LIBDIR}/libGLESv2_tgd.so" "${SO3LIBDIR}/libNvPmApi.Core.so" "${SO3LIBDIR}/libTegra_gfx_debugger.so" CACHE INTERNAL "" FORCE) # endif() set(Scol_ANDROID_DEPENDENCIES ${Scol_ANDROID_DEPENDENCIES} so3engine CACHE INTERNAL "" FORCE) message(STATUS "[${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}] Scol_ANDROID_DEPENDENCIES: ${Scol_ANDROID_DEPENDENCIES} -- added so3engine to android project deps") endif() #message ("SO3LIBRARIES libs : ${SO3LIBRARIES}") # Linking target_link_libraries(so3engine ${SO3LIBRARIES}) if (APPLE AND NOT APPLE_IOS) set_target_properties(so3engine PROPERTIES LINK_FLAGS "-framework Cocoa -framework Carbon -framework OpenGL") endif() # install Scol so3engine scol_config_plugin(so3engine) #if (WIN32) #install(FILES ${SO3ENGINE_WEB_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Web) #install(FILES ${SO3ENGINE_RENDERER_WIDGET_WINDOW_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer) #install(FILES ${SO3ENGINE_RENDERER_WIDGET_WEB_BROWSER_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer) #endif() #install(FILES ${SO3ENGINE_EXTERNAL_OGRENEWT_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/external/ogrenewt) #install(FILES ${SO3ENGINE_EXTERNAL_STEREO_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/external/stereoscopy) #install(FILES ${SO3ENGINE_EXTERNAL_STBI_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/external/stbi) #install(FILES ${SO3ENGINE_BASIC_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/ScolBasic) #install(FILES ${SO3ENGINE_BINDING_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/ScolPack) #install(FILES ${SO3ENGINE_ANIMATION_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Animation) #install(FILES ${SO3ENGINE_MATERIAL_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Material) #install(FILES ${SO3ENGINE_PHYSIC_GRAPH_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3PhysicGraph) #install(FILES ${SO3ENGINE_RENDERER_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer) #if (SO3_BUILD_DEFERRED) #install(FILES ${SO3ENGINE_RENDERER_DEFERRED_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer/DeferredShading) #install(FILES ${SO3ENGINE_RENDERER_DEFERRED_COMPOSITORS_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer/DeferredShading) #install(FILES ${SO3ENGINE_RENDERER_DEFERRED_GBUFFERS_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer/DeferredShading) #install(FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer/DeferredShading) #install(FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_AMBIENT_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer/DeferredShading) #install(FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_DIRECTIONAL_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer/DeferredShading) #install(FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_POINT_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer/DeferredShading) #install(FILES ${SO3ENGINE_RENDERER_DEFERRED_LIGHTS_SPOT_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer/DeferredShading) #install(FILES ${SO3ENGINE_RENDERER_DEFERRED_MATERIALS_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer/DeferredShading) #endif(SO3_BUILD_DEFERRED) #install(FILES ${SO3ENGINE_RENDERER_LIGHTING_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer) #install(FILES ${SO3ENGINE_RENDERER_WIDGET_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer) #install(FILES ${SO3ENGINE_RENDERER_WIDGET_BITMAP_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Renderer) #install(FILES ${SO3ENGINE_SCENE_GRAPH_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3SceneGraph) #install(FILES ${SO3ENGINE_SCENE_GRAPH_ENVIRONMENT_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3SceneGraph) #install(FILES ${SO3ENGINE_SCENE_GRAPH_SELECTOR_BUFFER_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3SceneGraph) #install(FILES ${SO3ENGINE_UTILS_HEADER_FILES} DESTINATION include/SCOL/plugins/so3engine/SO3Utils) #install(FILES ${SO3ENGINE_SCENE_LOADER_HDRS} DESTINATION include/SCOL/plugins/so3engine/SO3SceneLoader)