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

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

Removed the old style Serializer, moving it back into VirtuaLPlanetBuilder to make way for the new Serializer that exists in support for the new binary/ascii format.

  • 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}/SharedStateManager
49    ${HEADER_PATH}/Version
50    ${HEADER_PATH}/WriteFile
51    ${HEADER_PATH}/XmlParser
52)
53
54# FIXME: For OS X, need flag for Framework or dylib
55ADD_LIBRARY(${LIB_NAME}
56    ${OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC}
57    ${LIB_PUBLIC_HEADERS}
58    Archive.cpp
59    AuthenticationMap.cpp
60    Callbacks.cpp
61    ConvertUTF.cpp
62    DatabasePager.cpp
63    DatabaseRevisions.cpp
64    DotOsgWrapper.cpp
65    DynamicLibrary.cpp
66    Field.cpp
67    FieldReader.cpp
68    FieldReaderIterator.cpp
69    FileCache.cpp
70    FileNameUtils.cpp
71    FileUtils.cpp
72    fstream.cpp
73    ImageOptions.cpp
74    ImagePager.cpp
75    Input.cpp
76    MimeTypes.cpp
77    Output.cpp
78    Options.cpp
79    PluginQuery.cpp
80    ReaderWriter.cpp
81    ReadFile.cpp
82    Registry.cpp
83    SharedStateManager.cpp
84    Version.cpp
85    WriteFile.cpp
86    XmlParser.cpp
87    ${OPENSCENEGRAPH_VERSIONINFO_RC}
88)
89
90IF(APPLE)
91    # Needs CoreFoundation calls and a Carbon function
92    SET(OSGDB_PLATFORM_SPECIFIC_LIBRARIES ${CARBON_LIBRARY})
93 
94    SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "quicktime" CACHE STRING "standard image plugin for os x, options are quicktime, imageio")
95
96    IF(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX STREQUAL "quicktime")
97        ADD_DEFINITIONS(-DDARWIN_QUICKTIME)
98    ELSE()
99        ADD_DEFINITIONS(-DDARWIN_IMAGEIO)
100    ENDIF()
101ENDIF()
102
103IF(QUICKTIME_FOUND)
104    ADD_DEFINITIONS(-DUSE_QUICKTIME)
105ENDIF()
106
107IF(XINE_FOUND)
108    ADD_DEFINITIONS(-DUSE_XINE)
109ENDIF()
110
111IF(INVENTOR_FOUND)
112    ADD_DEFINITIONS(-DUSE_INVENTOR)
113ENDIF()
114
115IF(OPENVRML_FOUND)
116    ADD_DEFINITIONS(-DUSE_VRML)
117ENDIF()
118
119
120ADD_DEFINITIONS(-DOSG_PLUGIN_EXTENSION=${CMAKE_SHARED_MODULE_SUFFIX})
121
122LINK_INTERNAL(${LIB_NAME}     
123    osg
124    OpenThreads
125)
126LINK_EXTERNAL(${LIB_NAME}     ${OSGDB_PLATFORM_SPECIFIC_LIBRARIES} )
127LINK_CORELIB_DEFAULT(${LIB_NAME})
128
129INCLUDE(ModuleInstall OPTIONAL)
Note: See TracBrowser for help on using the browser.