SDL2 Moving to CMake?

Sam, Ryan, Community, what are your thoughts?

I really, really want to do this.

(one more benefit: the configure script on Cygwin takes several minutes
to run, CMake should take a few seconds. At least I hope so.)

I’ve actually started on it here, but our configure script is pretty
complex and I don’t want to chop out functionality just to get it done,
so it’s a bit of a painful translation thus far.

I don’t have a timetable for finishing this.

–ryan.

Ryan, you should add your Cmake stuff to the repo - even though it’s not
done, it means people can start submitting patches and help you out. Just
put a warning or something in the README file to let people know that CMake
isn’t fully functionaly yet.

Also, this may be a good time to ask you, would CMake eventually do-away
with the sdl-config and sdl2-config scripts? It’s my opinion that we
should keep those alive, because they are very useful to check if SDL
install correctly, and doing quick command-line builds.On Tue, Aug 14, 2012 at 12:00 PM, Ryan C. Gordon wrote:

Sam, Ryan, Community, what are your thoughts?

I really, really want to do this.

(one more benefit: the configure script on Cygwin takes several minutes to
run, CMake should take a few seconds. At least I hope so.)

I’ve actually started on it here, but our configure script is pretty
complex and I don’t want to chop out functionality just to get it done, so
it’s a bit of a painful translation thus far.

I don’t have a timetable for finishing this.

–ryan.

_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

The answer is it took 3 hours to google the situation. This is my last
post. before i was asking not telling. when u ask u know u may be wrong.
asking or not knowing are not crimes in a mail list thats there for
questions. what’s your problem?

after a couple hours of goofle the last puzzle parts fall into place. cmake
was made because people thought msvc was too hard to use without a helper
program. Now that msvc has evolved some still love cmake but others find it
redundant and useless, or even an extra level of complexity to overcome.
https://plus.google.com/112611842306597061311/posts/1FZG3Wx8XTt#112611842306597061311/posts/1FZG3Wx8XTtOn Tue, Aug 14, 2012 at 9:30 AM, Patrick Baggett <baggett.patrick at gmail.com>wrote:

On Tue, Aug 14, 2012 at 6:07 AM, R Manard <@R_Manard> wrote:

after a couple hours of goofle the last puzzle parts fall into place.
cmake was made because people thought msvc was too hard to use without a
helper program. Now that msvc has evolved some still love cmake but others
find it redundant and useless, or even an extra level of complexity to
overcome.

https://plus.google.com/112611842306597061311/posts/1FZG3Wx8XTt#112611842306597061311/posts/1FZG3Wx8XTt

What?..no. You consistently don’t read and jump to wrong conclusions.
Every post you make you’re getting told how way off base you are. Aren’t
you tired of it? Dude, seriously, you’re wrong all the time; slow down and
really read about the subject before you write posts or don’t write
anything at all if you don’t know what you’re saying.

CMake is not a crossplatform compiler. CMake is not something that was
made because MSVC is hard. CMake isn’t redundant and useless because MSVC
evolved. CMake is a metabuild system. It allows you to describe steps
to build your software, but the steps aren’t tied to a particular build
system such as MSVC or GNU make or Xcode. After running CMake, you’ll
generate files that can then be executed by your platform’s native build
system. It’s a way of not having to maintain multiple platforms’ build
systems. It saves time and effort when working on large, crossplatform
projects. If you had read CMake’s homepage, in the first paragraph you
could see it’s purpose:
“CMake generates native makefiles and workspaces that can be used in the
compiler environment of your choice.”

If you had read the wiki article, you could see it too:
“CMake can generate makefiles http://en.wikipedia.org/wiki/Makefile for
many platforms and IDEs including Unix http://en.wikipedia.org/wiki/Unix
, Windows http://en.wikipedia.org/wiki/Windows, Mac OS Xhttp://en.wikipedia.org/wiki/Mac_OS_X
, OS/2 http://en.wikipedia.org/wiki/OS/2, MSVChttp://en.wikipedia.org/wiki/MSVC
, Cygwin http://en.wikipedia.org/wiki/Cygwin, MinGWhttp://en.wikipedia.org/wiki/MinGW
and Xcode http://en.wikipedia.org/wiki/Xcode.”

Patrick


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

after a couple hours of goofle the last puzzle parts fall into place. cmake
was made because people thought msvc was too hard to use without a helper
program. Now that msvc has evolved some still love cmake but others find it
redundant and useless, or even an extra level of complexity to overcome.

https://plus.google.com/112611842306597061311/posts/1FZG3Wx8XTt#112611842306597061311/posts/1FZG3Wx8XTtOn Tue, Aug 14, 2012 at 11:34 AM, R Manard <@R_Manard> wrote:

The answer is it took 3 hours to google the situation. This is my last
post. before i was asking not telling. when u ask u know u may be wrong.
asking or not knowing are not crimes in a mail list thats there for
questions. what’s your problem?

after a couple hours of goofle the last puzzle parts fall into place.
cmake was made because people thought msvc was too hard to use without a
helper program. Now that msvc has evolved some still love cmake but others
find it redundant and useless, or even an extra level of complexity to
overcome.

https://plus.google.com/112611842306597061311/posts/1FZG3Wx8XTt#112611842306597061311/posts/1FZG3Wx8XTt

On Tue, Aug 14, 2012 at 9:30 AM, Patrick Baggett < baggett.patrick at gmail.com> wrote:

On Tue, Aug 14, 2012 at 6:07 AM, R Manard <@R_Manard> wrote:

after a couple hours of goofle the last puzzle parts fall into place.
cmake was made because people thought msvc was too hard to use without a
helper program. Now that msvc has evolved some still love cmake but others
find it redundant and useless, or even an extra level of complexity to
overcome.

https://plus.google.com/112611842306597061311/posts/1FZG3Wx8XTt#112611842306597061311/posts/1FZG3Wx8XTt

What?..no. You consistently don’t read and jump to wrong conclusions.
Every post you make you’re getting told how way off base you are. Aren’t
you tired of it? Dude, seriously, you’re wrong all the time; slow down and
really read about the subject before you write posts or don’t write
anything at all if you don’t know what you’re saying.

CMake is not a crossplatform compiler. CMake is not something that was
made because MSVC is hard. CMake isn’t redundant and useless because MSVC
evolved. CMake is a metabuild system. It allows you to describe steps
to build your software, but the steps aren’t tied to a particular build
system such as MSVC or GNU make or Xcode. After running CMake, you’ll
generate files that can then be executed by your platform’s native build
system. It’s a way of not having to maintain multiple platforms’ build
systems. It saves time and effort when working on large, crossplatform
projects. If you had read CMake’s homepage, in the first paragraph you
could see it’s purpose:
“CMake generates native makefiles and workspaces that can be used in the
compiler environment of your choice.”

If you had read the wiki article, you could see it too:
“CMake can generate makefiles http://en.wikipedia.org/wiki/Makefile for
many platforms and IDEs including Unixhttp://en.wikipedia.org/wiki/Unix
, Windows http://en.wikipedia.org/wiki/Windows, Mac OS Xhttp://en.wikipedia.org/wiki/Mac_OS_X
, OS/2 http://en.wikipedia.org/wiki/OS/2, MSVChttp://en.wikipedia.org/wiki/MSVC
, Cygwin http://en.wikipedia.org/wiki/Cygwin, MinGWhttp://en.wikipedia.org/wiki/MinGW
and Xcode http://en.wikipedia.org/wiki/Xcode.”

Patrick


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

well, thats a common question easily aswered with the top couple search
results. i dont blame you for asking:
http://en.wikipedia.org/wiki/Cross_compiler or
http://dictionary.reference.com/browse/cross-compiler
yes, you can run the code it makes on on Linux, Mac, Win, etc.On Tue, Aug 14, 2012 at 6:53 AM, Paul Melis <paul.melis at sara.nl> wrote:

On 08/14/12 11:49, R Manard wrote:

wow. so its a cross platform compiler like msvc but not as advanced?

I’m curious, since when is msvc a cross platform compiler? Can you run it
on Linux, Mac, Win, etc. like CMake?

Paul

On Mon, Aug 13, 2012 at 6:54 PM, Daniel Leslie wrote:

You will need to use the CMake application to generate a MSVC compatible
build file.

http://www.cmake.org/

-Dan

On Mon, Aug 13, 2012 at 4:51 PM, R Manard <@R_Manard> wrote:

How do i compile a cmake version of sdl in msvc?

On Sun, Aug 12, 2012 at 10:11 PM, Alex Barry <alex.barry at gmail.com>wrote:

I just read this in another thread and think it deserves some more
attention in a general sense.

I also wanted to bring up the advantages that CMake offers over our
mixed configure/make and msvc projects.

  • Cmake is portable - it works across Mac, Windows (msvc, mingw32,
    cygwin), and linux.
  • It can generate the appropriate project files for various
    platforms, IDEs, and compilers.
  • It makes build customization a little more user friendly
    (especially for people who want to avoid the commandline)
  • Will help keep all the different project files in sync

The only downside I can see is that not everyone is comfortable with
CMake, or with the general idea of adding another layer/step in the
building process of SDL.

I don’t know much about making CMake files, but I recall one or two
people volunteering to help make it possible.

Sam, Ryan, Community, what are your thoughts?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I probably shouldn’t bother to explain it, but ah well, here we go.

My problem with your posts thus far (and on many threads) is you don’t make
good faith efforts to understand the problem and you add useless input
about things that you don’t know about. That isn’t about being “right” or
"wrong" necessarily, nobody was born knowing any of this, and yet here we
all are at varying levels of knowledge. It’s like your strategy of
participation and research is utterly broken.

Let’s suppose everyone was discussing “XInput” and I didn’t know what it
was. If I asked on the mailing list, “what does xinput do?”, then I have
effectively wasted my own time and anyone else who responds to my purely
innocent question. Sure enough, using Google I can come up with tons of
pageshttps://www.google.com/#hl=en&safe=off&sclient=psy-ab&q=what+does+xinput+do&oq=what+does+xinput+do&gs_l=serp.3..0i13i30j0i8i13i30l3.2616.5277.0.5503.23.15.2.5.6.1.143.1124.11j4.15.0.les%3B..0.0...1c.WBjxUUVLnSA&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=8171fb77536c4765&biw=1920&bih=979that
explain what it does. Maybe
I’ll read the first link on the search
resultshttp://msdn.microsoft.com/en-us/library/windows/desktop/ee417001(v=vs.85).aspxpage.
Maybe I’m still not getting it. Oh, look, Wikipedia
has an article on XInput http://en.wikipedia.org/wiki/DirectInput#XInput.
This took me about a minute, but heck, let’s say it took me 15. Why on
earth would I ask anyone to do something that I can easily and quickly do
on my own? We’re not talking about explaining difficult concepts here,
we’re talking about basic one sentence stuff like "what is ".

You “google for 3 hours” (sure you did) and somewhere along the way, you
come up with 3 utter garbage posts and put them it on the mailing list,
where everyone corrects you. I point out that if you took 2 minutes to type
http://www.cmake.org/ into a browser address bar and read the homepage, you
would, in fact, know that CMake is a metabuild system. Instead, you
supposedly read (with your eyes shut?), then post. Then “read” more, post
something. Then “read” more, post something. Stop doing this. You aren’t
adding to the discussion, you’re making everyone thing you are a troll, 12
years old, or utterly stupid. I’m sure you want to be none of these.

The point is if you don’t know what CMake is, then you don’t belong in this
discussion until you do. It isn’t a crime to ask questions, but it is when
you don’t get off your ass to even try. Right now, you slow down the
discussion, confuse others, write incoherently, and generally just don’t
have anything insightful to add. You can change that by simply slowing
down, writing full sentences, and not jumping to conclusions. Why don’t you
download CMake and get a “Hello, World” program to build using MSVC and
Linux and share your insights after that. Was CMake hard to install? Was it
easy to set up? Was it easy to write the scripts? Was the MSVC file buggy?
Did the UNIX makefiles function? Would be easy to add an Xcode target? What
are your impressions on that?

Those insights and opinions are valuable discussion points that can help
influence whether CMake is accepted as a “official” build system.

PatrickOn Tue, Aug 14, 2012 at 11:34 AM, R Manard wrote:

The answer is it took 3 hours to google the situation. This is my last
post. before i was asking not telling. when u ask u know u may be wrong.
asking or not knowing are not crimes in a mail list thats there for
questions. what’s your problem?

after a couple hours of goofle the last puzzle parts fall into place.
cmake was made because people thought msvc was too hard to use without a
helper program. Now that msvc has evolved some still love cmake but others
find it redundant and useless, or even an extra level of complexity to
overcome.

https://plus.google.com/112611842306597061311/posts/1FZG3Wx8XTt#112611842306597061311/posts/1FZG3Wx8XTt

On Tue, Aug 14, 2012 at 9:30 AM, Patrick Baggett < @Patrick_Baggett> wrote:

On Tue, Aug 14, 2012 at 6:07 AM, R Manard wrote:

after a couple hours of goofle the last puzzle parts fall into place.
cmake was made because people thought msvc was too hard to use without a
helper program. Now that msvc has evolved some still love cmake but others
find it redundant and useless, or even an extra level of complexity to
overcome.

https://plus.google.com/112611842306597061311/posts/1FZG3Wx8XTt#112611842306597061311/posts/1FZG3Wx8XTt

What?..no. You consistently don’t read and jump to wrong conclusions.
Every post you make you’re getting told how way off base you are. Aren’t
you tired of it? Dude, seriously, you’re wrong all the time; slow down and
really read about the subject before you write posts or don’t write
anything at all if you don’t know what you’re saying.

CMake is not a crossplatform compiler. CMake is not something that was
made because MSVC is hard. CMake isn’t redundant and useless because MSVC
evolved. CMake is a metabuild system. It allows you to describe steps
to build your software, but the steps aren’t tied to a particular build
system such as MSVC or GNU make or Xcode. After running CMake, you’ll
generate files that can then be executed by your platform’s native build
system. It’s a way of not having to maintain multiple platforms’ build
systems. It saves time and effort when working on large, crossplatform
projects. If you had read CMake’s homepage, in the first paragraph you
could see it’s purpose:
“CMake generates native makefiles and workspaces that can be used in the
compiler environment of your choice.”

If you had read the wiki article, you could see it too:
“CMake can generate makefiles http://en.wikipedia.org/wiki/Makefile for
many platforms and IDEs including Unixhttp://en.wikipedia.org/wiki/Unix
, Windows http://en.wikipedia.org/wiki/Windows, Mac OS Xhttp://en.wikipedia.org/wiki/Mac_OS_X
, OS/2 http://en.wikipedia.org/wiki/OS/2, MSVChttp://en.wikipedia.org/wiki/MSVC
, Cygwin http://en.wikipedia.org/wiki/Cygwin, MinGWhttp://en.wikipedia.org/wiki/MinGW
and Xcode http://en.wikipedia.org/wiki/Xcode.”

Patrick


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

No, no it isn’t!

NO.

CMake is not a compiler! It is not anything like MSVC.

This is what I mean. Stop writing. Stop. Read. Think. You’re just confusing
people because you aren’t reading. If you read the other 3 posts, you’d
know that* CMake is not a cross compiler, it’s a metabuild system*. You
still have to have a compiler installed.On Tue, Aug 14, 2012 at 12:02 PM, R Manard wrote:

well, thats a common question easily aswered with the top couple search
results. i dont blame you for asking:
http://en.wikipedia.org/wiki/Cross_compiler or
http://dictionary.reference.com/browse/cross-compiler
yes, you can run the code it makes on on Linux, Mac, Win, etc.

On Tue, Aug 14, 2012 at 6:53 AM, Paul Melis <paul.melis at sara.nl> wrote:

On 08/14/12 11:49, R Manard wrote:

wow. so its a cross platform compiler like msvc but not as advanced?

I’m curious, since when is msvc a cross platform compiler? Can you run it
on Linux, Mac, Win, etc. like CMake?

Paul

I believe your confusion is arising between the distinction of what
constitutes a compiler and what constitutes a build system. A build system
manages the execution of multiple compiler steps, amongst other build
operations. Most build systems can be configured to automate a variety of
tasks in a predictable manner, including compilation, but also as far
ranging as packaging assets and running arbitrary commands.

CMake is a meta-build system. Based on a set of rules it generates
configuration files for a variety of build systems, including MSVC, Make,
and others. It allows the programmer to write a library that, once
configured with CMake, can easily be integrated with a wide variety of
other build systems.

For instance, SDL could be targeted for MSVC and included seamlessly into a
visual studio project just as easily as it could be targeted for bare
makefiles. This transfers the cumbersome cost of library configuration from
SDL’s users down to the SDL developers.

As more of an aside: technically, Microsoft does produce a cross-compiler.
But the number of platforms it can target does not cover all of SDL’s
current set of targets.

-DanOn Tue, Aug 14, 2012 at 10:02 AM, R Manard wrote:

well, thats a common question easily aswered with the top couple search
results. i dont blame you for asking:
http://en.wikipedia.org/wiki/Cross_compiler or
http://dictionary.reference.com/browse/cross-compiler
yes, you can run the code it makes on on Linux, Mac, Win, etc.

On Tue, Aug 14, 2012 at 6:53 AM, Paul Melis <paul.melis at sara.nl> wrote:

On 08/14/12 11:49, R Manard wrote:

wow. so its a cross platform compiler like msvc but not as advanced?

I’m curious, since when is msvc a cross platform compiler? Can you run it
on Linux, Mac, Win, etc. like CMake?

Paul

On Mon, Aug 13, 2012 at 6:54 PM, Daniel Leslie <@Daniel_Leslie> wrote:

You will need to use the CMake application to generate a MSVC compatible
build file.

http://www.cmake.org/

-Dan

On Mon, Aug 13, 2012 at 4:51 PM, R Manard wrote:

How do i compile a cmake version of sdl in msvc?

On Sun, Aug 12, 2012 at 10:11 PM, Alex Barry <alex.barry at gmail.com>wrote:

I just read this in another thread and think it deserves some more
attention in a general sense.

I also wanted to bring up the advantages that CMake offers over our
mixed configure/make and msvc projects.

  • Cmake is portable - it works across Mac, Windows (msvc, mingw32,
    cygwin), and linux.
  • It can generate the appropriate project files for various
    platforms, IDEs, and compilers.
  • It makes build customization a little more user friendly
    (especially for people who want to avoid the commandline)
  • Will help keep all the different project files in sync

The only downside I can see is that not everyone is comfortable with
CMake, or with the general idea of adding another layer/step in the
building process of SDL.

I don’t know much about making CMake files, but I recall one or two
people volunteering to help make it possible.

Sam, Ryan, Community, what are your thoughts?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Sigh, I know what cross-compiling is, I also now that CMake is not a
compiler, it is a cross-platform build system that generates Make/MSVC
project/ninja/… files, which in turn drives a project build
(compilation, linking, etc). But I’m pretty sure MSVC is not
cross-platform, hence my question. It can only run on Windows flavors
and only generate code for Windows platforms.

You’ve had some pretty well-written and clearifying replies, perhaps you
should read them carefully first before replying again

PaulOn 08/14/12 19:02, R Manard wrote:

well, thats a common question easily aswered with the top couple
search results. i dont blame you for asking:
http://en.wikipedia.org/wiki/Cross_compiler or
http://dictionary.reference.com/browse/cross-compiler
yes, you can run the code it makes on on Linux, Mac, Win, etc.

On Tue, Aug 14, 2012 at 6:53 AM, Paul Melis <@Paul_Melis mailto:Paul_Melis> wrote:

On 08/14/12 11:49, R Manard wrote:
wow. so its a cross platform compiler like msvc but not as advanced?
I'm curious, since when is msvc a cross platform compiler? Can you
run it on Linux, Mac, Win, etc. like CMake?

Paul
On Mon, Aug 13, 2012 at 6:54 PM, Daniel Leslie <dan at ironoxide.ca <mailto:dan at ironoxide.ca>> wrote:

    You will need to use the CMake application to generate a MSVC
    compatible build file.

    http://www.cmake.org/

    -Dan


    On Mon, Aug 13, 2012 at 4:51 PM, R Manard <dranikist at gmail.com <mailto:dranikist at gmail.com>> wrote:

        How do i compile a cmake version of sdl in msvc?

        On Sun, Aug 12, 2012 at 10:11 PM, Alex Barry <alex.barry at gmail.com <mailto:alex.barry at gmail.com>> wrote:

            I just read this in another thread and think it
            deserves some more attention in a general sense.

            I also wanted to bring up the advantages that CMake
            offers over our mixed configure/make and msvc projects.

              * Cmake is portable - it works across Mac, Windows
                (msvc, mingw32, cygwin), and linux.
              * It can generate the appropriate project files for
                various platforms, IDEs, and compilers.
              * It makes build customization a little more user
                friendly (especially for people who want to avoid
                the commandline)
              * Will help keep all the different project files in
                sync

            The only downside I can see is that not everyone is
            comfortable with CMake, or with the general idea of
            adding another layer/step in the building process of SDL.

            I don't know much about making CMake files, but I
            recall one or two people volunteering to help make it
            possible.

            Sam, Ryan, Community, what are your thoughts?

            _______________________________________________
            SDL mailing list
            SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
            http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



        _______________________________________________
        SDL mailing list
        SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
        http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



    _______________________________________________
    SDL mailing list
    SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
    http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




_______________________________________________
SDL mailing list
SDL at lists.libsdl.org  <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list
SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

On, Tue Aug 14, 2012, Ryan C. Gordon wrote:

Sam, Ryan, Community, what are your thoughts?

I really, really want to do this.

(one more benefit: the configure script on Cygwin takes several minutes
to run, CMake should take a few seconds. At least I hope so.)

I’ve actually started on it here, but our configure script is pretty
complex and I don’t want to chop out functionality just to get it done,
so it’s a bit of a painful translation thus far.

Do you care to post it or check it in?

Find attached a patch against the current HG revision from my own
afternon-attempt today. The script is far from being ready nor it can
compile SDL2 completely, but merely can give an overview about how it
might look later on.

Lots of features from the current configure.in are missing, but will be
added over the next days. Focus will be to get it to work on BSD/Linux
first, then over to Win32 and VS.NET solution support, then crying for
someone taking care of the Darwin and iOS platforms.

Once done, check for cross-compiling support.

NOTE: this is only an attempt and not a “next-gen build system” for
SDL2. Right now however, I do not see any alternative to either cmake or
autotools. True, Scons is nice and clean, but

  • lacks lots of out-of-box functionality
  • does not provide target-system build system output (might complicate
    cross-compile templates)
  • requires Python to be installed (source of errors on version
    mismatches, additional burden for developers to install)

I ignored other tools like yum, makepp, waf, etc, since they mostly lack
basic functionality to get a project working without too much effort or
lack the cross-platform support required for SDL2.

I don’t have a timetable for finishing this.

Feel free to send your stuff to me or make it available otherwise. I can
merge it with my own attempt.

Cheers
Marcus
-------------- next part --------------
A non-text attachment was scrubbed…
Name: cmake_20120814.diff
Type: text/x-diff
Size: 37087 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20120814/4248c569/attachment.diff
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20120814/4248c569/attachment.pgp

I did a Introduction to CMake video a few years back entitled “Getting
Started With CMake (An End-User’s Perspective) For Cross-Platform
Building”. I did it to try to dispel confusion about what CMake does,
how it works, and most importantly how you (end users) interact with
it. I give a perspective from Linux Makefiles to Eclipse to Mac Xcode
to Windows Visual Studio.

Summary page with links to all videos:
http://playcontrol.net/ewing/screencasts/getting_started_with_cmake_.html

Or direct link to first video on YouTube (you have to hunt for the
following 5 parts):

Tangential side note/trivia: I did it for an open source project
called Chaskii which was created by Don Burns who used to hang glide
with Sam.

-Eric–
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/

Are you the sdl contributer and role model we are required to emulate? I
went to the cmake site and still could not understand what is was so i
asked. i see nothing wrong with that. I put about three hours total into
goofleing it YES I DID. how dare you call me a liar.

I asked what it was asking if my understanding was correct not said
something that was wrong, unless the question mark has changed its
international meaning and no one told me.Who are you to tell any one they
don’t make good faith efforts to understand the problem period? You say
this is a fact and that is a fact not i think this or my opinion is that.
Maybe you should write a few pages to define the things you don’t think
measure up and submit them to sdl. I’m willing to comply with any
reasonable forum expectation. Id like you to have new rules made
and explain to me how im not not following them or just flame me more. this
is not appropriate. When i said what is your problem i didn’t expect a huge
public flame. This is the only response to your flame attack you will get.
You code seems grown up but you don’t to me. oh my god there was a post you
didn’t like.
My 3 hours of research indicates that in fact cmake was created to support
msvc because years ago there were issues that warrented it in the makers
opinions. Maybe it was true because it did seem to get popular for a time.
Now it seems like it’s getting less popular. The leading points of
contention seem to be due to it’s expanded support and increasing
complexity. These are expressed most commonly as far as i can tell as
unwanted overhead, features that people don’t want, and that its too
complicated now and not as useful. Some love it to this day. Im not saying
its bad and somehow i think you must think its really great. I didn’t mean
to hurt your feelings.
Having researched it more than i would expect other people to i will put
forward an educated opinion. I think anything that make people move forward
is good. If like myself people just delete the cmake and use their compiler
of choice as usual then maybe it’s an sdl dev thing and not an end user
thing. Time would tell. if implementation and upkeep and adding something
extra does not impact the sdl project or the sdl project users then great.On Tue, Aug 14, 2012 at 12:03 PM, Patrick Baggett <baggett.patrick at gmail.com wrote:

I probably shouldn’t bother to explain it, but ah well, here we go.

My problem with your posts thus far (and on many threads) is you don’t
make good faith efforts to understand the problem and you add useless input
about things that you don’t know about. That isn’t about being “right” or
"wrong" necessarily, nobody was born knowing any of this, and yet here we
all are at varying levels of knowledge. It’s like your strategy of
participation and research is utterly broken.

Let’s suppose everyone was discussing “XInput” and I didn’t know what it
was. If I asked on the mailing list, “what does xinput do?”, then I have
effectively wasted my own time and anyone else who responds to my purely
innocent question. Sure enough, using Google I can come up with tons of
pageshttps://www.google.com/#hl=en&safe=off&sclient=psy-ab&q=what+does+xinput+do&oq=what+does+xinput+do&gs_l=serp.3..0i13i30j0i8i13i30l3.2616.5277.0.5503.23.15.2.5.6.1.143.1124.11j4.15.0.les%3B..0.0...1c.WBjxUUVLnSA&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=8171fb77536c4765&biw=1920&bih=979that explain what it does. Maybe
I’ll read the first link on the search resultshttp://msdn.microsoft.com/en-us/library/windows/desktop/ee417001(v=vs.85).aspxpage. Maybe I’m still not getting it. Oh, look, Wikipedia
has an article on XInput http://en.wikipedia.org/wiki/DirectInput#XInput.
This took me about a minute, but heck, let’s say it took me 15. Why on
earth would I ask anyone to do something that I can easily and quickly do
on my own? We’re not talking about explaining difficult concepts here,
we’re talking about basic one sentence stuff like "what is ".

You “google for 3 hours” (sure you did) and somewhere along the way, you
come up with 3 utter garbage posts and put them it on the mailing list,
where everyone corrects you. I point out that if you took 2 minutes to type
http://www.cmake.org/ into a browser address bar and read the homepage,
you would, in fact, know that CMake is a metabuild system. Instead, you
supposedly read (with your eyes shut?), then post. Then “read” more, post
something. Then “read” more, post something. Stop doing this. You aren’t
adding to the discussion, you’re making everyone thing you are a troll, 12
years old, or utterly stupid. I’m sure you want to be none of these.

The point is if you don’t know what CMake is, then you don’t belong in
this discussion until you do. It isn’t a crime to ask questions, but it is
when you don’t get off your ass to even try. Right now, you slow down the
discussion, confuse others, write incoherently, and generally just don’t
have anything insightful to add. You can change that by simply slowing
down, writing full sentences, and not jumping to conclusions. Why don’t you
download CMake and get a “Hello, World” program to build using MSVC and
Linux and share your insights after that. Was CMake hard to install? Was it
easy to set up? Was it easy to write the scripts? Was the MSVC file buggy?
Did the UNIX makefiles function? Would be easy to add an Xcode target? What
are your impressions on that?

Those insights and opinions are valuable discussion points that can help
influence whether CMake is accepted as a “official” build system.

Patrick

On Tue, Aug 14, 2012 at 11:34 AM, R Manard <@R_Manard> wrote:

The answer is it took 3 hours to google the situation. This is my last
post. before i was asking not telling. when u ask u know u may be wrong.
asking or not knowing are not crimes in a mail list thats there for
questions. what’s your problem?

after a couple hours of goofle the last puzzle parts fall into place.
cmake was made because people thought msvc was too hard to use without a
helper program. Now that msvc has evolved some still love cmake but others
find it redundant and useless, or even an extra level of complexity to
overcome.

https://plus.google.com/112611842306597061311/posts/1FZG3Wx8XTt#112611842306597061311/posts/1FZG3Wx8XTt

On Tue, Aug 14, 2012 at 9:30 AM, Patrick Baggett < baggett.patrick at gmail.com> wrote:

On Tue, Aug 14, 2012 at 6:07 AM, R Manard <@R_Manard> wrote:

after a couple hours of goofle the last puzzle parts fall into place.
cmake was made because people thought msvc was too hard to use without a
helper program. Now that msvc has evolved some still love cmake but others
find it redundant and useless, or even an extra level of complexity to
overcome.

https://plus.google.com/112611842306597061311/posts/1FZG3Wx8XTt#112611842306597061311/posts/1FZG3Wx8XTt

What?..no. You consistently don’t read and jump to wrong conclusions.
Every post you make you’re getting told how way off base you are. Aren’t
you tired of it? Dude, seriously, you’re wrong all the time; slow down and
really read about the subject before you write posts or don’t write
anything at all if you don’t know what you’re saying.

CMake is not a crossplatform compiler. CMake is not something that was
made because MSVC is hard. CMake isn’t redundant and useless because MSVC
evolved. CMake is a metabuild system. It allows you to describe steps
to build your software, but the steps aren’t tied to a particular build
system such as MSVC or GNU make or Xcode. After running CMake, you’ll
generate files that can then be executed by your platform’s native build
system. It’s a way of not having to maintain multiple platforms’ build
systems. It saves time and effort when working on large, crossplatform
projects. If you had read CMake’s homepage, in the first paragraph you
could see it’s purpose:
“CMake generates native makefiles and workspaces that can be used in
the compiler environment of your choice.”

If you had read the wiki article, you could see it too:
“CMake can generate makefiles http://en.wikipedia.org/wiki/Makefile for
many platforms and IDEs including Unixhttp://en.wikipedia.org/wiki/Unix
, Windows http://en.wikipedia.org/wiki/Windows, Mac OS Xhttp://en.wikipedia.org/wiki/Mac_OS_X
, OS/2 http://en.wikipedia.org/wiki/OS/2, MSVChttp://en.wikipedia.org/wiki/MSVC
, Cygwin http://en.wikipedia.org/wiki/Cygwin, MinGWhttp://en.wikipedia.org/wiki/MinGW
and Xcode http://en.wikipedia.org/wiki/Xcode.”

Patrick


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

A lot of people use Cmake its quite popular for cross platform applications and cmake is not that complicated.

cmake would be a nice add on

R Manard wrote:

Are you the sdl contributer and role model we are required to emulate? I went to the cmake site and still could not understand what is was so i asked. i see nothing wrong with that. I put about three hours total into goofleing it YES I DID. how dare you call me a liar.
?
I asked what it was asking if my understanding was correct not said something that was wrong, unless the question mark has changed its international meaning and no one told me.Who are you to tell any one they don’t make good faith efforts to understand the problem?period? You say this is a fact and that is a fact not i think this or my opinion is that. Maybe you should write a few pages to define the things you don’t think measure up and submit them to sdl. I’m willing to comply with any reasonable forum expectation.?Id like you to?have?new rules made and?explain to me how im not?not following them or just flame me more. this is not appropriate.?When i said what is your problem i didn’t expect a huge public flame. This is the only response to your flame attack you will get. You code seems grown up but you don’t to me. oh my god there was a post you didn’t like.

My 3 hours of research indicates that in fact cmake was created to support msvc because years ago there were issues that warrented it in the makers opinions. Maybe it was true because it did seem to get popular for a time. Now it seems like it’s getting less popular. The leading points of contention seem to be due to it’s expanded support and increasing complexity. These are expressed most commonly as far as i can tell as unwanted overhead, features that people don’t want, and that its too complicated now and not as useful. Some love it to this day.?Im not saying its bad and somehow i think you must think its really great. I didn’t mean to hurt your feelings.
Having researched it more than i would expect other?people to i will put forward an educated opinion. I think anything that make people move forward is good. If like myself people just delete the cmake and use their compiler of choice as usual then maybe it’s an sdl dev thing and not an end user thing. Time would tell. if implementation and upkeep and adding something extra?does not impact the sdl project or the sdl project users then great.
?

?

I probably shouldn’t bother to explain it, but ah well, here we go.

My problem with your posts thus far (and on many threads) is you don’t make good faith efforts to understand the problem and you add useless input about things that you don’t know about. That isn’t about being “right” or “wrong” necessarily, nobody was born knowing any of this, and yet here we all are at varying levels of knowledge. It’s like your strategy of participation and research is utterly broken.

Let’s suppose everyone was discussing “XInput” and I didn’t know what it was. If I asked on the mailing list, “what does xinput do?”, then I have effectively wasted my own time and anyone else who responds to my purely innocent question. Sure enough, using Google I can come up with tons of pages (https://www.google.com/#hl=en&safe=off&sclient=psy-ab&q=what+does+xinput+do&oq=what+does+xinput+do&gs_l=serp.3..0i13i30j0i8i13i30l3.2616.5277.0.5503.23.15.2.5.6.1.143.1124.11j4.15.0.les%3B..0.0...1c.WBjxUUVLnSA&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=8171fb77536c4765&biw=1920&bih=979) that explain what it does. Maybe I’ll read the first link on the search results (http://msdn.microsoft.com/en-us/library/windows/desktop/ee417001(v=vs.85).aspx) page. Maybe I’m still not getting it. Oh, look, Wikipedia has an article on XInput (http://en.wikipedia.org/wiki/DirectInput#XInput). This took me about a minute, but heck, let’s say it took me 15. Why on earth would I ask anyone to do somethin
g that I can easily and quickly do on my own? We’re not talking about explaining difficult concepts here, we’re talking about basic one sentence stuff like "what is ".> On Tue, Aug 14, 2012 at 12:03 PM, Patrick Baggett <baggett.patrick at gmail.com (baggett.patrick at gmail.com)> wrote:

You “google for 3 hours” (sure you did) and somewhere along the way, you come up with 3 utter garbage posts and put them it on the mailing list, where everyone corrects you. I point out that if you took 2 minutes to type?http://www.cmake.org/ (http://www.cmake.org/)?into a browser address bar and read the homepage, you would, in fact, know that CMake is a metabuild system. Instead, you supposedly read (with your eyes shut?), then post. Then “read” more, post something. Then “read” more, post something. Stop doing this. You aren’t adding to the discussion, you’re making everyone thing you are a troll, 12 years old, or utterly stupid. I’m sure you want to be none of these.

The point is if you don’t know what CMake is, then you don’t belong in this discussion until you do. It isn’t a crime to ask questions, but it is when you don’t get off your ass to even try. Right now, you slow down the discussion, confuse others, write incoherently, and generally just don’t have anything insightful to add. You can change that by simply slowing down, writing full sentences, and not jumping to conclusions. Why don’t you download CMake and get a “Hello, World” program to build using MSVC and Linux and share your insights after that. Was CMake hard to install? Was it easy to set up? Was it easy to write the scripts? Was the MSVC file buggy? Did the UNIX makefiles function? Would be easy to add an Xcode target? What are your impressions on that??

Those insights and opinions are valuable discussion points that can help influence whether CMake is accepted as a “official” build system.

?Patrick

On Tue, Aug 14, 2012 at 11:34 AM, R Manard <dranikist at gmail.com (dranikist at gmail.com)> wrote:

The answer is it took 3 hours to google the situation. This is my last post. before i was asking not telling. when u ask u know u may be wrong. asking or not knowing are not crimes in a mail list thats there for questions. what’s your problem?
?
after a couple hours of goofle the last puzzle parts fall into place. cmake was made because people thought msvc was too hard to use without a helper program. Now that msvc has evolved some still love cmake but others find it redundant and useless, or even an extra level of complexity to overcome.
https://plus.google.com/112611842306597061311/posts/1FZG3Wx8XTt#112611842306597061311/posts/1FZG3Wx8XTt (https://plus.google.com/112611842306597061311/posts/1FZG3Wx8XTt#112611842306597061311/posts/1FZG3Wx8XTt)

On Tue, Aug 14, 2012 at 9:30 AM, Patrick Baggett <baggett.patrick at gmail.com (baggett.patrick at gmail.com)> wrote:

On Tue, Aug 14, 2012 at 6:07 AM, R Manard <dranikist at gmail.com (dranikist at gmail.com)> wrote:

after a couple hours of goofle the last puzzle parts fall into place. cmake was made because people thought msvc was too hard to use without a helper program. Now that msvc has evolved some still love cmake but others find it redundant and useless, or even an extra level of complexity to overcome.
https://plus.google.com/112611842306597061311/posts/1FZG3Wx8XTt#112611842306597061311/posts/1FZG3Wx8XTt (https://plus.google.com/112611842306597061311/posts/1FZG3Wx8XTt#112611842306597061311/posts/1FZG3Wx8XTt)

What?..no. You consistently don’t read and jump to wrong conclusions. Every post you make you’re getting told how way off base you are. Aren’t you tired of it??Dude, seriously, you’re wrong all the time; slow down and really read about the subject before you write posts or don’t write anything at all if you don’t know what you’re saying.

CMake is not a crossplatform compiler. CMake is not something that was made because MSVC is hard. CMake isn’t redundant and useless because MSVC evolved.?CMake is a metabuild system. It allows you to describe steps to build your software, but the steps aren’t tied to a particular build system such as MSVC or GNU make or Xcode. After running CMake, you’ll generate files that can then be executed by your platform’s native build system. It’s a way of not having to maintain multiple platforms’ build systems. It saves time and effort when working on large, crossplatform projects. If you had read CMake’s homepage, in the first paragraph you could see it’s purpose:
“CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice.”

If you had read the wiki article, you could see it too:
“CMake can generate?makefiles (http://en.wikipedia.org/wiki/Makefile)?for many platforms and IDEs including?Unix (http://en.wikipedia.org/wiki/Unix),?Windows (http://en.wikipedia.org/wiki/Windows),?Mac OS X (http://en.wikipedia.org/wiki/Mac_OS_X),?OS/2 (http://en.wikipedia.org/wiki/OS/2),?MSVC (http://en.wikipedia.org/wiki/MSVC),?Cygwin (http://en.wikipedia.org/wiki/Cygwin),?MinGW (http://en.wikipedia.org/wiki/MinGW)?and?Xcode (http://en.wikipedia.org/wiki/Xcode).”

Patrick?


SDL mailing list
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)


SDL mailing list
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)


SDL mailing list
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

Message-ID:
<CAKCUQMbw+N3_QdJd1aLzeZHaZaNeEYT0CLSC1JS5eoqvEw7HZA at mail.gmail.com>
Content-Type: text/plain; charset=“iso-8859-1”

I went to the cmake site and still could not understand what is was so i
asked.

CMake allows you to use the same build-control files for many
different compilers. This makes it much easier to maintain project
build files, since you only have to do it for CMake instead of doing
it for every platform you compile the program for.

What CMake was originally written for doesn’t really matter that much.
The C language was originally created to make it easier to run Unix on
new systems, but C’s importance now isn’t related to what it was
originally written for, but instead is because of the features that it
has.

Im not saying
its bad and somehow i think you must think its really great. I didn’t mean
to hurt your feelings.

You didn’t ‘hurt’ any of us, but you do annoy a great many of us. I
believe that this is mostly because of a language barrier (French is
your native language, right? I forget where I got that impression, but
I know I got it somewhere), but you also demonstrated in the
text-input thread that you both aren’t very familiar with C/C++/C#,
and aren’t taking enough measures to counteract this lack of
familiarity before you send your posts. At one point you referred to
something like this: ( A != A )
when the actual construct that I had provided was more like this: ( b
& A != A ).
You couldn’t make sense of your version and therefor asked what the
point of it was. However, the fact that you couldn’t understand why I
had written that SHOULD have indicated to you that you should do more
research and review first. If you had reviewed my post then you likely
would have realized that you had misquoted it. If you still hadn’t
understood why I wrote that then you would have at least known where
you needed to start doing your research. If you couldn’t figure it out
after researching it, then you would have been able to ask your
question in a more intelligent way.

But instead you misquoted, and then wrote your post using the misquote
as a point of reference, thereby making a poor (not bad per say, but
not competent either) impression. At this point in time, I suspect
that you are either someone who only recently started to program (it’s
a known fact that it takes approximately 5 years to become a good
programmer: programming is more strongly related to a way of thinking
than it is to knowing programming languages), or someone who is simply
and honestly not a rigorous and logical thinker.

You have made similar mistakes of thoroughness in this thread as well.
I have never used CMake, nor have I poured deeply into it’s
documentation, but I have researched it twice (and only twice, because
I’ve never needed it), and that research allowed me to get a rough
idea of how it works and what it does. CMake builds project files, but
it doesn’t build programs, or libraries, or anything else. It just
builds project files, so that you can use those project files with
build environment to create programs, or libraries, or documentation,
or whatever else the project is intended to create.

Also, you have a problem of style. This style problem is partly in how
you write your posts, which is probably the language issue again (your
opinions come across as very forceful, as though you’re implying that
they’re actually fact, and everything else comes across just as
forcefully as your opinions); however, it’s also related to how you
respond to things: most of the post that I’m quoting should never have
been sent in the first place because it has too much emotion ingrained
in it, and emotion ingrained into a post almost always leads to an
escalation of conflict.

This is why I didn’t respond to your last response to me in the
text-input thread: I was trying to be sympathetic, you reacted
forcefully, and I decided to cut the inevitably fruitless argument off
at the knees by just not responding.

If like myself people just delete the cmake and use their compiler
of choice as usual then maybe it’s an sdl dev thing and not an end user
thing.

There’s no real point in deleting the CMake files. They’re small, and
only developers have much reason to be poking around in those
directories anyways. Also, if there’s a bug then you might need to
provide the build files to help determine what the bug is.> Date: Tue, 14 Aug 2012 17:55:37 -0500

From: R Manard
To: SDL Development List
Subject: Re: [SDL] SDL2 Moving to CMake?

This thread is about whether we think replacing our project files with a
cmake is viable. Ryan seems to be working on supporting it, and a bunch of
us are willing to put in patches to it to get it working. I’d like to see
it done, or if anyone can suggest an alternative to CMake, I think this is
an open place to discuss that, too.

As far as arguing over whether or not CMake is a compiler, it’s a simple
and short one. CMake is not a compiler, and will never be one (at least
according to their roadmap and current objectives). Many of us have used
it, varying from building a third party library once to years of experience.

So, back on track, do we want this, is there any bad sides we’re not taking
into account that could be crippling later down the road?

One obvious objection comes to mind: As we have so clearly seen, some people don’t even know what CMake is, let alone how to use it.

Right now, SDL is distributed with project files for popular compilers.? This means that anyone with one of those compilers can pull the source code and compile right away.? Throw a dependency on a complicated tool that they’ve never heard of into the mix before they can even start compiling anything, and you’ve added a significant barrier to entry.

Mason________________________________
From: Alex Barry <alex.barry at gmail.com>
To: SDL Development List
Sent: Tuesday, August 14, 2012 9:25 PM
Subject: Re: [SDL] SDL2 Moving to CMake?

This thread is about whether we think replacing our project files with a cmake is viable. ?Ryan seems to be working on supporting it, and a bunch of us are willing to put in patches to it to get it working. ?I’d like to see it done, or if anyone can suggest an alternative to CMake, I think this is an open place to discuss that, too.

As far as arguing over whether or not CMake is a compiler, it’s a simple and short one. ?CMake is not a compiler, and will never be one (at least according to their roadmap and current objectives). ?Many of us have used it, varying from building a third party library once to years of experience.

So, back on track, do we want this, is there any bad sides we’re not taking into account that could be crippling later down the road?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Use CMake internally to build Visual C++ project files and distribute the generated Visual C++ project files along with the rest of the package. Whoever downloads a distribution just loads these files into VC and never touches CMake. Works with other compilers as well, and beats maintaining different project files by hand.

Cheers,

UliOn Aug 15, 2012, at 2:22 PM, Mason Wheeler wrote:

One obvious objection comes to mind: As we have so clearly seen, some people don’t even know what CMake is, let alone how to use it.

Right now, SDL is distributed with project files for popular compilers. This means that anyone with one of those compilers can pull the source code and compile right away. Throw a dependency on a complicated tool that they’ve never heard of into the mix before they can even start compiling anything, and you’ve added a significant barrier to entry.

Mason

From: Alex Barry <alex.barry at gmail.com>
To: SDL Development List
Sent: Tuesday, August 14, 2012 9:25 PM
Subject: Re: [SDL] SDL2 Moving to CMake?

This thread is about whether we think replacing our project files with a cmake is viable. Ryan seems to be working on supporting it, and a bunch of us are willing to put in patches to it to get it working. I’d like to see it done, or if anyone can suggest an alternative to CMake, I think this is an open place to discuss that, too.

As far as arguing over whether or not CMake is a compiler, it’s a simple and short one. CMake is not a compiler, and will never be one (at least according to their roadmap and current objectives). Many of us have used it, varying from building a third party library once to years of experience.

So, back on track, do we want this, is there any bad sides we’re not taking into account that could be crippling later down the road?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Any technology distinguishable from magic is insufficiently advanced.

Ulrich von Zadow | +49-172-7872715
Jabber: @Ulrich_von_Zadow
Skype: uzadow

I’ve been confronted to this problem on a previous library (open scene
graph). I had never heard of cmake before then. But the learning curve is
good, and after struggling a bit with dependencies you get it to work fast
enough.

Ever since I discovered cmake, I’ve been using it for all my projects and
is now totally incorporated into our workflow. Even my art buddy use it to
compile snapshots. It’s easy for the end user, and powerful for the
developer.
Moving to cmake is a great idea guys, it will definitely save time for
everyone in the long run.

There are two pitfalls that I would like to mention

  • Version : make sure you use a version of cmake that is widely present in
    repositories. At this time I believe it would be 2.8.0, with the latest
    being 2.8.8
  • Dependencies : Sometimes the findXXX.cmake scripts that you use to get
    dependencies behave in a weird way that may constitute a barrier to entry.
    Sometimes it’s unavoidable, but please consider each time if it’s
    appropriate to manually check for dependency inside your script instead of
    using an inappropriate and possibly overkill findXXX.cmake.

Best of luck on the transition.

Rewpparo, amateur game dev

2012/8/15 Mason Wheeler > One obvious objection comes to mind: As we have so clearly seen, some

people don’t even know what CMake is, let alone how to use it.

Right now, SDL is distributed with project files for popular compilers.
This means that anyone with one of those compilers can pull the source code
and compile right away. Throw a dependency on a complicated tool that
they’ve never heard of into the mix before they can even start compiling
anything, and you’ve added a significant barrier to entry.

Mason


From: Alex Barry <alex.barry at gmail.com>

To: SDL Development List
Sent: Tuesday, August 14, 2012 9:25 PM

Subject: Re: [SDL] SDL2 Moving to CMake?

This thread is about whether we think replacing our project files with a
cmake is viable. Ryan seems to be working on supporting it, and a bunch of
us are willing to put in patches to it to get it working. I’d like to see
it done, or if anyone can suggest an alternative to CMake, I think this is
an open place to discuss that, too.

As far as arguing over whether or not CMake is a compiler, it’s a simple
and short one. CMake is not a compiler, and will never be one (at least
according to their roadmap and current objectives). Many of us have used
it, varying from building a third party library once to years of experience.

So, back on track, do we want this, is there any bad sides we’re not
taking into account that could be crippling later down the road?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Mason Wheeler :

One obvious objection comes to mind: As we have so clearly seen,
some people don’t even know what CMake is, let alone how to use it.

Right now, SDL is distributed with project files for popular
compilers.? This means that anyone with one of those compilers can
pull the source code and compile right away.? Throw a dependency on
a complicated tool that they’ve never heard of into the mix before
they can even start compiling anything, and you’ve added a
significant barrier to entry.

Please do not confuse Cmake with a build system. The autotools are not a build
system either, but provide a handy set of scripts for building, once you
executed them - they are (in their purpose) the SAME as CMake.
CMake has the advantage that it not only can deal with GNU-alikes, but Win32,
OSX and whatsnot.

If you are distributing the release tarball, the end user should (and will)
find all related files for building SDL (e.g. a VS.NET solution, Makefile,
XCode project files, etc.) just as he wishes.

Even more, if he has his own $FANC_BUILD_TOOL and it is supported by CMake, he
can simply rerun CMake (here the knowledge gap you mention) would step in) for
his purposes.

The management of all those build-related files however can be centralized
with Cmake, reducing the maintenance efforts and out-of-sync problems.

Long story short:

  • no new tools for end users
  • new capabilities for developers, porters, etc.
  • less maintenance for target platform build systems

Cheers
Marcus

Kai Sterker wrote:

Another option would be to use pkgconfig, although not quite sure how
this will perform on non-Unixish environments:

If you’re referring to pkg-config:
http://www.freedesktop.org/wiki/Software/pkg-config/
There’s a port to Windows. There are also two versions that avoid the
circular glib dependency:


https://github.com/nenolod/pkgconf
I’m using pkgconf as a pkg-config replacement on Windows (mingw and
Cygwin) and FreeBSD now. Not having any issues.

If anyone’s interested, I have a list of other options to make that
may work on Windows at:
http://www.mingw.org/wiki/Community_Supplied_Links
in the section labeled Build Utilities - Building
If anyone recommends some other tools to add to the list, please let me know.

Mason Wheeler wrote:

Right now, SDL is distributed with project files for popular compilers.?
This means that anyone with one of those compilers can pull the source code
and compile right away.? Throw a dependency on a complicated tool that
they’ve never heard of into the mix before they can even start compiling
anything, and you’ve added a significant barrier to entry.

I agree strongly with this assessment. I can build SDL with no serious issues
on all the systems I mentioned above. If I were required to use cmake
only to build SDL,
I would have issues building on mingw and possibly Cygwin. (Still
waiting to hear
back if anyone from the cmake list has any ideas why I can’t build
cmake from source
on mingw. If anyone on this list has been able to build it from
source within msys,
please let me know the steps you took to do so.)

As an example, FLTK comes with configure/make files and cmake files.
It’s more maintenance,
but it gives developers more choices. It’s also useful because FLTK
will build successfully
using cmake with the OpenWatcom compiler and there are some issues with using
configure/make with that compiler and FLTK. Possibly a useful
solution for SDL is to have
multiple ways to build it including gnu style configure/make as long as those
techniques/scripts/files are currently supported and work for a
platform SDL is used on.

Sincerely,
Laura