I am moving our project repo from MSVC project files to CMake. But one special module I want to leave in .vcxproj. This seem to be possible thanks to include_external_msproject(). There are a number of issues with this command. But the most stopping is that I need to somehow define dependences.
Well, I use add_dependencies(). But it seems to be that CMake doesn't enforce dependent module to bi compiled :(
Is there any way to force dependency compilation?
In the
include_external_msprojectdid you list the library dependency at the end? Also are you able to add the dependent library project as aMODULE?I came across this same problem and here's what fixed it for me:
In the library, e.g. mylib/CMakeLists.txt
In the project, e.g. myproject/CMakeLists.txt