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. CMake with different Qt compilations of different configurations: Release, Debug and RelWithDebInfo

CMake with different Qt compilations of different configurations: Release, Debug and RelWithDebInfo

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 858 Views
  • 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.
  • BilbonSacquetB Offline
    BilbonSacquetB Offline
    BilbonSacquet
    wrote on last edited by BilbonSacquet
    #1

    Hello,

    I'm using conan to deliver Qt. I'm creating a package with different compilation configuration: debug, release and release with pdb (relwithdebinfo).

    At the end conan installs these configuration in different directory and create (with the help of generator) a file:

    conanbuildinfo_multi.cmake which includes:

    • list itemconanbuildinfo_debug.cmake
    • list itemconanbuildinfo_release.cmake
    • list itemconanbuildinfo_relwithdebinfo.cmake

    I get set different variable like for each of this release like: ${CONAN_QT_ROOT_RELEASE} ${CONAN_QT_ROOT_DEBUG}, ...

    Question is: how could I use find package to support in this multi-configuration different QT_ROOT?

    I have an alternative. I compile Qt debug and release (by using the -debug-and-release) which could find correctly the different libraries (find_package over the root). In this vaiant I'm stuck with 2 problems: how to support the release with debug info and (but not part of this forum) how I could create multi configuration conan package which accept in requirement the multi configuration for external libraries like OpenSSl.

    Another alternative I'm using the wrap function with all the parameters and without find_package() but I could not more AUTOMOC?

    I know the situation is a little bit tricky. I know about some communities are using Qt conan package (bincrafters, urcad, osechet) but I don't find any help.

    If someone could give me some way to search I will grandly appreciate :)

    br,
    Alexandre Desboeufs

    Current settings used inside my project is:

    cmake_policy(SET CMP0071 OLD) # not scan the Generated Files

    set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "Generated Files")

    set (CMAKE_INCLUDE_CURRENT_DIR ON)

    set (Qt5_NO_LINK_QTMAIN ON)

    if (CONAN_QT_ROOT)
    set (Qt5_DIR ${CONAN_QT_ROOT}/lib/cmake/Qt5) # to work in both multi and single build
    else ()
    set (Qt5_DIR ${CONAN_QT_ROOT_RELEASE}/lib/cmake/Qt5) # to work in both multi and single build
    endif ()

    find_package(Qt5
    COMPONENTS
    Core Gui Widgets Network Xml Test Designer Svg PrintSupport
    AxContainer AxBase OpenGL WinExtras Concurrent REQUIRED)

    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