Re: CMake 4

Roland Hughes via Foxgui-users <[email protected]> Sat, 27 Dec 2025 13:19:21 -0600
Newsgroups gmane.comp.lib.fox-toolkit.user
Organization Logikal Solutions
Message-ID <[email protected]>
Honestly, I hate MSYS2. Actually I hate anything to do with "Linux 
emulation" on Windows for building Windows apps.

Then again, not much supports Arch.

The Nsis64 (sp?) generator can generate Debian packages and lots of 
other things, but no RPM and no ARCH. There are something like a dozen 
generators CPack supports. I didn't look into the others.

I know, MSYS2 has fans.

 >

MSYS2 also has a alternative C-runtime libraries.

I have been sooooo fried by environments with "alternative" C/C++ 
runtime libraries."

Works on my machine and not anywhere else is what ends up happening.

Just my 0.002 cents before all the pennies are gone.


On 12/27/2025 11:38 AM, JVZ wrote:
> On Sat, 27 Dec 2025 08:54:30 -0600
> Sander Jansen <[email protected]> wrote:
>
>> I've updated my CMake project files for FOX to a minimum version of 4.0 as
>> the 3.xx releases are now considered legacy. Currently updated to 1.7.86.
>>
>> The new version is much better organized and also installs CMake config
>> files, which makes integration into other CMake projects a lot easier (just
>> import the FOX target). Out of tree builds are now properly supported. In
>> addition projects can also link directly to the build tree for testing
>> purposes without having to install FOX.
>>
>> This new version also enables PCH which basically halves the compile time
>> for FOX.
>>
>> I was able to cross compile FOX using MinGW quite easily and was even able
>> to run it under Wine without a hitch. I have not tested it under native
>> Windows yet, but I'm planning to see whether I can use CMake's FetchContent
>> to automatically fetch and compile basic dependencies like jpeg and zlib,
>> as Windows lacks package management like we do on Linux
>>
>> I did find an oddity in regards to the jpeg2000 support in FOX, as it
>> seemingly requires both HAVE_JP2_H and HAVE_J2K_H to be defined. The latter
>> appears to be used in the FXJP2{Icon/Image}, while the former is used in
>> the actual io.
>>
>> Another remaining issue is the few left over FXAPI decorators in the
>> glviewer app which breaks builds on Windows due to dlexport/ dlimport
>> mix-up. Those should be removed.
>>
>> The repo for CMake can be found here:
>> https://github.com/gogglesguy/fox/tree/cmake
>>
>> I'm in the progress of updating gogglesmm to use this as a submodule here:
>> https://github.com/gogglesmm/gogglesmm/tree/cmake4
>>
>> Cheers,
>>
>> Sander
> This sounds good.  Switching to cmake has been on the to-do list for a while
> and if your cmake configs look good it will become the official build system
> soon.
>
> For windows support w/o VC++, perhaps you can look into MSYS2?
>
> MSYS2 has [and you'll like this] the Arch package system; once you have a
> core MSYS2 installed, you can pacman -S <pkg> and pacman -Syu to update the
> whole enchilada.  Besides, MSYS2 also has a alternative C-runtime libraries.
>
> Both GCC and clang are available, even ARM target support is in there..
>
> For other projects, I've been using cmake for a bit, and VC++ CE 2019
> which I'm using has cmake-generator to flesh out VC++ project files;
> this is a huge part of my motivation to switch to CMAKE as updating
> the stupid proect files "by hand" is going to be a thing of the past.
>
>
>
>       -- JVZ
>
>
>
>
>
>
-- 
Roland Hughes, President
Logikal Solutions
(630)-205-1593  (cell)
https://theminimumyouneedtoknow.com
https://infiniteexposure.net
https://johnsmith-book.com