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

Revision 10289, 3.2 kB (checked in by robert, 5 years ago)

Introduced first iterations of DatabaseRevision? classes for managing the revisioning of http hosted databases

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