Files
Lua-compilateur/Demo/CMakeLists.txt
T
BlackAngelTV d32f73006e build: build only the compiler and drop the example project
The example duplicated what Demo already covers, and the run mode needs the
runtime include path and Lua link flags at execution time, so they are baked in
at configure time.
2026-11-18 08:48:05 +01:00

19 lines
607 B
CMake

cmake_minimum_required(VERSION 3.20)
project(luacpp_demo LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Reuse the compiler from the repository root as a subproject.
set(LUACPP_BUILD_TESTS OFF CACHE BOOL "" FORCE)
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/.." "${CMAKE_CURRENT_BINARY_DIR}/luacpp")
include("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/lua-package.cmake")
add_lua_package(demo_lua
ROOT "${CMAKE_CURRENT_SOURCE_DIR}/lua"
MODULES todo.lua report.lua
NAMESPACE demo)
add_executable(luacpp_demo main.cpp)
target_link_libraries(luacpp_demo PRIVATE demo_lua)