Need a way to disable installation of header files
codeInnovation opened this issue · comments
I need a way to disable the installation of the files such as the public header files when built with CMake. If you try to embed the uriparser as a static library, these files get automatically installed with the package. When two installers both try to include the uriparser library, then there is a collision and it becomes impossible to install both packages. In other words, I'm looking for an option like Google Test's INSTALL_GTEST in the uriparser library, that can be switched off when needed.
What are your thoughts on this? Is there a way to turn off installation of files today? I didn't see a way yet in the CMakeLists.txt file. I'm certainly willing to help make the change.
In other words you need a switch to bypass all of
Lines 187 to 204 in ba9990a
Are you aware of the problems described at https://wiki.gentoo.org/wiki/Why_not_bundle_dependencies ?
Yes I was hoping for a switch to disable the install command. There are several calls to install in CMakeLists.txt. I have a change on a fork that bypasses them all. I wasn't really certain if they all needed to be bypassed though or if just the one you have shown would be sufficient.
As for the problems with static linking, I guess that is true. It does have drawbacks but deployment environments can be challenging sometimes.
Do you want to share your version as a pull request or would you rather want to review a pull request done by me? For a name I'd like URIPARSER_INSTALL
, I think. Default would be ON
.
I'll submit a pull request. Thanks!