polybar / xpp

xpp - A C++11 RAII wrapper for XCB
Other
7 stars 11 forks source link

build: Put generated sources into build folder #22

Closed patrick96 closed 4 years ago

patrick96 commented 4 years ago

Sometimes (especially after an update), the xpp submodule would contain outdated header files which could interfere with the compilation. These header files then needed to be manually deleted. Now the header files are in the build folder and so clearing the build folder will also clear the header files.

The proto header files are now located at:

build/lib/xpp/generated-sources/include/xpp/proto

Because the proto files are now no longer in the same place as the other header files, all #include directives for including proto headers no longer work and need to be adjusted.

@Lomadriel I have tried a long time to get the old include directives to work but I failed. I first thought the line

target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include/xpp)

somehow added an include flag only when processing the xpp header files, but it turns out that isn't the case, the whole thing also works without that line. It seems the only reason things like

#include "proto/x.hpp"
#include "generic/resource.hpp"

worked was because those are paths relative to the header file.

Do you have any idea whether we can get the old include directives to work without having to prefix all of them with xpp/?