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

Make CMake builds behave more "normal" #141

Closed
Thomas1664 opened this issue Jan 7, 2024 · 6 comments
Closed

Make CMake builds behave more "normal" #141

Thomas1664 opened this issue Jan 7, 2024 · 6 comments

Comments

@Thomas1664
Copy link

I noticed the following issues while updating the intel-ipsec port in vcpkg ( microsoft/vcpkg#36066 ):

On Windows, the DLL is copied to System32. This not only requires admin privileges but is also completely unnecessary.
Also on Windows, the structure of the installed files is completely different from the common directory layout (i.e. headers into ${PREFIX}/include, static libraries into ${PREFIX}/lib, and shared libraries into ${PREFIX}/bin). Everything is installed together in one directory. As a result, we have to move all files to their expected locations.

Additionally, it would be nice if you provided CMake config files. This would make it easier for users to consume this library and would also remove the need to copy the dll to System32 in order to be found because CMake takes care of that.

We have a policy to not build examples, tests, or documentation. It would be nice if you can provide an option to not build them.

@Thomas1664 Thomas1664 changed the title Make CMake behave more "normal" Make CMake builds behave more "normal" Jan 7, 2024
@mdcornu
Copy link
Contributor

mdcornu commented Jan 8, 2024

Thanks for your feedback, our CMake build is currently still in the experimental stage so all feedback is appreciated.
I'm not too familiar with Windows packaging or what is considered standard installation directories on Windows (e.g. what should be the default ${PREFIX}?). If you have references / examples of how this should be done that would be very useful.

We are also happy to accept contributions, so feel free to submit a PR with any improvements.

Is vcpkg building with mingw?

@Thomas1664
Copy link
Author

I'm not too familiar with Windows packaging or what is considered standard installation directories on Windows (e.g. what should be the default ${PREFIX}?). If you have references / examples of how this should be done that would be very useful.

You're probably thinking too much about that. Usually, ${PREFIX} is provided by the consumer of a package. You can follow this guide for more information on how to export CMake targets.

Is vcpkg building with mingw?

Vcpkg can build packages for mingw, but building packages for mingw is not tested in their CI.

@MonicaLiu0311
Copy link

Is there any progress?

@mdcornu
Copy link
Contributor

mdcornu commented Mar 4, 2024

I will add this work to our backlog and we can try to look into it if time permits.
For clarification on the installation path issue, the suggested directory structure should look like below?

${PREFIX}/intel-ipsec-mb/
├── bin
│   ├── libIPSec_MB.dll
│   ├── libIPSec_MB.exp
│   ├── libIPSec_MB.pdb
│   └── libIPSec_MB_lnk.def
├── include
│   └── intel-ipsec-mb.h
└── lib
    └── libIPSec_MB.lib

@Thomas1664
Copy link
Author

For clarification on the installation path issue, the suggested directory structure should look like below?

Yes.

@mdcornu
Copy link
Contributor

mdcornu commented Mar 6, 2024

For clarification on the installation path issue, the suggested directory structure should look like below?

Yes.

OK, thanks for the information. I'll close this issue for now and we will try to add these suggestions before the next release if possible. As mentioned previously, contributions are always welcome too🙂 Please re-open the issue if needed.

@mdcornu mdcornu closed this as completed Mar 6, 2024
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