Changeset 1413

Show
Ignore:
Timestamp:
08/01/08 11:32:41 (4 months ago)
Author:
timdewhirst
Message:

olibs
- remove python boost lib by default
- add iostream boost lib by default
- add code to generate openlibraries.pc
- fixup default plugin location defines (needs checking on windows)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r1397 r1413  
    1313if ( NOT OPTION_UMBRELLA ) 
    1414   message( "defining plugin paths" ) 
    15    add_definitions( -DOPENIMAGELIB_PLUGINS="\\\"${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openimagelib/plugins\\\"" ) 
    16    add_definitions( -DOPENMEDIALIB_PLUGINS="\\\"${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openmedialib/plugins\\\"" ) 
    17    add_definitions( -DOPENASSETLIB_PLUGINS="\\\"${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openassetlib/plugins\\\"" ) 
    18    add_definitions( -DOPENOBJECTLIB_PLUGINS="\\\"${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openobjectlib/plugins\\\"" ) 
    19    add_definitions( -DOPENEFFECTSLIB_PLUGINS="\\\"${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openeffectslib/plugins\\\"" ) 
     15   add_definitions( -DOPENIMAGELIB_PLUGINS="${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openimagelib/plugins" ) 
     16   add_definitions( -DOPENMEDIALIB_PLUGINS="${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openmedialib/plugins" ) 
     17   add_definitions( -DOPENASSETLIB_PLUGINS="${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openassetlib/plugins" ) 
     18   add_definitions( -DOPENOBJECTLIB_PLUGINS="${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openobjectlib/plugins" ) 
     19   add_definitions( -DOPENEFFECTSLIB_PLUGINS="${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openeffectslib/plugins" ) 
    2020endif( NOT OPTION_UMBRELLA ) 
    2121 
     
    2525 
    2626# boost 
    27 find_package( Boost COMPONENTS filesystem python regex thread REQUIRED ) 
     27find_package( Boost COMPONENTS filesystem regex thread iostreams REQUIRED ) 
    2828if ( Boost_FOUND ) 
    2929   message( "found boost: ${Boost_INCLUDE_DIR}" ) 
     
    102102 
    103103add_subdirectory( src ) 
     104 
     105# function to convert a list (with their damned semicolons) 
     106# to a space separated list 
     107FUNCTION( CONVERT_LIST_TO_STRING _list _result ) 
     108   SET( result ) 
     109   LIST( LENGTH ${_list} _len )  
     110 
     111   # hack for brain dead range command... I mean, RANGE N yields N+1 numbers 
     112   MATH( EXPR len ${_len}-1 ) 
     113   FOREACH( index RANGE 0 ${len} ) 
     114      LIST( GET ${_list} ${index} li ) 
     115      SET( result "${result} ${li}" ) 
     116   ENDFOREACH( index RANGE 0 ${len} ) 
     117 
     118   SET( ${_result} ${result} PARENT_SCOPE ) 
     119ENDFUNCTION( CONVERT_LIST_TO_STRING ) 
     120 
     121# create openlibraries.pc for UNIX 
     122if ( NOT WIN32 ) 
     123   list( APPEND EXTRA_LIBS_LIST -L${Boost_LIBRARY_DIRS} -lboost_filesystem ) 
     124   if ( GLEW_FOUND ) 
     125         list( APPEND EXTRA_LIBS_LIST -L${GLEW_LIBRARY_DIR} -lGLEW ) 
     126         list( APPEND EXTRA_LIBS_LIST -L${libdir}/openobjectlib/lib -lopenobjectlib_sg ) 
     127   endif ( GLEW_FOUND ) 
     128 
     129   CONVERT_LIST_TO_STRING( EXTRA_LIBS_LIST EXTRA_LIBS ) 
     130 
     131   list( APPEND EXTRA_INCLUDE_LIST -I${Boost_INCLUDE_DIRS} ) 
     132   if ( GLEW_FOUND ) 
     133         list( APPEND EXTRA_INCLUDE_LIST -I${GLEW_INCLUDE_DIR} ) 
     134   endif ( GLEW_FOUND ) 
     135 
     136   CONVERT_LIST_TO_STRING( EXTRA_INCLUDE_LIST EXTRA_INCLUDES ) 
     137 
     138   configure_file( openlibraries.pc.cmake ${CMAKE_SOURCE_DIR}/openlibraries.pc @ONLY ) 
     139   install(  
     140        FILES 
     141        ${CMAKE_SOURCE_DIR}/openlibraries.pc 
     142        DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/" ) 
     143endif ( NOT WIN32 )