Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"'lua.h' file not found" on macOS 15.1 (ARM64) #1667

Open
bun4byte opened this issue Jan 28, 2025 · 0 comments
Open

"'lua.h' file not found" on macOS 15.1 (ARM64) #1667

bun4byte opened this issue Jan 28, 2025 · 0 comments

Comments

@bun4byte
Copy link

bun4byte commented Jan 28, 2025

I'm including Sol2 in my project using FetchContent in CMake. I have Lua installed on my system, both through Homebrew (brew install lua) and from source code (make install in a copy of the Lua source). On my system, a copy of lua.h is located in /user/local/include next to lua.hpp, luaconf.h, and lualib.h. /usr/local/include is a standard include path on my system that most build systems can recognise.

No matter what I do, however, I always get the same build error. How do I fix it?

This is my CMakeLists file for reference:

cmake_minimum_required(VERSION 3.5.0)
project(cast)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -O3")

include(FetchContent)

find_package(libzip REQUIRED)

FetchContent_Declare(
	sol2
	GIT_REPOSITORY https://github.com/ThePhD/sol2.git
	GIT_TAG main
)

FetchContent_MakeAvailable(sol2)

add_executable(cast src/cast.cpp src/ini.c)
target_link_libraries(cast PRIVATE libzip::zip sol2::sol2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant