Changeset 1363

Show
Ignore:
Timestamp:
03/16/08 20:03:47 (8 months ago)
Author:
timdewhirst
Message:

olibs
- moving forwards with cmake; OPL now builds

Location:
trunk
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r1362 r1363  
    11project( OpenLibraries ) 
     2 
     3set( VERSION_MAJOR 0 ) 
     4set( VERSION_MINOR 5 ) 
     5set( VERSION_PATCH 1 ) 
     6set( PACKAGE "openlibraries-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" ) 
     7 
     8# only required for non-umbrella builds 
     9option( OPTION_UMBRELLA "enable umbrella build" OFF ) 
     10if ( NOT OPTION_UMBRELLA ) 
     11   message( "defining plugin paths" ) 
     12   add_definitions( -DOPENIMAGELIB_PLUGINS="\\\"${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openimagelib/plugins\\\"" ) 
     13   add_definitions( -DOPENMEDIALIB_PLUGINS="\\\"${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openmedialib/plugins\\\"" ) 
     14   add_definitions( -DOPENASSETLIB_PLUGINS="\\\"${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openassetlib/plugins\\\"" ) 
     15   add_definitions( -DOPENOBJECTLIB_PLUGINS="\\\"${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openobjectlib/plugins\\\"" ) 
     16   add_definitions( -DOPENEFFECTSLIB_PLUGINS="\\\"${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}/openeffectslib/plugins\\\"" ) 
     17endif( NOT OPTION_UMBRELLA ) 
     18 
     19# find optional and required modules 
     20# check in the source directory 
     21set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} ) 
    222 
    323# boost 
    424find_package( Boost ) 
    525if ( Boost_FOUND ) 
    6    message( found boost: ${Boost_INCLUDE_DIR} ) 
     26   message( "found boost:" ${Boost_INCLUDE_DIR} ) 
    727   include_directories( ${Boost_INCLUDE_DIR} ) 
    828endif ( Boost_FOUND ) 
     
    1131find_package( SDL ) 
    1232if ( SDL_FOUND ) 
    13    message( found boost: ${SDL_INCLUDE_DIR} ) 
     33   message( "found SDL:" ${SDL_INCLUDE_DIR} ) 
    1434   include_directories( ${SDL_INCLUDE_DIR} ) 
    1535endif ( SDL_FOUND ) 
     36 
     37# libxml 
     38if ( NOT WIN32 ) 
     39   find_package( LibXml2 ) 
     40   if ( LIBXML2_FOUND ) 
     41      message( "found LibXml2:" ${LIBXML2_INCLUDE_DIR} ) 
     42      include_directories( ${LIBXML2_INCLUDE_DIR} )       
     43   endif( LIBXML2_FOUND )        
     44endif( NOT WIN32 ) 
     45 
     46# GLEW 
     47find_package( GLEW ) 
     48if ( GLEW_FOUND ) 
     49   message( "found SDL:" ${GLEW_INCLUDE_DIR} ) 
     50   include_directories( ${GLEW_INCLUDE_DIR} ) 
     51   add_definitions( -DHAVE_GL_GLEW_H ) 
     52   set ( SHARE_PATH ${CMAKE_INSTALL_PREFIX}/share/${PACKAGE} ) 
     53   add_definitions( -DOPENOBJECTLIB_SHADERS="\\\"${SHARE_PATH}/shaders\\\"" ) 
     54   add_definitions( -DOPENEFFECTSLIB_SHADERS="\\\"${SHARE_PATH}/shaders\\\"" ) 
     55endif ( GLEW_FOUND ) 
    1656 
    1757# kill some warnings 
  • trunk/src/openpluginlib/pl/CMakeLists.txt

    r1362 r1363  
    11include_directories( ${OpenLibraries_SOURCE_DIR}/src ) 
    22message( including: ${OpenLibraries_SOURCE_DIR}/src ) 
    3 set( SOURCES 
    4              bind_info.cpp    
    5              fast_math.cpp               
    6              openplugin.cpp              
    7              openpluginlib.cpp           
    8              opl_importer.cpp            
    9              registry.cpp                
    10              utf8_utils.cpp              
    11              opl_parser_action.cpp       
    12              pool.cpp                    
    13              timer.cpp                   
    14              shader_manager.cpp          
    15              stream.cpp                  
    16              shlib.cpp                   
    17              GL_utility.cpp              
    18              cg.cpp                      
    19              pcos/key.cpp                
    20              pcos/property.cpp           
    21              pcos/property_container.cpp 
    22              pcos/subject.cpp ) 
     3set(  
     4     SOURCES 
     5     bind_info.cpp    
     6     fast_math.cpp               
     7     openplugin.cpp              
     8     openpluginlib.cpp           
     9     opl_importer.cpp            
     10     registry.cpp                
     11     utf8_utils.cpp              
     12     opl_parser_action.cpp       
     13     pool.cpp                    
     14     timer.cpp                   
     15     shader_manager.cpp          
     16     stream.cpp                  
     17     shlib.cpp                   
     18     GL_utility.cpp              
     19     cg.cpp                      
     20     pcos/key.cpp                
     21     pcos/property.cpp           
     22     pcos/property_container.cpp 
     23     pcos/subject.cpp ) 
    2324 
    2425if ( WIN32 ) 
     
    2829endif ( WIN32 ) 
    2930 
    30 add_library( openpluginlib_pl ${SOURCES} ) 
     31 
     32install(  
     33     FILES 
     34     bind_info.hpp                
     35     discovery_traits.hpp         
     36     openplugin.hpp               
     37     openpluginlib.hpp            
     38     config.hpp                   
     39     pool.hpp                     
     40     property.hpp                 
     41     utf8_utils.hpp               
     42     string.hpp                   
     43     timer.hpp                    
     44     shader_manager.hpp           
     45     geometry.hpp                 
     46     cg.hpp                       
     47     GL_utility.hpp               
     48     string.hpp                   
     49     stream.hpp                   
     50     pcos/key.hpp                 
     51     pcos/observer.hpp            
     52     pcos/iproperty_container.hpp 
     53     pcos/property.hpp            
     54     pcos/property_container.hpp  
     55     pcos/subject.hpp             
     56     pcos/visitor.hpp             
     57     pcos/isubject.hpp            
     58     pcos/iclonable.hpp 
     59     DESTINATION "include/${PACKAGE}/openpluginlib/pl" ) 
     60 
     61add_library( openpluginlib_pl SHARED ${SOURCES} ) 
     62install( TARGETS openpluginlib_pl LIBRARY DESTINATION "lib/${PACKAGE}/openpluginlib/lib" )