@ -1,5 +1,6 @@
# T h i s m o d u l e a c c e p t s t h e f o l l o w i n g e n v v a r i a b l e
# O S G P l u g i n s _ L I B _ D I R - < O p e n S c e n e G r a p h > / l i b / o s g P l u g i n s - < X . X . X > , p a t h t o s e a r c h p l u g i n s
# O S G P l u g i n s _ D O N T _ F I N D _ D E P E N D E N C I E S - S e t t o s k i p a l s o f i n d i n g p n g , z l i b a n d j p e g
#
# O n c e d o n e t h i s w i l l d e f i n e
# O S G P l u g i n s _ F O U N D - S y s t e m h a s t h e a l l r e q u i r e d c o m p o n e n t s .
@ -27,10 +28,10 @@ foreach(_library ${OSGPlugins_FIND_COMPONENTS})
set ( _component OSGPlugins_ ${ _library } )
set ( ${ _library_uc } _DIR ${ OSGPlugins_LIB_DIR } ) # t o h e l p f u n c t i o n o s g _ f i n d _ l i b r a r y
set ( _saved_lib_prefix ${ CMAKE_FIND_LIBRARY_PREFIXES } ) # s a v e C M A K E _ F I N D _ L I B R A R Y _ P R E F I X E S
set ( CMAKE_FIND_LIBRARY_PREFIXES "" ) # s e a r c h l i b r a r i e s w i t h n o p r e f i x
# set ( _saved_lib_prefix ${ CMAKE_FIND_LIBRARY_PREFIXES } ) # s a v e C M A K E _ F I N D _ L I B R A R Y _ P R E F I X E S
# set ( CMAKE_FIND_LIBRARY_PREFIXES "" ) # s e a r c h l i b r a r i e s w i t h n o p r e f i x
osg_find_library ( ${ _library_uc } ${ _library } ) # f i n d i t i n t o $ { _ l i b r a r y _ u c } _ L I B R A R I E S
set ( CMAKE_FIND_LIBRARY_PREFIXES ${ _saved_lib_prefix } ) # r e s t o r e p r e f i x
# set ( CMAKE_FIND_LIBRARY_PREFIXES ${ _saved_lib_prefix } ) # r e s t o r e p r e f i x
if ( ${ _library_uc } _LIBRARIES )
set ( ${ _component } _LIBRARY ${ ${_library_uc } _LIBRARIES} ) # f a k e a s i f w e c a l l f i n d _ l i b r a r y
@ -41,10 +42,12 @@ foreach(_library ${OSGPlugins_FIND_COMPONENTS})
list ( APPEND OSGPlugins_PROCESS_LIBS ${ _component } _LIBRARY )
endforeach ( )
foreach ( _dependency PNG ZLIB JPEG ) # n e e d e d b y o s g d b _ p n g o r o s g d b _ j p e g
libfind_package ( OSGPlugins ${ _dependency } )
set ( ${ _dependency } _LIBRARY_OPTS ${ _dependency } _LIBRARY )
# list ( APPEND OSGPlugins_PROCESS_LIBS ${ _dependency } _LIBRARY )
endforeach ( )
if ( NOT DEFINED OSGPlugins_DONT_FIND_DEPENDENCIES )
foreach ( _dependency PNG ZLIB JPEG ) # n e e d e d b y o s g d b _ p n g o r o s g d b _ j p e g
libfind_package ( OSGPlugins ${ _dependency } )
set ( ${ _dependency } _LIBRARY_OPTS ${ _dependency } _LIBRARY )
# list ( APPEND OSGPlugins_PROCESS_LIBS ${ _dependency } _LIBRARY )
endforeach ( )
endif ( )
libfind_process ( OSGPlugins )