CMAKE and Visual Studio 2019 - how to add own c-subfunctions - what to add in CMakeLists.txt?

Michael Kalinowski 1 Reputation point
2022-06-14T05:39:21.603+00:00

Hi,

I am new to CMake with VS.

I have an old project with several c modules.

When i try to compile the whole thing, everything is fine.

But when I try to add a new module named mytest.c with a function testit.c in it and call it within my main module i get a 2019 error.

And within cmake.setup I get "CMake Error at cmake/setup.cmake:73 (target_sources).

I think i missed something to reference the new module.

But where should it be done?

Thanks in advance.

cua
michael

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
41,407 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.