TABLE OF CONTENTS


cmake.cygclass

[ Top ] [ Cygclasses ] [ Cygclasses ]

SYNOPSIS

  inherit cmake

DESCRIPTION

CMake is a build system which can be used instead of autoconf and automake. The build configuration and commands are written as CMakeLists.txt files in each directory, which cmake uses to run configuration tests and create Makefiles, config headers, and other files.

CMake can be used for a wide variety of software, but is most commonly used in KDE and some Qt-based packages.

INHERITS

ninja.cygclass

INHERITED BY

kde4.cygclass, kf5-cygclass, qt4-cmake.cygclass


cygcmake

[ Top ] [ cmake.cygclass ] [ Compile Functions ]

SYNOPSIS

  cygcmake [OPTIONS]

DESCRIPTION

Runs cmake to configure the package. cygcmake passes cmake the flags necessary to install the package into the standard prefix and according to the Filesystem Hierarchy Standard and the Cygwin package guidelines. In addition, all arguments to cygcmake are passed to cmake, followed by CYGCMAKE_ARGS, if set.

NOTES

REQUIRES

cmake


CYGCMAKE_SOURCE

[ Top ] [ cygcmake ] [ Variables ]

DESCRIPTION

Set this variable to the directory containing the top-level CMakeLists.txt. This is only necessary when the top-level CMakeLists.txt is not in $S and cygcmake is not being run in the same subdirectory of $B which under $S contains the top-level CMakeLists.txt. (IOW if the top-level CMakeLists.txt is in $S/unix and cygcmake is run from $B/unix, setting CYGCMAKE_SOURCE would not be necessary.)


CYGCMAKE_ARGS

[ Top ] [ cygcmake ] [ Variables ]

DESCRIPTION

Additional flags to pass to cmake during cygcmake.

NOTES

Flags in CYGCMAKE_ARGS follow, and therefore override, flags passed by default and as arguments to cygcmake.


CYGCMAKE_GENERATOR

[ Top ] [ cygcmake ] [ Variables ]

DESCRIPTION

The CMake Generator to be used in this build, either "Ninja" or "Unix Makefiles".

NOTES

If cygcmake is called explicitly, the default is "Unix Makefiles" for backwards compatibility. If the default src_compile is used, then "Ninja" will be the default; note that in this case, if the default src_install is not used, then it will fail until either CYGCMAKE_GENERATOR is set to "Unix Makefiles", or cyginstall replaced by ninja_install.


src_compile (cmake)

[ Top ] [ cmake.cygclass ] [ Overloads ]

DEFINITION

src_compile() {
        cd ${B}
        : ${CYGCMAKE_GENERATOR=Ninja}
        cygcmake
        if [ -f build.ninja ]
        then
                cygninja
        else
                cygmake
        fi
}

src_test (cmake)

[ Top ] [ cmake.cygclass ] [ Overloads ]

DEFINITION

src_test() {
        cd ${B}
        ctest
}

src_install (cmake)

[ Top ] [ cmake.cygclass ] [ Overloads ]

DEFINITION

src_install() {
        cd ${B}
        if [ -f build.ninja ]
        then
                ninja_install
        else
                cyginstall
        fi
}