OpenSceneGraph/applications/CMakeLists.txt
Robert Osfield 4896fe6e05 From Mattias Helsing, "When building osg static on Windows the _declspec's wasn't escaped for
applications, examples or wrappers. Attached are the CMakeLists I had
to change to make these compile.
"
2008-12-11 17:00:40 +00:00

51 lines
1.2 KiB
CMake

PROJECT(OSG_APPLICATIONS)
IF (NOT DYNAMIC_OPENSCENEGRAPH)
# need to define this on win32 or linker cries about _declspecs
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
ENDIF(NOT DYNAMIC_OPENSCENEGRAPH)
SET(OSGCORE_BUNDLED TRUE)
IF(NOT OSGCORE_BUNDLED)
FIND_PACKAGE(OSGCORE)
IF(OSGCORE_FOUND)
INCLUDE(${OSGCORE_USE_FILE})
ELSE(OSGCORE_FOUND)
MESSAGE(ERROR "OSGCORE neeeded but NOT FOUND")
ENDIF(OSGCORE_FOUND)
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../../Macros)
ENDIF(NOT OSGCORE_BUNDLED)
SET(OPENSCENEGRAPH_APPLICATION_DIR ${PROJECT_SOURCE_DIR})
SET(TARGET_DEFAULT_PREFIX "application_")
SET(TARGET_DEFAULT_LABEL_PREFIX "Applications")
SET(TARGET_COMMON_LIBRARIES
OpenThreads
osg
osgDB
osgUtil
osgGA
osgViewer
osgText
)
ADD_SUBDIRECTORY(osgviewer)
ADD_SUBDIRECTORY(osgarchive)
ADD_SUBDIRECTORY(osgconv)
ADD_SUBDIRECTORY(osgversion)
ADD_SUBDIRECTORY(osgfilecache)
#REWRITE_CMAKELIST(ADD_OSG_EXAMPLE)
#MESSAGE("---->${MY_EXAMPLE_LIST}<---------")
##########to get all the variables of Cmake
#GET_CMAKE_PROPERTY(MYVARS VARIABLES)
#FOREACH(myvar ${MYVARS})
# FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/AllVariables.txt
# "${myvar} -->${${myvar}}<-\n"
# )
#ENDFOREACH(myvar)