How do I use CMake?

后端 未结 6 561
生来不讨喜
生来不讨喜 2020-11-28 20:15

I am trying to use CMake in order to compile opencv.

I am reading the tutorial but can\'t understand what is CMakeLists files and how is it connected to the gui of C

6条回答
  •  醉酒成梦
    2020-11-28 20:48

    I don't know about Windows (never used it), but on a Linux system you just have to create a build directory (in the top source directory)

    mkdir build-dir
    

    go inside it

    cd build-dir
    

    then run cmake and point to the parent directory

    cmake ..
    

    and finally run make

    make
    

    Notice that make and cmake are different programs. cmake is a Makefile generator, and the make utility is governed by a Makefile textual file. See cmake & make wikipedia pages.

    NB: On Windows, cmake might operate so could need to be used differently. You'll need to read the documentation (like I did for Linux)

提交回复
热议问题