Skip to content

more portable cmake build type support. #325

@xpol

Description

@xpol

Currently we use

fs.execute_string(rockspec.variables.CMAKE.." . " ..args
fs.execute_string(rockspec.variables.MAKE.." -fMakefile")
fs.execute_string(rockspec.variables.MAKE.." -fMakefile install")

Which use make to build the module.

But cmake have more portable way to build project:

cmake -Bbuild -H.
cmake --build build --target install --config Release

This will let cmake to choose best generator and build it in a portable way.

This solution have follow advantages:

  1. One command to build all platform (with cmake installed).
  2. Better for windows, we don't need to run under MSVC command prompt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions