1

I downloaded the MySQL Connector/C++ source tree, which has an 'include' and a 'lib' directory. Now I'm following the README.txt. I download CMake which launches as a program with a UI. The first step of the installation says

me@host:/path/to/mysql-connector-cpp> cmake .

I can't make much sense of this. Does this mean to cd into the directory of the source tree and then run cmake? On what file?

I found this this thread and these instructions but they seem unique to installation using the Xcode UI and I don't know how to apply them in the Terminal. I plan on compiling / running the C++ with g++.

Thanks,

fertileneutrino

Community
  • 1
  • 1

1 Answers1

0

Yes, it does mean - go to the root directory of the source distribution and type cmake .. As for the file, the default file for CMake is CMakeList.txt, so you don't have to specify it. You can also run cmake in other directories and specify the path to the source root directory as a second argument. For example, a very common way of building projects is this:

$ cd project-sources
$ mkdir build
$ cd build
$ cmake ..
$ make
$ make install

That way, all generated files can be simply nuked by removing the build directory, for example: rm -rf build.

  • Typing `cmake .` yields `/directory does not appear to contain CMakeLists.txt.` Should I put the file in the directory, or am I doing something wrong? –  Jun 21 '12 at 20:27
  • Got it - I was running `cmake .` in the wrong directory. I have to download the source directory which is different than the MAC OS X distribution –  Jun 21 '12 at 20:48
  • Hell MySQL really is different from OS X :) –  Jun 21 '12 at 21:12
  • er sorry, I meant the MySQL-connect OS X distribution –  Jun 21 '12 at 21:26