I noticed it is possible to create empty libraries like this:
add_library(header-only "header.hpp")
set_property(TARGET header-only PROPERTY LINKER_LANGUAGE CXX)
On my machine, MinGW spits out an empty 8-byte libheader-only.a, and
Visual Studio works too but outputs nothing. Is this even technically
supported at all? Is this considered portable?
I already know about INTERFACE library targets - however, it seems
that with the above approach, the header file(s) will show up in the
IDE, but not with an INTERFACE library, correct? If so, I would rather
not use INTERFACE in this case as I would like the header files to
show up in generated IDE projects.
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake