How to put files generated by CMAKE_AUTOMOC in specific folder

走远了吗. 提交于 2020-01-24 13:02:05

问题


I am doing a out of source build with CMake. It is my current folder structure:

|_ProjectRoot
  |_build
  |_src
  |_inc

Since I am using Qt, my CMakeLists.txt file contains these line in order to generate required ui_*.h and moc_*.h:

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

All ui_*.h and moc_*.h files are put in ProjectRoot\build by default.

Is there any chance I can specify the moc_*.h generated to be put under ProjectRoot\moc and ui_*.h to be put under ProjectRoot\ui.


回答1:


CMake has no option to do that.



来源:https://stackoverflow.com/questions/34824156/how-to-put-files-generated-by-cmake-automoc-in-specific-folder

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!