Skip to content

CMake generation fails if LUAJIT_BUILD_EXE is set to false #11

@eres-j

Description

@eres-j

Hi,

I recently integrated luajit-cmake to a personal project and wanted to use LUAJIT_BUILD_EXE option to disable executable build on some platform but got this error:

CMake Error at LuaJIT.cmake:667 (add_executable):
  add_executable cannot create ALIAS target "luajit::lua" because target
  "luajit" does not already exist.
Call Stack (most recent call first):
  CMakeLists.txt:16 (include)

Step to repro:
"%ProgramFiles%\CMake\bin\cmake.exe" -B build -G "Visual Studio 17 2022" -DLUAJIT_DIR="C:/Dev/github/LuaJIT/LuaJIT" -DLUAJIT_BUILD_EXE=FALSE

Fix is trivial I'm going to make a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions