2 IF(OSG_OGL_COREONLY AND NOT OSG_CHECK_COREONLY)
6 PROJECT(OpenSGExamplesAdvancedDeferredShading)
8 MESSAGE(STATUS "Building ${PROJECT_NAME} integrated")
10 #############################################################################
13 FILE(GLOB SRCFILES "*.cpp")
15 #############################################################################
18 SET(OSG_COMPONENTS OSGBase
19 OSGContribTrapezoidalShadowMaps
33 LIST(APPEND OSG_COMPONENTS OSGWindowCocoa)
35 LIST(APPEND OSG_COMPONENTS OSGWindowX)
40 LIST(APPEND OSG_COMPONENTS OSGWindowWIN32)
47 SET(OSG_EXTERNAL_COMPONENTS Boost GLUT)
52 FOREACH(OSGDEP ${OSG_COMPONENTS})
53 IF(NOT EXISTS "${CMAKE_BINARY_DIR}/${OSGDEP}.cmake")
54 MESSAGE(FATAL_ERROR "Dependency (${OSGDEP}) not found, "
55 "can not build ${PROJECT_NAME}\n")
57 ENDIF(NOT EXISTS "${CMAKE_BINARY_DIR}/${OSGDEP}.cmake")
59 INCLUDE("${CMAKE_BINARY_DIR}/${OSGDEP}.cmake")
60 INCLUDE_DIRECTORIES(${${OSGDEP}_INC})
63 FOREACH(OSGEXTDEP ${OSG_EXTERNAL_COMPONENTS})
64 IF(NOT ${OSGEXTDEP}_FOUND)
65 MESSAGE(FATAL_ERROR "Dependency (${OSGEXTDEP}) not found, "
66 "can not build ${PROJECT_NAME}\n")
70 INCLUDE_DIRECTORIES(SYSTEM ${${OSGEXTDEP}_INCLUDE_DIR})
74 #############################################################################
77 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
79 FOREACH(GLOBAL_INC ${OSG_GLOBAL_DEP_INCDIR})
80 INCLUDE_DIRECTORIES(${${GLOBAL_INC}})
83 ADD_DEFINITIONS(-D OSG_BUILD_INTEGRATED)
85 FOREACH(SRC ${SRCFILES})
87 GET_FILENAME_COMPONENT(EXE ${SRC} NAME_WE)
89 ADD_EXECUTABLE(${EXE} ${OSGEXCLUDE_EXAMPLES_ADVANCED}
90 ${SRC} ${OSG_ADD_GLOBAL_EXE_SRC})
92 ADD_DEPENDENCIES(OSGAllAdvancedExamples ${EXE})
94 FOREACH(OSGDEP ${OSG_COMPONENTS})
95 ADD_DEPENDENCIES(${EXE} ${OSGDEP})
97 TARGET_LINK_LIBRARIES(${EXE} ${OSGDEP})
101 SET_PROPERTY(TARGET ${EXE} PROPERTY FOLDER "Examples/Advanced")
105 IF(OSG_INSTALL_EXAMPLES_EXE)
107 INSTALL(TARGETS ${EXE}
108 CONFIGURATIONS Release
109 RUNTIME DESTINATION share/OpenSG/Examples/Advanced/DeferredShading/bin/rel)
110 INSTALL(TARGETS ${EXE}
112 RUNTIME DESTINATION share/OpenSG/Examples/Advanced/DeferredShading/bin/debug)
113 INSTALL(TARGETS ${EXE}
114 CONFIGURATIONS ReleaseNoOpt
115 RUNTIME DESTINATION share/OpenSG/Examples/Advanced/DeferredShading/bin/relnoopt)
116 INSTALL(TARGETS ${EXE}
117 CONFIGURATIONS DebugOpt
118 RUNTIME DESTINATION share/OpenSG/Examples/Advanced/DeferredShading/bin/debugopt)
120 INSTALL(TARGETS ${EXE}
121 DESTINATION share/OpenSG/Examples/Advanced/DeferredShading
122 COMPONENT examples_advanced)
124 INSTALL(TARGETS ${EXE}
125 CONFIGURATIONS Release
126 DESTINATION share/OpenSG/Examples/Advanced/DeferredShading/bin
127 COMPONENT examples_advanced)
129 INSTALL(TARGETS ${EXE}
131 DESTINATION share/OpenSG/Examples/Advanced/DeferredShading/bin/debug
132 COMPONENT examples_advanced)
134 INSTALL(TARGETS ${EXE}
135 CONFIGURATIONS DebugGV
136 DESTINATION share/OpenSG/Examples/Advanced/DeferredShading/bin/debug
137 COMPONENT examples_advanced)
140 IF(OSG_INSTALL_EXAMPLES)
141 INSTALL(FILES "${SRC}"
142 DESTINATION share/OpenSG/Examples/Advanced/DeferredShading
143 COMPONENT examples_advanced)
148 IF(OSG_INSTALL_EXAMPLES)
149 INSTALL(FILES CMakeLists.standalone.txt
150 DESTINATION share/OpenSG/Examples/Advanced/DeferredShading
151 RENAME CMakeLists.txt
152 COMPONENT examples_advanced)
154 FILE(GLOB GLSLFILES "*.glsl")
155 INSTALL(FILES ${GLSLFILES}
156 DESTINATION share/OpenSG/Examples/Advanced/DeferredShading/Data
157 COMPONENT examples_advanced)