Yeah, we all do such ugly hack for header project. However it's time to change this situation right? I think current version of interface library is already closed to what header library project wants, through maybe original design goal was not going to do so, but I couldn’t see any scene to use interface library except for header-only library target.
Yes, I’m badly want this feature, because AFAK there doesn’t exist an open source, cross-platform build system yet to support header-only target in a graceful way. CMake already did many things right as a C/C++ build system, compared to many other ones, I hope Make could be the first one fulfill this. > 在 2015年7月13日,下午5:38,Tim Blechmann <tim at klingt.org> 写道: > >> I've recently switched from CMake 2.8.12 to 3.2, full of enthusiasm that >> header-only libraries would now be better supported through the >> INTERFACE option/target. However, the support for header-only libraries >> isn't really great, in particular if you're using an IDE like Visual Studio. >> >> The main problem is that if you define an INTERFACE target, there's no >> way to specify headers, and they won't show up in IDEs. There's >> workarounds with a custom target, but that's not really great for >> example to set dependencies, populate the include directory of the >> library or to INSTALL the target. > > i'm sometimes using the workaround of generating a dummy cpp file and > use a static library instead of an interface library ... ugly hack, but > allows to populate msvc/xcode/qtcreator 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-developers