Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Qmake: import an OSX framework from ~/Library/Frameworks

    General and Desktop
    3
    4
    8950
    Loading More Posts
    • 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.
    • T
      tallia1 last edited by

      Hey guys,

      I am wondering whether you think this is the simplest way to include
      an OSX framework which is deployed in the user folder "~/Library/Frameworks"

      @
      TARGET = taucs_demo
      TEMPLATE = app
      QT -= core gui
      CONFIG += console
      CONFIG -= app_bundle

      Import framework

      QMAKE_CXXFLAGS += -F$$(HOME)/Library/Frameworks
      QMAKE_LFLAGS += -F$$(HOME)/Library/Frameworks
      LIBS += -framework Taucs

      SOURCES += main.cpp
      @

      I have also experimented with setting DYLD_FRAMEWORK_PATH
      in my "~/.bashrc" or inside the Qt Creator variables without
      much luck...

      Don't you think the QMAKE_CXXFLAGS/QMAKE_LFLAGS combo
      is particularly ugly? I wish there was something like:

      @
      FRAMEWORKPATH += ....
      @

      Thoughts?

      1 Reply Last reply Reply Quote 0
      • T
        tucnak last edited by

        Advice

        Don't use QMAKE in state of label: [QMAKE]. Yust like this: qmake: Import a framework from ~/Library/Frameworks. Label must be [SOLVED] or [SELF-SOLVED].

        Solution

        1 Reply Last reply Reply Quote 0
        • G
          goetz last edited by

          In order to include frameworks to your project, you need to add to both, the include path and the library path. I would try this:

          @
          INCLUDEPATH += -F$$(HOME)/Library/Frameworks
          LIBS += -F$$(HOME)/Library/Frameworks -framework Taucs
          @

          I didn't test this, though. I would need to setup a test case with a framework in a non-standard path. Everything in /System is found anyways :-)

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply Reply Quote 1
          • T
            tallia1 last edited by

            Thanks Volker. I still think that is still sort of badly designed...

            Let me add something else, I wish Qt created its own "framework" structure, which a qt user could then use to organize his project in a cross platform fashion... Perhaps with the ability to contain compiled binaries for a number of operating systems.

            I find it terribly annoying that Qt goes a long way toward cross-platform, yet it stops one step short...

            1 Reply Last reply Reply Quote 0
            • First post
              Last post