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

Use Clipper2Lib/ subfolder for public headers? #232

Closed
jdumas opened this issue Sep 20, 2022 · 6 comments
Closed

Use Clipper2Lib/ subfolder for public headers? #232

jdumas opened this issue Sep 20, 2022 · 6 comments

Comments

@jdumas
Copy link

jdumas commented Sep 20, 2022

PUBLIC Clipper2Lib
SYSTEM INTERFACE Clipper2Lib

--> It would be great if we could change the official include folders to be able to write #include <Clipper2Lib/clipper.h> instead of #include <clipper.h>. Since clipper.h is a very common name, and there can be confusion with clipper 1, enforcing the use of the subfolder name for public headers would avoid a lot of integration issues I think.

@sergey-239
Copy link
Contributor

Angus,

following the common practice, it's better to use clipper2 subfolder, but the OP's idea is right one.
Regards,

Sergey

@AngusJohnson
Copy link
Owner

Thanks. This issue has been sitting here partly because I've been occupied with other things but also because I don't know what changes are needed in the makefile and whether the folder structure needs changing too.

@sergey-239
Copy link
Contributor

Angus,
I am preparing the package for Fedora Core, so I have to push some changes to the c++ cmake file. I will include this as well and come back with PR to you.

Thank you,
Sergey

@sergey-239
Copy link
Contributor

implemented in #243

@jdumas jdumas mentioned this issue Sep 29, 2022
@jdumas
Copy link
Author

jdumas commented Sep 29, 2022

As mentioned in #243, if we want to use clipper2/ as the official public header directory, then the folder structure will need changing accordingly. Copying header files to a different folder name at install is suboptimal as it only provide a cmake-specific solution when clipper2 is installed on the system via CMake. Having a folder structure that directly mimics the intended public folder structure is preferable, and would also work when using clipper2 as a subproject (e.g. via CMake FetchContent + add_subdirectory()).

@sergey-239
Copy link
Contributor

Angus,
taking to account @jdumas' considerations, do we reorganize directories and split headers into separate subdir?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants