Re: CMake 4
Sander Jansen <[email protected]> Tue, 30 Dec 2025 13:19:51 -0600
| Newsgroups | gmane.comp.lib.fox-toolkit.user |
|---|---|
| Message-ID | <CACj81kFy2rTfpYs+CR0QH7xSPiqBbLkh8NmwtZaDqkVZngUV1A@mail.gmail.com> |
--===============0868460837473991775== Content-Type: multipart/alternative; boundary="0000000000001b69be0647303fa3" --0000000000001b69be0647303fa3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable So looks like both msys2 and vcpkg could work well here and we can basically leave it up to the user to decide what works best for them. No specific cases needed in the cmake project. The FetchContent cmake feature could work as a backup in case we don't find anything, as the more popular dependencies (zlib, jpeg. tiff, openjpeg) can be easily integrated (they come with cmake already) and would perhaps also work for cross-compiling things. The minimum cmake requirement probably can be dropped to 3.23. On Sat, Dec 27, 2025 at 11:38=E2=80=AFAM JVZ <[email protected]> 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. I= n > >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 tim= e > >for FOX. > > > >I was able to cross compile FOX using MinGW quite easily and was even ab= le > >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 her= e: > >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 > > > > > > > -- > > +------------------------------------------------------------------------= ----+ > | Copyright (C) 11:20 12/27/2025 Jeroen van der Zijp. All Rights > Reserved. | > > +------------------------------------------------------------------------= ----+ > --0000000000001b69be0647303fa3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>So looks like both msys2 and vcpkg could work well he= re and we can basically leave it up to the user to decide what works best f= or them. No specific cases needed in the cmake project.<br><br>The FetchCon= tent cmake feature could work as a backup in case we don't find anythin= g, as the more popular dependencies (zlib, jpeg. tiff, openjpeg) can be eas= ily integrated (they come with cmake already) and would perhaps also work f= or cross-compiling things.<br><br></div>The minimum cmake requirement proba= bly can be dropped to 3.23.=C2=A0<br><br><br></div><br><div class=3D"gmail_= quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, = Dec 27, 2025 at 11:38=E2=80=AFAM JVZ <<a href=3D"mailto:jeroen@fox-toolk= it.com">[email protected]</a>> wrote:<br></div><blockquote class=3D= "gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2= 04,204,204);padding-left:1ex">On Sat, 27 Dec 2025 08:54:30 -0600<br> Sander Jansen <<a href=3D"mailto:[email protected]" target=3D"_blank">s= [email protected]</a>> wrote:<br> <br> >I've updated my CMake project files for FOX to a minimum version of= 4.0 as<br> >the 3.xx releases are now considered legacy. Currently updated to 1.7.8= 6.<br> ><br> >The new version is much better organized and also installs CMake config= <br> >files, which makes integration into other CMake projects a lot easier (= just<br> >import the FOX target). Out of tree builds are now properly supported. = In<br> >addition projects can also link directly to the build tree for testing<= br> >purposes without having to install FOX.<br> ><br> >This new version also enables PCH which basically halves the compile ti= me<br> >for FOX.<br> ><br> >I was able to cross compile FOX using MinGW quite easily and was even a= ble<br> >to run it under Wine without a hitch. I have not tested it under native= <br> >Windows yet, but I'm planning to see whether I can use CMake's = FetchContent<br> >to automatically fetch and compile basic dependencies like jpeg and zli= b,<br> >as Windows lacks package management like we do on Linux<br> ><br> >I did find an oddity in regards to the jpeg2000 support in FOX, as it<b= r> >seemingly requires both HAVE_JP2_H and HAVE_J2K_H to be defined. The la= tter<br> >appears to be used in the FXJP2{Icon/Image}, while the former is used i= n<br> >the actual io.<br> ><br> >Another remaining issue is the few left over FXAPI decorators in the<br= > >glviewer app which breaks builds on Windows due to dlexport/ dlimport<b= r> >mix-up. Those should be removed.<br> ><br> >The repo for CMake can be found here:<br> ><a href=3D"https://github.com/gogglesguy/fox/tree/cmake" rel=3D"norefer= rer" target=3D"_blank">https://github.com/gogglesguy/fox/tree/cmake</a><br> ><br> >I'm in the progress of updating gogglesmm to use this as a submodul= e here:<br> ><a href=3D"https://github.com/gogglesmm/gogglesmm/tree/cmake4" rel=3D"n= oreferrer" target=3D"_blank">https://github.com/gogglesmm/gogglesmm/tree/cm= ake4</a><br> ><br> >Cheers,<br> ><br> >Sander<br> <br> This sounds good.=C2=A0 Switching to cmake has been on the to-do list for a= while<br> and if your cmake configs look good it will become the official build syste= m<br> soon.<br> <br> For windows support w/o VC++, perhaps you can look into MSYS2? <br> <br> MSYS2 has [and you'll like this] the Arch package system; once you have= a <br> core MSYS2 installed, you can pacman -S <pkg> and pacman -Syu to upda= te the <br> whole enchilada.=C2=A0 Besides, MSYS2 also has a alternative C-runtime libr= aries.<br> <br> Both GCC and clang are available, even ARM target support is in there..<br> <br> For other projects, I've been using cmake for a bit, and VC++ CE 2019<b= r> which I'm using has cmake-generator to flesh out VC++ project files;<br= > this is a huge part of my motivation to switch to CMAKE as updating<br> the stupid proect files "by hand" is going to be a thing of the p= ast.<br> <br> <br> <br> =C2=A0 =C2=A0 =C2=A0-- JVZ<br> <br> <br> <br> <br> <br> <br> -- <br> +--------------------------------------------------------------------------= --+<br> | Copyright (C) 11:20 12/27/2025 Jeroen van der Zijp.=C2=A0 =C2=A0All Right= s Reserved. |<br> +--------------------------------------------------------------------------= --+<br> </blockquote></div> --0000000000001b69be0647303fa3-- --===============0868460837473991775== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============0868460837473991775== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Foxgui-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/foxgui-users --===============0868460837473991775==--