[英]CMAKE error project files invalid ; does not contain cmakelists.txt
[英]CMake generating VS project files in the files with the CMakeLists.txt folders
我正在尝试学习 CMake 并且正在努力实现我习惯于使用 Visual Studio 制作的项目布局。
我想实现类似于以下目录结构的东西,其中.vcxproj 和 .sln 由 CMake 生成
Root
CMakeLists.txt
MySolution.sln
ProjectOne
CMakeLists.txt
ProjectOne.vcxproj
someSourceFile1.h
someSourceFile1.cpp
ProjectTwo
CMakeLists.txt
ProjectTwo.vcxproj
someSourceFile2.h
someSourceFile2.cpp
Binaries
Platform
Debug
ProjectOne.exe
ProjectTwo.dll
Release
ProjectOne.exe
ProjectTwo.dll
我似乎找到的所有教程似乎都给出了一个示例,其中结构变成了这样:
Root
Source
CMakeLists.txt
ProjectOne
CMakeLists.txt
someSourceFile1.h
someSourceFile1.cpp
ProjectTwo
CMakeLists.txt
someSourceFile2.h
someSourceFile2.cpp
Build
MySolution.sln
ProjectTwo.vcxproj
ProjectOne.vcxproj
Platform
Debug
ProjectOne.exe
ProjectTwo.dll
Release
ProjectOne.exe
ProjectTwo.dll
使用类似的命令
mkdir Build
cd build
CMake ..\Source
CMake --Build .
值得注意的是,我没有添加生成的 ALL_BUILD.vcxproj 和 ZERO_CHECK.vcxproj,我还没有理解我的需求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.