Let me use a simple example to illustrate my problem, and suppose now I have the following files:
src
---CMakeLists.txt
---a.h
---a.cpp
---script.py
In the CMakeLists.txt
file, a target called lib_proj
is created:
add_library(lib_proj STATIC a.h a.cpp)
Then in Visual Studio, we can see an object target called 'lib_proj'
is created, which includes a.h
and a.cpp
. Then how can script.py
be added to this target as well?