Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add headers to generated CMake targets #22

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/boostdep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2734,6 +2734,10 @@ static void output_module_cmake_report( std::string module )
"add_library(Boost::" << lm << " ALIAS boost_" << lm << ")\n"
"\n"
"target_include_directories(boost_" << lm << " INTERFACE include)\n"
"if(NOT CMAKE_VERSION VERSION_LESS \"3.19\")\n"
" file(GLOB_RECURSE headers include/*.hpp)\n"
" target_sources(boost_optional PRIVATE ${headers})\n"
"endif()\n"
"\n"
;

Expand Down Expand Up @@ -2770,6 +2774,9 @@ static void output_module_cmake_report( std::string module )
{
// compiled library

std::cout <<

"file(GLOB_RECURSE headers include/*.hpp)\n";
std::cout <<

"add_library(boost_" << lm << "\n";
Expand All @@ -2781,6 +2788,7 @@ static void output_module_cmake_report( std::string module )

std::cout <<

" ${headers}\n"
")\n"
"\n"
"add_library(Boost::" << lm << " ALIAS boost_" << lm << ")\n"
Expand Down
Loading