qt plugins and release builds

Shane King kde at dontletsstart.com
Wed Dec 12 02:13:34 CET 2007


Shane King wrote:

> I still have the same issue I was having with my first attempted fix 
> (not surprising since they both use the cache force method) of the 
> variables getting set in CMakeCache.txt but flags.make not reflecting 
> them, eg:

Found my problem, FindKDE4Internal.cmake overwrites what's being set in 
FindQT4.cmake if the compiler is gcc, like so:

if (CMAKE_COMPILER_IS_GNUCXX)
    set (KDE4_ENABLE_EXCEPTIONS -fexceptions)
    # Select flags.
    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
    set(CMAKE_CXX_FLAGS_RELEASE        "-O2")
    set(CMAKE_CXX_FLAGS_DEBUG          "-g -O2 -fno-reorder-blocks 
-fno-schedule-insns -fno-inline")
    set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g3 -fno-inline")
    set(CMAKE_CXX_FLAGS_PROFILE        "-g3 -fno-inline -ftest-coverage 
-fprofile-arcs")
    set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g")
    set(CMAKE_C_FLAGS_RELEASE          "-O2")
    set(CMAKE_C_FLAGS_DEBUG            "-g -O2 -fno-reorder-blocks 
-fno-schedule-insns -fno-inline")
    set(CMAKE_C_FLAGS_DEBUGFULL        "-g3 -fno-inline")
    set(CMAKE_C_FLAGS_PROFILE          "-g3 -fno-inline -ftest-coverage 
-fprofile-arcs")

Since no matter what config we're in Qt is actually compiled with 
QT_NO_DEBUG set under mingw, I've added:

    if (WIN32)
	  # qt is always compiled with QT_NO_DEBUG under mingw,
	  # so we need to compile stuff linked against it
	  # the same or otherwise QPluginLoader rejects plugins
       add_definitions(-DQT_NO_DEBUG)
    endif (WIN32)

Hopefully this should solve our issues.

Shane.



More information about the Kde-windows mailing list