I have an add_custom_target
that triggers a make for a project (that project does not use cmake!) and generates an object file. I would like to add this object
You can list object files along sources in add_executable()
and addlibrary()
:
add_executable(myProgram
source.cpp
object.o
)
The only thing is that you need to use add_custom_command
to produce object files, so CMake would know where to get them. This would also make sure your object files are built before myProgram
is linked.