-
Notifications
You must be signed in to change notification settings - Fork 25
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
Code restructuring #8
Comments
Hi Daniel,
Good to hear from you, and thanks your feedback.
One quick point: I'm in process of re-factoring code myself right now,
although its mainly initial cleanup of api, rather than file reorg.
Below are my initial thoughts.
Regarding cmake, the project currently already compiles using cmake, on
both windows and linux, although I see your approach is to use separate
cmakelists per dir. I don't use cmake much myself, so I don't know
what the best approach is, although separate file per dir looks better.
My own preference is for autoconf, and I kind of like the current way
of supporting both -- so a lot of your changes to directories I would
have to see how well that works for autotools. The cmake support was
earlier added by another contributor to get wampcc building on windows.
I'm unsure about including directly the code for 3rd parties. What
would be the process for keeping such sources up to date with original
projects etc? How to avoid making changes to those sources and
diverging away from the original repos? Agree though, in that it is
simpler to get going.
Other point I notice is the placing of the json.h into wampcc folder.
Unsure of this right now. Original idea was to allow wampcc to switch
out json.h to use something else (eg, rapidjson or something), hence
the desire to keep json decoupled from wampcc. Note though that after
make install, they do appear in the same directory.
As for detecting libuv and jansson from the system, very useful to
have. But I think it would also need to detect the version of
libuv/jansson available, so that minimum acceptable versions are
employed. When I tend to build open source projects, I typically always
configure them with specific versions of their dependencies (rather
than platform defaults), specifically to avoid that problem (although
current autoconf & cmake does make minimum version checks).
Once I complete my next checkin, with api cleanup, I can work on
bringin in your improvements. Initially I think I'd like to try your
cmake approach on win32.
Regards,
Darren ( email: 'wampcc' AT darrenjs.net)
…On Sat, 2017-08-05 at 02:21 -0700, Daniel Kesler wrote:
Hi Darren,
I would like to use wampcc in my project and want to help. So with
the best intentions I have done a wampcc code restructuring and made
it use purely cmake.
The project will be running on a raspberry pi with a custom linux
distro so cross-compiling is mandatory.
That is the reason why I was doing pure cmake porting.
Hope you don't feel annoyed by my intensive changes to the code
structure as some people are quite protective of their code (I'm one
of them). Also I didn't know how else to contact you so this is why I
did it over github issue.
My fork can be found here https://github.com/infinity0n3/wampcc
This is just the first step in cleaning up the source as it makes it
much easier to compile and thus more people can get involved and use
it.
What I've done so far (last night xD)
some change to the directory structure to separate source and include
files
external -> 3rdparty (as it is done in opencv code, just a matter of
taste, nothing functionally critical)
3rdparty now already includes the source code of external libraries
best to add the fetch script to 3rdpary and make it only leave the
files that are actually used in the compilation process
is more user friendly to keep the external codes packaged with the
rest as is much easier for anyone to just do git clone ... and start
playing (also later for cross-compiling and buildroot integration)
src -> utility
lib -> library
new folder include where wampcc and json are merged
everything is compile using cmake
libuv and jansson are auto detected from the system
added pkg-config files for easier integration into other projects
TODO
make libuv and jansson detectable from custom location
for now I'm using libs that are installed by apt-get (libuv1 libuv1-
dev libjansson4 libjansson4-dev) am using LinuxMint (which is based
on ubuntu xenial)
apply win32 rules (don't have windows so cannot test those)
make cmake adjustments to allow cross-compiling
Best,
Daniel Kesler
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
darrenjs
added a commit
that referenced
this issue
Sep 11, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Darren,
I would like to use
wampcc
in my project and want to help. So with the best intentions I have done a wampcc code restructuring and made it use purely cmake.The project will be running on a raspberry pi with a custom linux distro so cross-compiling is mandatory.
That is the reason why I was doing pure cmake porting.
Hope you don't feel annoyed by my intensive changes to the code structure as some people are quite protective of their code (I'm one of them). Also I didn't know how else to contact you so this is why I did it over github issue.
My fork can be found here https://github.com/infinity0n3/wampcc
This is just the first step in cleaning up the source as it makes it much easier to compile and thus more people can get involved and use it.
What I've done so far (last night xD)
fetch
script to 3rdpary and make it only leave the files that are actually used in the compilation processgit clone ...
and start playing (also later for cross-compiling and buildroot integration)TODO (
DONE
)Cross-compiling works!
Best,
Daniel Kesler
The text was updated successfully, but these errors were encountered: