Changeset 1364

Show
Ignore:
Timestamp:
03/17/08 13:20:06 (8 months ago)
Author:
timdewhirst
Message:

openlibraries
- more work on windows cmake files

Location:
trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r1363 r1364  
    55set( VERSION_PATCH 1 ) 
    66set( PACKAGE "openlibraries-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" ) 
     7set( VERSION_STRING "${VERSION_MAJOR}_${VERSION_MINOR}_${VERSION_PATCH}" ) 
    78 
    89# only required for non-umbrella builds 
     
    2425find_package( Boost ) 
    2526if ( Boost_FOUND ) 
    26    message( "found boost:" ${Boost_INCLUDE_DIR} ) 
     27   message( "found boost: ${Boost_INCLUDE_DIR}" ) 
    2728   include_directories( ${Boost_INCLUDE_DIR} ) 
     29   link_directories( ${Boost_LIBRARY_DIRS} ) 
    2830endif ( Boost_FOUND ) 
    2931 
     
    4749find_package( GLEW ) 
    4850if ( GLEW_FOUND ) 
    49    message( "found SDL:" ${GLEW_INCLUDE_DIR} ) 
     51   message( "found GLEW:" ${GLEW_INCLUDE_DIR} ) 
    5052   include_directories( ${GLEW_INCLUDE_DIR} ) 
     53   link_directories( ${GLEW_LIBRARIES} ) 
    5154   add_definitions( -DHAVE_GL_GLEW_H ) 
    5255   set ( SHARE_PATH ${CMAKE_INSTALL_PREFIX}/share/${PACKAGE} ) 
     
    5558endif ( GLEW_FOUND ) 
    5659 
    57 # kill some warnings 
     60# kill some warnings, add some windows specific defines 
    5861if ( WIN32 ) 
    59    set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "/wd4273" ) 
     62   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4273 /wd4251 /wd4503" ) 
     63   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:wchar_t" ) 
     64   add_definitions( -DUNICODE ) 
     65   add_definitions( -D_CRT_SECURE_NO_DEPRECATE ) 
     66 
     67   if( MSVC80 ) 
     68       set( COMPILER "vc80" ) 
     69   endif( MSVC80 ) 
     70   if( MSVC71 ) 
     71       set( COMPILER "vc71" ) 
     72   endif( MSVC71 ) 
     73   set( LIBRARY_IDENTIFIER "-${COMPILER}-d-${VERSION_STRING}" ) 
    6074endif( WIN32 ) 
    6175 
  • trunk/FindGLEW.cmake

    r1363 r1364  
    1212ENDIF (GLEW_INCLUDE_DIR) 
    1313 
    14 FIND_PATH(GLEW_INCLUDE_DIR glew.h wglew.h 
    15   /usr/local/include/GL 
    16   /usr/include/GL 
    17 ) 
    18  
    19 SET(GLEW_NAMES glew GLEW) 
    20 FIND_LIBRARY(GLEW_LIBRARY 
    21   NAMES ${GLEW_NAMES} 
    22   PATHS /usr/lib /usr/local/lib 
    23 ) 
     14if( WIN32 ) 
     15   if( MSVC80 ) 
     16       set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC" ) 
     17   endif( MSVC80 ) 
     18   if( MSVC71 ) 
     19       set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ .NET\ 2003/Vc7" ) 
     20   endif( MSVC71 ) 
     21   FIND_PATH( GLEW_INCLUDE_DIR glew.h wglew.h 
     22              c:/glew/include/gl 
     23              ${COMPILER_PATH}/PlatformSDK/Include/gl ) 
     24   SET( GLEW_NAMES glew32 ) 
     25   FIND_LIBRARY( GLEW_LIBRARY 
     26                 NAMES ${GLEW_NAMES} 
     27                 PATHS ${COMPILER_PATH}/PlatformSDK/Lib ) 
     28else( WIN32 ) 
     29   FIND_PATH( GLEW_INCLUDE_DIR glew.h wglew.h 
     30              /usr/local/include/GL 
     31              /usr/include/GL ) 
     32   SET( GLEW_NAMES glew ) 
     33   FIND_LIBRARY( GLEW_LIBRARY 
     34                 NAMES ${GLEW_NAMES} 
     35                 PATHS /usr/lib /usr/local/lib ) 
     36endif( WIN32 ) 
    2437 
    2538IF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY) 
     
    3144ENDIF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY) 
    3245 
    33 IF (GLEW_FOUND) 
    34    IF (NOT GLEW_FIND_QUIETLY) 
    35       MESSAGE(STATUS "Found GLEW: ${GLEW_LIBRARY}") 
    36    ENDIF (NOT GLEW_FIND_QUIETLY) 
    37 ELSE (GLEW_FOUND) 
    38    IF (GLEW_FIND_REQUIRED) 
    39       MESSAGE(STATUS "Looked for GLEW libraries named ${GLEWS_NAMES}.") 
    40       MESSAGE(FATAL_ERROR "Could NOT find GLEW library") 
    41    ENDIF (GLEW_FIND_REQUIRED) 
    42 ENDIF (GLEW_FOUND) 
    43  
    4446MARK_AS_ADVANCED( 
    4547  GLEW_LIBRARY 
  • trunk/src/openpluginlib/pl/CMakeLists.txt

    r1363 r1364  
    11include_directories( ${OpenLibraries_SOURCE_DIR}/src ) 
    22message( including: ${OpenLibraries_SOURCE_DIR}/src ) 
    3 set(  
    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 ) 
     3set( NAME openpluginlib_pl ) 
    244 
    25 if ( WIN32 ) 
    26    set( SOURCES ${SOURCES} content_handler_msxml.cpp ) 
    27 else ( WIN32 ) 
    28    set( SOURCES ${SOURCES} content_handler_libxml.cpp ) 
    29 endif ( WIN32 ) 
     5if( WIN32 ) 
     6   add_definitions( -DOPENPLUGINLIB_EXPORTS ) 
     7   add_definitions( -DOPENPLUGINLIB_LIBNAME=\\\"${NAME}\\\" ) 
     8   add_definitions( -DOPENPLUGINLIB_VERSION=\\\"${VERSION_STRING}\\\" ) 
     9   add_definitions( -DOPENPLUGINLIB_BUILD ) 
     10   set( NAME "${NAME}${LIBRARY_IDENTIFIER}" ) 
     11endif( WIN32 ) 
    3012 
     13set( SOURCES 
     14     bind_info.hpp                
     15     bind_info.cpp                
     16     config.hpp                   
     17     discovery_traits.hpp         
     18     fast_math.hpp                
     19     fast_math.cpp                
     20     geometry.hpp                 
     21     openplugin.hpp               
     22     openplugin.cpp               
     23     openpluginlib.hpp            
     24     openpluginlib.cpp            
     25     opl_importer.hpp             
     26     opl_importer.cpp             
     27     property.hpp                 
     28     registry.hpp                 
     29     registry.cpp                 
     30     utf8_utils.hpp               
     31     utf8_utils.cpp               
     32     opl_parser_action.hpp        
     33     opl_parser_action.cpp        
     34     pool.cpp                     
     35     pool.hpp                     
     36     string.hpp                   
     37     shader_manager.hpp           
     38     shader_manager.cpp           
     39     allocatorstringstorage.h     
     40     cowstringopt.h               
     41     flex_string_details.h        
     42     flex_string.h                
     43     flex_string_shell.h          
     44     simplestringstorage.h        
     45     smallstringopt.h             
     46     stream.hpp                   
     47     stream.cpp                   
     48     shlib.hpp                    
     49     shlib.cpp                    
     50     vectorstringstorage.h        
     51     GL_utility.hpp               
     52     GL_utility.cpp               
     53     cg.hpp                       
     54     cg.cpp                       
     55     pcos/key.hpp                 
     56     pcos/key.cpp                 
     57     pcos/observer.hpp            
     58     pcos/property.hpp            
     59     pcos/property.cpp            
     60     pcos/property_container.hpp  
     61     pcos/property_container.cpp  
     62     pcos/subject.hpp             
     63     pcos/subject.cpp             
     64     pcos/visitor.hpp             
     65     pcos/isubject.hpp            
     66     pcos/iclonable.hpp ) 
     67 
     68set( GLEW_SOURCES  
     69     timer.hpp                    
     70     timer.cpp ) 
     71 
     72if( GLEW_FOUND ) 
     73    set( SOURCES ${SOURCES} ${GLEW_SOURCES} ) 
     74endif( GLEW_FOUND ) 
     75 
     76if( WIN32 ) 
     77   set( SOURCES ${SOURCES} content_handler_msxml.cpp content_handler_msxml.hpp ) 
     78else( WIN32 ) 
     79   set( SOURCES ${SOURCES} content_handler_libxml.cpp content_handler_libxml.hpp ) 
     80endif( WIN32 ) 
    3181 
    3282install(  
     
    59109     DESTINATION "include/${PACKAGE}/openpluginlib/pl" ) 
    60110 
    61 add_library( openpluginlib_pl SHARED ${SOURCES} ) 
    62 install( TARGETS openpluginlib_pl LIBRARY DESTINATION "lib/${PACKAGE}/openpluginlib/lib" ) 
     111add_library( ${NAME} SHARED ${SOURCES} ) 
     112install( TARGETS ${NAME} LIBRARY DESTINATION "lib/${PACKAGE}/openpluginlib/lib" ) 
  • trunk/src/openpluginlib/pl/config.hpp

    r1347 r1364  
    5858#endif 
    5959 
    60 #ifdef WIN32 
    61 #define HAVE_GL_GLEW_H 
    6260#endif 
    63  
    64 #endif 
  • trunk/src/openpluginlib/pl/opl_parser_action.hpp

    r1347 r1364  
    1919// forward declarations 
    2020#ifdef WIN32 
    21 struct MSXML2::ISAXAttributes; 
     21namespace MSXML2 { 
     22    struct ISAXAttributes; 
     23} 
    2224#else 
    2325#include <libxml/parser.h>