-
Notifications
You must be signed in to change notification settings - Fork 189
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
Support for building sngrep using CMake added #462
Conversation
a4f0b9c
to
b8fd425
Compare
b8fd425
to
325a087
Compare
325a087
to
2ec8a98
Compare
2ec8a98
to
84bcfd0
Compare
…e a pkg-config file Furthermore CPACK_PACKAGE_NAME and CPACK_PACKAGE_VERSION are set explicitly since this is needed for older CMake versions. (Tested on Debian Stretch with CMake 3.7.2)
597303e
to
9609cbf
Compare
Hi! Thanks for the contribution. There is an stale branch where I started to code sngrep using glib2 that used cmake for building. I'll try to check this as soon as I have some spare time Thanks! |
Oh, I didn't know this, otherwise I would have used this for a start. Instead I have used configure.ac as template and even tried to keep the instruction order as close as possible so keeping them in sync in the future should not be too hard. (Furthermore I read the project version from configure.ac so it only needs to be updated in one place.)
|
...and using configure_file() seems to be a better approach than writing config.h inside CMakeLists.txt, I will inherit this from your CMakeLists.txt, too. |
Looks good to me, but is the code good enough to compile with those flags? :-D
Most probably I added those defines because glib-2 require them, but maybe it is not required for sngrep 1.x
No, use what you prefer. That CMakefile is from a long time ago and it's my first CMakefile, so most probably should not be used as an example. I just added the command in case you can take some ideas, but I'm far from an expert in this topic. Thanks!! |
- Compiler options '-Wall -pedantic' added - Definition of _XOPEN_SOURCE_EXTENDED added - Template configuration header file src/config.h.cmake added - README updated See also: irontec#462
At least
I have added it anyway since it should not make any harm.
I once have read "Has written a book about it or has given a talk at a conference about it" as definition for "expert". Using this definition I'm not an expert either, I'm only a user for a few years, nothing more. And some stuff is simple a matter of taste. For foreign projects I usually tend to avoid using configure_file() since an additional file is required for this and some maintainers don't like this, they are willing to accept a single CMakeLists.txt but nothing more. Since this does not apply to you I have changed it according to your CMakeLists.txt in the glib-2 branch. |
Looks awesome to me. Thanks a lot for your effort and hard work on this! |
The file CMakeLists.txt was added to enable building sngrep with CMake. (This file was derived from configure.ac.)
Furthermore a paragraph about building with CMake was added to the README.