2 IF(OSG_OGL_COREONLY AND NOT OSG_CHECK_COREONLY)
6 PROJECT(OpenSGExamplesAdvancedCharacter)
8 MESSAGE(STATUS "Building ${PROJECT_NAME} integrated")
10 #############################################################################
13 FILE(GLOB SRCFILES "*.cpp")
15 #############################################################################
18 SET(OSG_COMPONENTS OSGBase
32 LIST(APPEND OSG_COMPONENTS OSGWindowCocoa)
34 LIST(APPEND OSG_COMPONENTS OSGWindowX)
39 LIST(APPEND OSG_COMPONENTS OSGWindowWIN32)
46 SET(OSG_EXTERNAL_COMPONENTS Boost GLUT)
51 FOREACH(OSGDEP ${OSG_COMPONENTS})
52 IF(NOT EXISTS "${CMAKE_BINARY_DIR}/${OSGDEP}.cmake")
53 MESSAGE(FATAL_ERROR "Dependency (${OSGDEP}) not found, "
54 "can not build ${PROJECT_NAME}\n")
56 ENDIF(NOT EXISTS "${CMAKE_BINARY_DIR}/${OSGDEP}.cmake")
58 INCLUDE("${CMAKE_BINARY_DIR}/${OSGDEP}.cmake")
59 INCLUDE_DIRECTORIES(${${OSGDEP}_INC})
62 FOREACH(OSGEXTDEP ${OSG_EXTERNAL_COMPONENTS})
63 IF(NOT ${OSGEXTDEP}_FOUND)
64 MESSAGE(FATAL_ERROR "Dependency (${OSGEXTDEP}) not found, "
65 "can not build ${PROJECT_NAME}\n")
69 INCLUDE_DIRECTORIES(SYSTEM ${${OSGEXTDEP}_INCLUDE_DIR})
73 #############################################################################
76 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
78 FOREACH(GLOBAL_INC ${OSG_GLOBAL_DEP_INCDIR})
79 INCLUDE_DIRECTORIES(${${GLOBAL_INC}})
82 ADD_DEFINITIONS(-D OSG_BUILD_INTEGRATED)
84 FOREACH(SRC ${SRCFILES})
86 GET_FILENAME_COMPONENT(EXE ${SRC} NAME_WE)
88 ADD_EXECUTABLE(${EXE} ${OSGEXCLUDE_EXAMPLES_ADVANCED}
89 ${SRC} ${OSG_ADD_GLOBAL_EXE_SRC})
91 ADD_DEPENDENCIES(OSGAllAdvancedExamples ${EXE})
93 FOREACH(OSGDEP ${OSG_COMPONENTS})
94 ADD_DEPENDENCIES(${EXE} ${OSGDEP})
96 TARGET_LINK_LIBRARIES(${EXE} ${OSGDEP})
100 SET_PROPERTY(TARGET ${EXE} PROPERTY FOLDER "Examples/Advanced")
104 IF(OSG_INSTALL_EXAMPLES_EXE)
106 INSTALL(TARGETS ${EXE}
107 CONFIGURATIONS Release
108 RUNTIME DESTINATION share/OpenSG/Examples/Advanced/Character/bin/rel)
109 INSTALL(TARGETS ${EXE}
111 RUNTIME DESTINATION share/OpenSG/Examples/Advanced/Character/bin/debug)
112 INSTALL(TARGETS ${EXE}
113 CONFIGURATIONS ReleaseNoOpt
114 RUNTIME DESTINATION share/OpenSG/Examples/Advanced/Character/bin/relnoopt)
115 INSTALL(TARGETS ${EXE}
116 CONFIGURATIONS DebugOpt
117 RUNTIME DESTINATION share/OpenSG/Examples/Advanced/Character/bin/debugopt)
119 INSTALL(TARGETS ${EXE}
120 CONFIGURATIONS Release
121 DESTINATION share/OpenSG/Examples/Advanced/Character/bin
122 COMPONENT examples_advanced)
124 INSTALL(TARGETS ${EXE}
126 DESTINATION share/OpenSG/Examples/Advanced/Character/bin/debug
127 COMPONENT examples_advanced)
129 INSTALL(TARGETS ${EXE}
130 CONFIGURATIONS DebugGV
131 DESTINATION share/OpenSG/Examples/Advanced/Character/bin/debug
132 COMPONENT examples_advanced)
135 IF(OSG_INSTALL_EXAMPLES)
136 INSTALL(FILES "${SRC}"
137 DESTINATION share/OpenSG/Examples/Advanced/Character
138 COMPONENT examples_advanced)
143 IF(OSG_INSTALL_EXAMPLES)
144 INSTALL(FILES CMakeLists.standalone.txt
145 DESTINATION share/OpenSG/Examples/Advanced/Character
146 RENAME CMakeLists.txt
147 COMPONENT examples_advanced)
149 FILE(GLOB GLOBFILES "*.glsl")
150 INSTALL(FILES ${GLOBFILES}
151 DESTINATION share/OpenSG/Examples/Advanced/Character/Data
152 COMPONENT examples_advanced)
154 FILE(GLOB GLOBFILES "*.tga")
155 INSTALL(FILES ${GLOBFILES}
156 DESTINATION share/OpenSG/Examples/Advanced/Character/Data
157 COMPONENT examples_advanced)
159 FILE(GLOB GLOBFILES "*.png")
160 INSTALL(FILES ${GLOBFILES}
161 DESTINATION share/OpenSG/Examples/Advanced/Character/Data
162 COMPONENT examples_advanced)
164 FILE(GLOB GLOBFILES "*.jpg")
165 INSTALL(FILES ${GLOBFILES}
166 DESTINATION share/OpenSG/Examples/Advanced/Character/Data
167 COMPONENT examples_advanced)
169 FILE(GLOB GLOBFILES "*.mesh")
170 INSTALL(FILES ${GLOBFILES}
171 DESTINATION share/OpenSG/Examples/Advanced/Character/Data
172 COMPONENT examples_advanced)
174 FILE(GLOB GLOBFILES "*.skeleton")
175 INSTALL(FILES ${GLOBFILES}
176 DESTINATION share/OpenSG/Examples/Advanced/Character/Data
177 COMPONENT examples_advanced)