root/OpenSceneGraph/trunk/src/osgDB/CMakeLists.txt @ 9880

Revision 9880, 3.0 kB (checked in by robert, 5 years ago)

From Eric Wing and Stephan Huber, ImageIO code originally wrote by Eric Wing, and then later conveted into an OSG plugin by Stephan Huber.

  • Property svn:eol-style set to native
RevLine 
[6321]1
2IF   (DYNAMIC_OPENSCENEGRAPH)
[7364]3    ADD_DEFINITIONS(-DOSGDB_LIBRARY)
[9169]4
5    # Add a default plugin search path component
6    ADD_DEFINITIONS(-DOSG_DEFAULT_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib${LIB_POSTFIX}/${OSG_PLUGINS})
[6321]7ELSE (DYNAMIC_OPENSCENEGRAPH)
[7364]8    ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
[6321]9ENDIF(DYNAMIC_OPENSCENEGRAPH)
10
[9169]11
12
[6321]13SET(LIB_NAME osgDB)
14SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
15SET(LIB_PUBLIC_HEADERS
[7364]16    ${HEADER_PATH}/Archive
[8620]17    ${HEADER_PATH}/AuthenticationMap
[9124]18    ${HEADER_PATH}/ConvertUTF
[7364]19    ${HEADER_PATH}/DatabasePager
20    ${HEADER_PATH}/DotOsgWrapper
21    ${HEADER_PATH}/DynamicLibrary
22    ${HEADER_PATH}/Export
23    ${HEADER_PATH}/Field
24    ${HEADER_PATH}/FieldReader
25    ${HEADER_PATH}/FieldReaderIterator
[9038]26    ${HEADER_PATH}/FileCache
[7364]27    ${HEADER_PATH}/FileNameUtils
28    ${HEADER_PATH}/FileUtils
[9124]29    ${HEADER_PATH}/fstream
[7364]30    ${HEADER_PATH}/ImageOptions
[8633]31    ${HEADER_PATH}/ImagePager
[7364]32    ${HEADER_PATH}/Input
33    ${HEADER_PATH}/Output
34    ${HEADER_PATH}/ParameterOutput
[8681]35    ${HEADER_PATH}/PluginQuery
[7364]36    ${HEADER_PATH}/ReaderWriter
37    ${HEADER_PATH}/ReadFile
38    ${HEADER_PATH}/Registry
[9038]39    ${HEADER_PATH}/Serializer
[7364]40    ${HEADER_PATH}/SharedStateManager
41    ${HEADER_PATH}/Version
42    ${HEADER_PATH}/WriteFile
[6321]43)
44
45# FIXME: For OS X, need flag for Framework or dylib
46ADD_LIBRARY(${LIB_NAME}
[7364]47    ${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
[8211]48    ${LIB_PUBLIC_HEADERS}
[7364]49    Archive.cpp
[8620]50    AuthenticationMap.cpp
[9124]51    ConvertUTF.cpp
[7364]52    DatabasePager.cpp
53    DotOsgWrapper.cpp
54    DynamicLibrary.cpp
55    Field.cpp
56    FieldReader.cpp
57    FieldReaderIterator.cpp
[9038]58    FileCache.cpp
[7364]59    FileNameUtils.cpp
60    FileUtils.cpp
[9124]61    fstream.cpp
[7364]62    ImageOptions.cpp
[8633]63    ImagePager.cpp
[7364]64    Input.cpp
65    Output.cpp
[8681]66    PluginQuery.cpp
67    ReaderWriter.cpp
[7364]68    ReadFile.cpp
69    Registry.cpp
70    SharedStateManager.cpp
71    Version.cpp
72    WriteFile.cpp
[9671]73    ${OPENSCENEGRAPH_VERSIONINFO_RC}
[6321]74)
75
76IF(APPLE)
[7364]77    # Needs CoreFoundation calls and a Carbon function
78    SET(OSGDB_PLATFORM_SPECIFIC_LIBRARIES ${CARBON_LIBRARY})
[9880]79 
80    SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "quicktime" CACHE STRING "standard image plugin for os x, options are quicktime, imageio")
81
82
83    IF(${OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX} STREQUAL "quicktime")
84        ADD_DEFINITIONS(-DDARWIN_QUICKTIME)
85    ELSE(${OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX} STREQUAL "quicktime")
86        ADD_DEFINITIONS(-DDARWIN_IMAGEIO)
87    ENDIF(${OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX} STREQUAL "quicktime")
88
[6321]89ENDIF(APPLE)
90
[8213]91IF(QUICKTIME_FOUND)
92    ADD_DEFINITIONS(-DUSE_QUICKTIME)
93ENDIF(QUICKTIME_FOUND)
94
[6541]95IF(XINE_FOUND)
96        ADD_DEFINITIONS(-DUSE_XINE)
97ENDIF(XINE_FOUND)
98
99IF(INVENTOR_FOUND)
100        ADD_DEFINITIONS(-DUSE_INVENTOR)
101ENDIF(INVENTOR_FOUND)
102
[6611]103IF(OPENVRML_FOUND)
[6541]104        ADD_DEFINITIONS(-DUSE_VRML)
[6611]105ENDIF(OPENVRML_FOUND)
[6541]106
107
[8913]108ADD_DEFINITIONS(-DOSG_PLUGIN_EXTENSION=${CMAKE_SHARED_LIBRARY_SUFFIX})
109
[7364]110LINK_INTERNAL(${LIB_NAME}     
111    osg
112    OpenThreads
[6321]113)
[7364]114LINK_EXTERNAL(${LIB_NAME}     ${OSGDB_PLATFORM_SPECIFIC_LIBRARIES} )
[6402]115LINK_CORELIB_DEFAULT(${LIB_NAME})
[6321]116
117INCLUDE(ModuleInstall OPTIONAL)
Note: See TracBrowser for help on using the browser.