Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7751891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:39:51+00:00 2026-06-01T11:39:51+00:00

First, let’s look at the excerpt from my CMakeLists.txt : find_package(Qt4 4.8.0 COMPONENTS QtCore

  • 0

First, let’s look at the excerpt from my CMakeLists.txt:

find_package(Qt4 4.8.0 COMPONENTS QtCore QtGui QtOpenGL REQUIRED)
include(${QT_USE_FILE})
add_definitions(${QT_DEFINITIONS})

Therefore, by default we get the following definitions in Debug mode:

-DQT_DLL -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_DLL -DQT_DEBUG

So the first question is: why there are two -DQT_DLL definitions?

Now, if I append, for instance, remove_definitions(-DQT_DEBUG) – nothing changes. In other words, either remove_definitions command is bugged or these definitions are merely carved in stone.

Then I thought like “OK, maybe remove_definitions command is really bugged, let’s do it another way.” And I did list(REMOVE_ITEM QT_DEFINITIONS -DQT_DEBUG). However, it didn’t work either.

Therefore, the second question is: are these definitions really built-in and persistent and cannot be changed under any circumstances?

NOTE: Despite problems with editing these built-in definitions, it is still possible add custom definitions, for instance:

add_definitions(-DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:39:53+00:00Added an answer on June 1, 2026 at 11:39 am

    Ok, so here we have several things. It boils down to the CMake macros and their logic.

    Double -DQT_DLL comes from add_definitions(${QT_DEFINITIONS)}).
    It is enough to specify include(${QT_USE_FILE}).

    QT_USE_FILE defines QT_DEBUG (or QT_NO_DEBUG) based on the current CMAKE_BUILD_TYPE. If for whatever reason you don’t want to have QT_DEBUG in the DEBUG mode (and to work with QT_USE_FILE) there might be a way to do that. CMake puts these specific definitions in the directory properties:

    SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
    SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
    SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
    SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
    IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
      SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_DEBUG)
    ENDIF()
    

    Now, you could try tweaking these settings…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First let's look at the utility class (most javadoc has been removed to simply
First let me say I come from a background in Flash/AS3, which I realize
First let me say I'm new to Ajax. I've been reading articles from jquery.com
First let me say I come from a Microsoft background and Visual Studio is
First let me mention that I've gone through many suggested questions and found no
First let me say I have read this useful article thoroughly and am using
First let me state that, despite being a fairly new practitioner of TDD, I'm
First let me explain how I currently handle validation, say, for an IPv4 address:
First let me tell you what I want to achieve. I want a layout
First let me say that I did see this article: How to remove AspxAutoDetectCookieSupport

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.