1

I'm thinking to write a simple configure script (similar to autoconf one) which execs cmake. But before doing that I want to check if anyone knows of such an effort already. I wasn't able to find anything on google.

It should be able to support the basic autoconf configure flags (prefix, exec-prefix, bindir mostly).

Reason to do it is of course that there's a certain user expectancy to be able to do ./configure && make

6
  • Isn't that orthogonal to the idea of cmake? Or do you just want to run cmake regularly while working on a project? Commented Jan 28, 2013 at 9:23
  • 1
    I'm mostly thinking of end users building the project from source, not developers. Commented Jan 28, 2013 at 9:25
  • hm... I think you are locking for CPack. It will build the proper scripts for distribution of your cmake project. Commented Jan 28, 2013 at 9:30
  • Did you consider not using cmake but autotools instead? I find that sources prepared with autotools have a higher probability of building without problems and a higher probability of installing without unwanted side-effects. So, if you're goal is to please users instead of developers, maybe autotools is the way to go. Commented Jan 29, 2013 at 21:41
  • Apparently the question is a bit unclear. The project will use cmake, I just want a (hopefully small) launcher script called configure for people who don't understand what CMakeList.txt is. Also, I find -DCMAKE_INSTALL_PREFIX=/usr a bit obtuse. Commented Jan 30, 2013 at 7:10

1 Answer 1

1

Also not really an answer but too long for a comment:

After reading up about cmake / cpack, I can at least tell you this. Cmake expects to be present on the platform. Therefore CPack cannot generate the same type of ./configure scripts as autotools. The Autotools expect some shell to be present, which is essentially the same as cmake to be present. However since cmake also targets the Win environment, it cannot rely on a shell. That being said, CPack can provide source packages, which need to be installed with cmake in the usual manner.

Also this does not solve your problem, I do not recommend to write a tool for cmake. Cmake is able to use all these type of prefixes you are interested in. If the user wants to compile your program from scratch, he has to know at least the basics (e.g. setting variables) of your build system. This is also true for autotools. If you want to spare him the pain, you can provide binary .sh, .deb or .rpm packages, which can be easily built with cmake / cpack.

Sign up to request clarification or add additional context in comments.

1 Comment

I didn't know about cpack (only just started using cmake). I'll check it out to see if it's what I want. I know cmake will have to be present, I'm ok with that.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.