Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-291

cannot specify absolute INSTALL_INCLUDEDIR

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      mariadb_config has

      #define INCLUDE "-I@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@ I@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@/mysql"
      #define LIBS    "-L@CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@/ -lmariadb "\
      

      which assumes that INSTALL_INCLUDEDIR and INSTALL_LIBDIR are always
      relative to CMAKE_INSTALL_PREFIX. This is not always the case. The correct
      behavior could be, for example,

      if (INSTALL_INCLUDEDIR MATCHES "/*")
        # absolute path
        set(INSTALL_INCLUDEDIR_FOR_MARIADB_CONFIG "${INSTALL_INCLUDEDIR}")
      else()
        # relative path
        set(INSTALL_INCLUDEDIR_FOR_MARIADB_CONFIG "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDEDIR}")
      fi()
      

      or even

      if (NOT INSTALL_INCLUDEDIR MATCHES "/*")
        # relative path
        set(INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDEDIR}")
      fi()
      

      Attachments

        Activity

          People

            georg Georg Richter
            serg Sergei Golubchik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.