

Because the library uses CMake we can just use the addsubdirectory() command to make all the targets. Let’s say my project structure is as follows: Engine Components bunch of. Clone the submodule if pre-compiled binary isn’t found. Game/knuckles/CMakeLists.txt add_custom_command(ĬOMMAND "py" "$ DESTINATION ". It is actually less work if the library isn’t header only and has a proper CMake setup.
I googled about it a lot, but it seems unusual for people.Īll the explanation tells me that they don’t seems experiencing the issue.Īnd it seems ‘touch’ is necessary to pick ‘depends’ option is it supposed to be necessary? We recommend CMake because it build and debug the same project on Windows, WSL, and remote systems. CMake is our recommendation for all C++ cross-platform development with Visual Studio. So a library file(lib.cpp) that including it recompiled. Visual Studio's WSL 2 toolset supports both CMake and MSBuild-based Linux projects.
#CMAKE INCLUDE REMOTE HEADER HOW TO#
When I changed the template file(DataTableSchema.h) and try build, ninja only executes custom command and not build a library.Īnd next time I command build with ninja, ninja detects that generated header file(datatable.hpp) has been modified, CMake: How to include the headers of an external library downloaded with FetchContent I would like to download a header-only library using FetchContent and then using its headers in my apps source code. Hi, I’m trying to generate a header file during build.
