I have a C++ .h file with template classes that require the Python and Boost-Python libraries for successful linking. There is no associated .cpp file.<div><br></div><div>I consider this .h file a library that other parts of my project can use. The CMakefile.txt for those parts should not need to know the implementation detail that the Python and Boost-Python libraries are needed. Is there a way to create a pseudo-library, say, 'foo', that those other parts can link, e.g. with target_link_libraries, so that they just need to link the pseudo library 'foo' in order to effectively depend on and link to the Python and Boost-Python libraries?</div>
<div><br></div><div>Note that my pseudo-library is pseudo because it doesn't have any .cpp file. I can't actually compile that into a real library, and add_library won't allow me to specify zero source files.</div>
<div><br></div><div><br></div>