[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Detecting MinGW MSYS or Cygwin unix style file system

From: Brandon J. Van Every
Subject: [Chicken-users] Detecting MinGW MSYS or Cygwin unix style file system
Date: Tue, 22 Nov 2005 06:35:19 -0800
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Hi, I'm going up the CMake Windows learning curve on behalf of Chicken Scheme.
I have read the archives quite a bit and I think it's time to ask the question.

I notice that on Windows the default CMAKE_INSTALL_PREFIX is "C:/Program Files". However, this doesn't actually make sense to a MinGW user employing MSYS. MSYS implements a unix-style file system, so a proper prefix would more likely be "/usr/local". However, the wrinkle is it's also perfectly legitimate to use MinGW sans MSYS, and install things to "C:/Program Files" in the normal Windows way. It's really MSYS that's the dependency here, not MinGW. And so, I would like to detect MSYS and "do the right thing" for people who are using Windows as a Unix-alike. Not because I love Unix, but because I want to keep my MSYS and "normal Windows" environments completely separate from each other. When people try out Chicken, I want to be able to ask "are you using the MinGW, the Cygwin, or the VC++ build?" and not have there be any confusion about what got installed where.

Does a similar issue pertain to Cygwin? Maybe not, as the archives seemed to indicate that it may use /usr/local by default. I am not wishing to try this out if I can avoid it. :-) Aside from being highly biased towards MinGW support issues, it happens that Eclipse gets messed up if both are on one's system.

Gleaning knowledge from the archives, I have created a PreLoad.cmake which successfully detects MSYS. My understanding is that this command must be in PreLoad.cmake, that it cannot just be in CMakeLists.txt, as it must be set before anything else happens. Correct?

        "MSYS default install path")

I am wondering if CMake has its own, native, more reliable way of doing this. If it doesn't, I'm thinking it should, because MinGW and MSYS are like bread and butter, even if bread can be eaten without butter. :-) I am also wondering if anyone knows if OSTYPE is a reliable indicator. I just looked at what was in the environment and figured, heh, this looks like it'll work.

Brandon Van Every
"The pioneer is the one with the arrows in his back."
                         - anonymous entrepreneur

reply via email to

[Prev in Thread] Current Thread [Next in Thread]