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
Improvements to cmake for win32 and other bits. #275
Conversation
|
Ok nice. The toolchain files look good. But we need to find a place to store them and have to think about suitable naming conventions for these files. Let's discuss that on the mailing list first. Why do you introduce those alloca defines? glib takes care of that kind of abstraction via |
|
The detection of alloca()/_alloca() intrinsic is one fix that I made into my branch for compiling FluidSynth without glib and I included it here in this first step for evaluation. Actually, it has effect on old C89 or C90 compilers like MSVC6, newer versions probably won't need that. I was also thinking what you would think about letting cmake detect this and other stuff, for example I changed things like this: into this: What do you think? |
|
glib is an inherent dependency in order to get rid of exactly those kind of
abstractions. And it'll also stay a dependency for quite some time as
mawe42 now uses gmodule in the ladspa branch. I dont want to replicate the
functionality provided by glib, we can never do this as well as glib has
done it, it's simply not our field of competence. Thus consequently I
should also say:
#define FLUID_STRCASECMP g_ascii_strncasecmp
...I would not go that far for now. But I also dont want to introduce more
cmake abstraction just to possibly get rid of glib. So in case of alloca I
would just say: either use a compiler that supports C99 VLA's OR go with
glib.
|
|
The problem with _strincmp has already been fixed in the ladspa branch. It's a typo and should have been _strnicmp. |
Ok, but this was actually a more general discussion about whether we need more |
I understand, it was more directed at carlos anyway, because he used this as an example. |
I attached here the files that I'm using for compiling fluidsynth with mingw under cygwin as cross compiler.
for example, this line creates the makefiles for 64bit build:
$ cmake ../fluidsynth -DCMAKE_TOOLCHAIN_FILE=../fluidsynth/src/cygwin-cross-mingw-64bit.cmake
Strangely, the 32 bit version worked fine but the 64 bit exe hangs after printing "Type 'help' for help topics." on the console. I just changed the compiler and nothing else, no idea about the cause of the problem. Some debugging will be needed for this.
cygwin-cross-mingw-32bit.cmake:
cygwin-cross-mingw-64bit.cmake: