[CMake] AUTORCC recompiles unchanged rcc files every build using ninja

Wim Bekker w.bekker at vdgsecurity.com
Wed Jun 8 04:35:11 EDT 2016


Hi,

In cmake 3.5.0, 3.5.2 and 3.6.0, my resource file is compiled every time 
I build, even when they are not changed.
|
cmake_minimum_required(VERSION 3.2)|

|project(auto_moc_uic_rcc)set(CMAKE_INCLUDE_CURRENT_DIR 
ON)set(CMAKE_AUTOMOC ON)set(CMAKE_AUTOUIC ON)set(CMAKE_AUTORCC 
ON)find_package 
(Qt5WidgetsREQUIRED)add_executable(${PROJECT_NAME}main.cpp 
MainWindowMainWindow.ui rcc.qrc 
)target_link_libraries(${PROJECT_NAME}Qt5::Widgets)|


If instead I use |qt5_add_resources(RCC rcc.qrc) and add ${RCC} to 
add_executable the resource file is not build everytime.

I use ninja as generator.

Is this a bug or is my cmakelists.txt file not correct?

Thanks,
Wim
|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160608/295cd1b1/attachment.html>


More information about the CMake mailing list