cpp-best-practices / gui_starter_template

A template CMake project to get you started with C++ and tooling
The Unlicense
2.51k stars 445 forks source link

fix: update project_options to v0.17.0 - add package_project #198

Closed aminya closed 2 years ago

aminya commented 2 years ago

@lefticus The way you have added configured_files is not scalable. It prevents the project from being packaged. The public include directories should only use relative paths. Using CMAKE_BINARY_DIR doesn't work.

See the readme docs I have added, which includes examples for different targets: https://github.com/cpp-best-practices/project_options#usage

I was planning to add a function target_interface_include_directories, which automatically handles this. I think I should do it, as this seems like a very common issue.

lefticus commented 2 years ago

Please move this to the https://github.com/cpp-best-practices/cpp_boilerplate_project project so we can stage there, then merge into this project, to keep histories clean and mergeable.