Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-6493

cmake install (TARGET ...) component syntax is incorrect in the src/CMakeLists.txt

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.32
    • qpid-cpp-0.34
    • C++ Build
    • fedora 20

    • Patch

    Description

      The cmake build uses a development component that should allow one to build the libraries/headers needed for a client to build against by running:

      mkdir build
      cd build
      cmake ..
      make qpidmessaging
      cmake -DCOMPONENT=development -P src/cmake_install.cmake
      cmake -DCOMPONENT=runtime -P src/cmake_install.cmake

      However, this only installs the header files and then fails due to missing broker related target not existing. None of the libraries are installed.

      One problem is that the cmake install command requires the component to be specified after each of the RUNTIME, LIBRARY and ARCHIVE specifications. Because the component specification is missing in all of the RUNTIME and LIBRARY elements, they end up being associated with the "Unspecified" component, and therefore, can only be installed when a component is not specified. This is seen in the generated build/src/cmake_install.cmake file.

      The correct syntax for the install statement for a target is as shown for this updated qpidcommon target:

      install (TARGETS qpidcommon
      RUNTIME DESTINATION ${QPID_INSTALL_BINDIR} COMPONENT ${QPID_COMPONENT_COMMON}
      LIBRARY DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_COMMON}
      ARCHIVE DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_COMMON})

      Another issue is that the broker targets are grouped together with the runtime component. It should have a separate broker component in order to allow one to build just the client libraries and headers.

      Attachments

        1. CMakeLists.txt.patch
          6 kB
          Scott M Stark
        2. BuildInstallSettings.cmake.patch
          0.4 kB
          Scott M Stark

        Activity

          People

            chug Charles E. Rolke
            starksm64 Scott M Stark
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified