Describe the bug
When I use the library as a cmake subdirectory, the targets and files do not get installed even if I need them to be installed. The following line cannot be bypassed and GHC_FILESYSTEM_WITH_INSTALL cannot be set
|
cmake_dependent_option(GHC_FILESYSTEM_WITH_INSTALL |
This was introduced on jpd002/Play-#825 because the final application did not need the headers (i.e. consumption is PRIVATE), but that's not the case in general (i.e. consumption is PUBLIC). Development libraries, may need to provide these headers as well.
To Reproduce
Here is the situation: I have a target target_a that depends on target_b (i.e ghc_filesystem).
target_link_libraries(target_a PUBLIC target_b)
The problem comes when I want to install and export my target target_a.
install(TARGETS target_a EXPORT target_a_targets ...)
install(EXPORT target_a_targets ...)
If target_b is not installed as well, then CMake complains that it will not be able to find such target again when reading the configure script for my project. Which is true, after all, target_b is not installed. In such case, the target_b happens to be relatively useless (in the Modern CMake usage) and one has to manually add complier flags, include directories, etc.
Expected behavior
The GHC_FILESYSTEM_WITH_INSTALL option can be set when using the library as a subdirectory.
Describe the bug
When I use the library as a cmake subdirectory, the targets and files do not get installed even if I need them to be installed. The following line cannot be bypassed and
GHC_FILESYSTEM_WITH_INSTALLcannot be setfilesystem/CMakeLists.txt
Line 17 in de57485
This was introduced on jpd002/Play-#825 because the final application did not need the headers (i.e. consumption is
PRIVATE), but that's not the case in general (i.e. consumption isPUBLIC). Development libraries, may need to provide these headers as well.To Reproduce
Here is the situation: I have a target
target_athat depends ontarget_b(i.eghc_filesystem).The problem comes when I want to install and export my target
target_a.If
target_bis not installed as well, then CMake complains that it will not be able to find such target again when reading the configure script for my project. Which is true, after all,target_bis not installed. In such case, thetarget_bhappens to be relatively useless (in the Modern CMake usage) and one has to manually add complier flags, include directories, etc.Expected behavior
The
GHC_FILESYSTEM_WITH_INSTALLoption can be set when using the library as a subdirectory.