Ah yes, mystery solved. As usual – the butler did it. I suppose I  should read 
my own code more carefully.
In case of Release builds I’m adding “-flto” switch to the resulting object 
using this line of code:

if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
        if (WIN32)
                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Ox /fp:fast")
        endif (WIN32)

        if (LINUX)
                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto 
-funroll-all-loops -pthread")
        endif (LINUX)

        if (APPLE)
                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto")
        endif (APPLE)
endif (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")

When I also force it to exist in Debug builds the order of 
target_link_libraries function does not matter anymore and application builds 
just fine.
Sorry for the noise.

Thanks again for your help :]

Narolewski Jakub

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to