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

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

From Marc Sciabica, made searching of the install path for plugins option, and added the dll path to the search path under Windows

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