Changeset 9339

Show
Ignore:
Timestamp:
12/12/08 12:01:09 (5 years ago)
Author:
robert
Message:

From Mattias Helsing, "I have developed the earlier cpack example a bit. Perhaps you could
consider these initial cpack support scripts. It is hidden behind a
BUILD_PACKAGES option so won't affect the normal user. The submission
1) set the COMPONENT attribute on all cmake install commands.
COMPONENT names are according to
http://www.openscenegraph.org/projects/osg/wiki/Community/Packaging

2) provide cmake script and a template for creating CPack
configuration files. It will generate target for creating packages
with everything that gets "installed" (make package on unx, project
PACKAGE in MSVC) plus targets for generating one package per COMPONENT
(i.e. libopenscenegraph-core etc.).

I have temporariliy uploaded some examples to
http://www.openscenegraph.org/projects/osg/wiki/Community/People/MattiasHelsing

If this submission makes it into svn we can develop it to generate
rpms, installers for windows and mac (I know at least J-S don't like
these but there may be others who do ;) and even DEBs (not sure if we
can make them "ubuntu-ready" but they eventually may - at least we
could put a deb on the website)"

Location:
OpenSceneGraph/trunk
Files:
2 added
15 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/CMakeLists.txt

    r9337 r9339  
    692692        SET(HAVE_DOT NO) 
    693693    ENDIF(DOT) 
     694     
    694695    # This processes our Doxyfile.in and substitutes paths to generate 
    695696    # a final Doxyfile 
     
    721722ENDIF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE) 
    722723 
     724OPTION(BUILD_PACKAGES "Set to ON to generate CPack configuration files and default packaging targets" OFF) 
     725IF(BUILD_PACKAGES) 
     726    INCLUDE(OsgCPack) 
     727ENDIF(BUILD_PACKAGES) 
    723728 
    724729#----------------------------------------------------------------------------- 
  • OpenSceneGraph/trunk/CMakeModules/ModuleInstall.cmake

    r7322 r9339  
    2323 
    2424IF(MSVC AND OSG_MSVC_VERSIONED_DLL) 
    25         HANDLE_MSVC_DLL() 
     25    HANDLE_MSVC_DLL() 
    2626ENDIF(MSVC AND OSG_MSVC_VERSIONED_DLL) 
    2727 
    2828INSTALL( 
    2929    TARGETS ${LIB_NAME} 
    30     RUNTIME DESTINATION ${INSTALL_BINDIR} 
    31     LIBRARY DESTINATION ${INSTALL_LIBDIR} 
    32     ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} 
     30    RUNTIME DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph-core 
     31    LIBRARY DESTINATION ${INSTALL_LIBDIR} COMPONENT libopenscenegraph-core 
     32    ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-core-dev 
    3333) 
     34 
    3435# FIXME: Do not run for OS X framework 
    3536INSTALL( 
    3637    FILES        ${LIB_PUBLIC_HEADERS} 
    3738    DESTINATION ${INSTALL_INCDIR}/${LIB_NAME} 
     39    COMPONENT libopenscenegraph-core-dev 
    3840) 
  • OpenSceneGraph/trunk/CMakeModules/OsgMacroUtils.cmake

    r9057 r9339  
    131131            SET(TARGET_LABEL "${TARGET_DEFAULT_LABEL_PREFIX} ${TARGET_NAME}") 
    132132    ENDIF(NOT TARGET_LABEL) 
     133 
     134    ## plugins gets put in libopenscenegraph by default 
     135    IF(${ARGC} GREATER 1) 
     136      SET(PACKAGE_COMPONENT libopenscenegraph-${ARGV1}) 
     137    ELSE(${ARGC} GREATER 1) 
     138      SET(PACKAGE_COMPONENT libopenscenegraph) 
     139    ENDIF(${ARGC} GREATER 1) 
    133140     
    134141    # here we use the command to generate the library     
     
    185192    IF(WIN32) 
    186193        INSTALL(TARGETS ${TARGET_TARGETNAME}  
    187             RUNTIME DESTINATION bin 
    188             ARCHIVE DESTINATION lib/${OSG_PLUGINS} 
    189             LIBRARY DESTINATION bin/${OSG_PLUGINS} ) 
     194            RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT} 
     195            ARCHIVE DESTINATION lib/${OSG_PLUGINS} COMPONENT libopenscenegraph-dev 
     196            LIBRARY DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT}) 
    190197    ELSE(WIN32) 
    191198        INSTALL(TARGETS ${TARGET_TARGETNAME} 
    192             RUNTIME DESTINATION bin 
    193             ARCHIVE DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} 
    194             LIBRARY DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} ) 
     199            RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT} 
     200            ARCHIVE DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} COMPONENT libopenscenegraph-dev 
     201            LIBRARY DESTINATION lib${LIB_POSTFIX}/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT}) 
    195202    ENDIF(WIN32) 
    196203ENDMACRO(SETUP_PLUGIN) 
     
    274281            INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin BUNDLE DESTINATION bin) 
    275282        ELSE(APPLE) 
    276             INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin ) 
     283            INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin COMPONENT openscenegraph ) 
    277284        ENDIF(APPLE) 
    278285 
     
    301308            INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin BUNDLE DESTINATION share/OpenSceneGraph/bin )             
    302309        ELSE(APPLE) 
    303             INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin )             
     310            INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin COMPONENT libopenscenegraph-examples )             
    304311        ENDIF(APPLE) 
    305312 
  • OpenSceneGraph/trunk/src/OpenThreads/pthreads/CMakeLists.txt

    r8493 r9339  
    106106INSTALL( 
    107107    TARGETS OpenThreads 
    108     ARCHIVE DESTINATION lib${LIB_POSTFIX} 
    109     LIBRARY DESTINATION lib${LIB_POSTFIX} 
    110     RUNTIME DESTINATION bin 
     108    ARCHIVE DESTINATION lib${LIB_POSTFIX} COMPONENT libopenthreads 
     109    LIBRARY DESTINATION lib${LIB_POSTFIX} COMPONENT libopenthreads 
     110    RUNTIME DESTINATION bin COMPONENT libopenthreads 
    111111) 
    112112INSTALL( 
    113113    FILES ${OpenThreads_PUBLIC_HEADERS} 
    114114    DESTINATION include/OpenThreads 
     115    COMPONENT libopenthreads-dev 
    115116) 
    116117 
  • OpenSceneGraph/trunk/src/OpenThreads/sproc/CMakeLists.txt

    r8498 r9339  
    3939INSTALL( 
    4040    TARGETS OpenThreads 
    41     ARCHIVE DESTINATION lib${LIB_POSTFIX} 
    42     LIBRARY DESTINATION lib${LIB_POSTFIX} 
    43     RUNTIME DESTINATION bin 
     41    ARCHIVE DESTINATION lib${LIB_POSTFIX} COMPONENT libopenthreads 
     42    LIBRARY DESTINATION lib${LIB_POSTFIX} COMPONENT libopenthreads 
     43    RUNTIME DESTINATION bin COMPONENT libopenthreads 
    4444) 
    4545INSTALL( 
    4646    FILES ${OpenThreads_PUBLIC_HEADERS} 
    4747    DESTINATION include/OpenThreads 
     48    COMPONENT libopenthreads-dev 
    4849) 
    4950 
  • OpenSceneGraph/trunk/src/OpenThreads/win32/CMakeLists.txt

    r8498 r9339  
    4242INSTALL( 
    4343    TARGETS OpenThreads 
    44     ARCHIVE DESTINATION lib 
    45     LIBRARY DESTINATION lib 
    46     RUNTIME DESTINATION bin 
     44    ARCHIVE DESTINATION lib COMPONENT libopenthreads-dev 
     45    LIBRARY DESTINATION lib COMPONENT libopenthreads 
     46    RUNTIME DESTINATION bin COMPONENT libopenthreads 
    4747) 
    4848INSTALL( 
    4949    FILES ${OpenThreads_PUBLIC_HEADERS} 
    5050    DESTINATION include/OpenThreads 
     51    COMPONENT libopenthreads-dev 
    5152) 
    5253 
  • OpenSceneGraph/trunk/src/osgPlugins/Inventor/CMakeLists.txt

    r7399 r9339  
    2424SET(TARGET_LIBRARIES_VARS INVENTOR_LIBRARY) 
    2525 
    26 SETUP_PLUGIN(iv) 
     26SETUP_PLUGIN(iv iv) 
  • OpenSceneGraph/trunk/src/osgPlugins/dae/CMakeLists.txt

    r9307 r9339  
    6060 
    6161#### end var setup  ### 
    62 SETUP_PLUGIN(dae) 
     62SETUP_PLUGIN(dae dae) 
  • OpenSceneGraph/trunk/src/osgPlugins/gdal/CMakeLists.txt

    r7315 r9339  
    1414 
    1515#### end var setup  ### 
    16 SETUP_PLUGIN(gdal) 
     16SETUP_PLUGIN(gdal gdal) 
  • OpenSceneGraph/trunk/src/osgPlugins/gecko/CMakeLists.txt

    r9192 r9339  
    6363 
    6464#### end var setup  ### 
    65 SETUP_PLUGIN(gecko) 
     65SETUP_PLUGIN(gecko gecko) 
    6666 
  • OpenSceneGraph/trunk/src/osgPlugins/pdf/CMakeLists.txt

    r9323 r9339  
    88 
    99#### end var setup  ### 
    10 SETUP_PLUGIN(pdf) 
     10SETUP_PLUGIN(pdf pdf) 
  • OpenSceneGraph/trunk/src/osgPlugins/svg/CMakeLists.txt

    r8302 r9339  
    99SET(TARGET_SRC ReaderWriterSVG.cpp ) 
    1010#### end var setup  ### 
    11 SETUP_PLUGIN(svg) 
     11SETUP_PLUGIN(svg svg) 
  • OpenSceneGraph/trunk/src/osgPlugins/vnc/CMakeLists.txt

    r9319 r9339  
    88 
    99#### end var setup  ### 
    10 SETUP_PLUGIN(vnc) 
     10SETUP_PLUGIN(vnc vnc) 
  • OpenSceneGraph/trunk/src/osgPlugins/vrml/CMakeLists.txt

    r8591 r9339  
    2323 
    2424#### end var setup  ### 
    25 SETUP_PLUGIN(vrml) 
     25SETUP_PLUGIN(vrml vrml) 
  • OpenSceneGraph/trunk/src/osgViewer/CMakeLists.txt

    r9165 r9339  
    161161   FILES        ${INCLUDEFILE} 
    162162   DESTINATION ${INSTALL_INCDIR}/${LIB_NAME}/${REL_INCLUDE_PATH} 
     163   COMPONENT libopenscenegraph-core-dev 
    163164   ) 
    164165ENDFOREACH( INCLUDEFILE)