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. Qt5 - CMake, find ICU and ANGLE libraries

Qt5 - CMake, find ICU and ANGLE libraries

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.4k Views 1 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.
  • L Offline
    L Offline
    lloydqt
    wrote on last edited by
    #1

    Hi,

    This is more of a CMake question, But I feel that it can be answered only by Qt guys than CMake guys. if this is not the right place, I am extremely sorry.

    I am using Qt 5.3 (Angle on Windows) with CMake 2.8.12. Qt 5.3 has dependencies on ICU and ANGLE libs. I wish to copy these dlls to the build directory. Is there any CMake variable that holds name of ICU and ANGLE libs?

    To copy other Qt libraries I am using the following sample code fragment-

    GET_TARGET_PROPERTY(QT5_LIB_LOCATION Qt5::Core LOCATION_${BUILD_TYPE})
    file(COPY ${QT5_LIB_LOCATION} DESTINATION {EXECUTABLE_OUTPUT_PATH}/${BUILD_TYPE})

    Here BUILD_TYPE can be Debug or Release

    If it is not possible to get the lib names, I wish to get the Qt bin dir path. Is any variable holding this value? I could find Qt5_DIR, but not a variable pointing to the bin directory.

    Is it possible for me to get the path to the "platforms" plugin-directory-path using CMake?

    Thanks,
    Lloyd

    1 Reply Last reply
    0
    • B Offline
      B Offline
      belab
      wrote on last edited by
      #2

      Hi Loyd,
      I'm just adding this here, because I'm searching for something similar - When working with cmake, qt and VS it's not possible to run the built application unless the appropriate qt-dlls are copied to the executable output folder or setting your PATH or "Executable Directories" in VS. I would appreciate to get some hints or links if someone knows an easy way to to achieve this, even if just hacked together. Neither the "CMake docs":http://www.cmake.org/cmake/help/v3.1/manual/cmake-qt.7.html nor the "qt docs":http://doc.qt.io/qt-5/cmake-manual.html contain any information about that.
      Example:
      @
      target_link_libraries(helloworld Qt5::Widgets)
      create_runtime(helloworld) # <- analyze target and copy all dependent dlls
      @

      A simple cmake function that copies all dependent dlls (e.g. as post build step) into the executable output folder would be very helpful.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        belab
        wrote on last edited by
        #3

        Seems like I've found something. The "windeployqt.exe":http://doc.qt.io/qt-5/windows-deployment.html#the-windows-deployment-tool
        does exactly what I want. :)

        1 Reply Last reply
        0

        • Login

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