CMake: How to add .def file to Visual Studio project filters?

若如初见. 提交于 2019-12-11 02:13:00

问题


How to add .def file to Visual Studio project filters (*.filters file)? Visual Studio consumes .def file.

CMake code:

set(a_src a.cpp a.def)
add_library(a SHARED ${a_src})

In solution and then in project there is no a.def file in filters, only a.cpp. But CMake generates a rule for .def file (/DEF:a.def option to linker).

Is there any way to show .def files in the project filters (a.filters file near the project)?


回答1:


This is a CMake bug. It is reported in their tracker at http://www.cmake.org/Bug/view.php?id=15313



来源:https://stackoverflow.com/questions/27469926/cmake-how-to-add-def-file-to-visual-studio-project-filters

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