Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Pushing external libraries used in GIT
Forum Updated to NodeBB v4.3 + New Features

Pushing external libraries used in GIT

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 1.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Arqam
    wrote on last edited by
    #1

    I am using openCV library in my QT project.

    While developing the project I did use openCV by using few paths in my local as mentioned here : https://www.learnopencv.com/configuring-qt-for-opencv-on-osx/

    But now I have to push my code in GIT, so what should I do so that the other person pulling the project gets openCV?

    raven-worxR 1 Reply Last reply
    0
    • A Arqam

      I am using openCV library in my QT project.

      While developing the project I did use openCV by using few paths in my local as mentioned here : https://www.learnopencv.com/configuring-qt-for-opencv-on-osx/

      But now I have to push my code in GIT, so what should I do so that the other person pulling the project gets openCV?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by SGaist
      #2

      @Arqam

      1. push the code along with your code, or
      2. go the dynamic approach and let the user configure OpenCV themselves, or
      3. add the OpenCV git repo as a sub-module to your repository

      [edit: fixed small typo: yourself -> themselves SGaist]

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      A 1 Reply Last reply
      4
      • raven-worxR raven-worx

        @Arqam

        1. push the code along with your code, or
        2. go the dynamic approach and let the user configure OpenCV themselves, or
        3. add the OpenCV git repo as a sub-module to your repository

        [edit: fixed small typo: yourself -> themselves SGaist]

        A Offline
        A Offline
        Arqam
        wrote on last edited by Arqam
        #3

        @raven-worx Thanks for the reply. So there is no project management in QT?
        Also, in many thread people have said that while pushing we should add our project .pro file in .gitignore. But if we are not pushing the .pro file then how will the other person run the project when it pulls?

        raven-worxR sierdzioS 3 Replies Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          The person downloading your code should go along the same path - use pkg-config to set up OpenCV on their side.

          You can bundle OpenCV with your code, but storing binaries in GIT is not really a good idea. And you would have to store separate lib for all systems and build architectures.

          (Z(:^

          1 Reply Last reply
          2
          • A Arqam

            @raven-worx Thanks for the reply. So there is no project management in QT?
            Also, in many thread people have said that while pushing we should add our project .pro file in .gitignore. But if we are not pushing the .pro file then how will the other person run the project when it pulls?

            raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            @Arqam said in Pushing external libraries used in GIT:

            Also, in many thread people have said that while pushing we should add our project .pro file in .gitignore

            this is non-sense. Of course you should also commit your .pro file.
            You should just make sure not to use any hardcoded/absolute paths in it.

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply
            1
            • A Arqam

              @raven-worx Thanks for the reply. So there is no project management in QT?
              Also, in many thread people have said that while pushing we should add our project .pro file in .gitignore. But if we are not pushing the .pro file then how will the other person run the project when it pulls?

              sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              @Arqam said in Pushing external libraries used in GIT:

              Also, in many thread people have said that while pushing we should add our project .pro file in .gitignore

              .pro file is fine and necessary - push it.

              .pro.user file is not fine - it is a local config file, auto-generated by Qt Creator for your session. Do not push that to GIT, it won't work on other PCs than yours.

              (Z(:^

              1 Reply Last reply
              2
              • A Arqam

                @raven-worx Thanks for the reply. So there is no project management in QT?
                Also, in many thread people have said that while pushing we should add our project .pro file in .gitignore. But if we are not pushing the .pro file then how will the other person run the project when it pulls?

                raven-worxR Offline
                raven-worxR Offline
                raven-worx
                Moderators
                wrote on last edited by
                #7

                @Arqam
                you can take this as a reference for a Qt based .gitignore

                --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                If you have a question please use the forum so others can benefit from the solution in the future

                1 Reply Last reply
                2

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved