Skip to content

Commit 0720085

Browse files
committed
Fix missing Lua::Lua target when using system Lua
1 parent c1f95a7 commit 0720085

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ if (sol2-is-top-level-project)
276276
set(LUA_LIBRARIES ${lualib})
277277
endif()
278278

279+
if(NOT TARGET Lua::Lua)
280+
add_library(Lua::Lua ALIAS ${lualib})
281+
endif()
282+
279283
if (NOT LUA_FOUND AND NOT LUABUILD_FOUND)
280284
message(FATAL_ERROR "sol2 Lua \"${SOL2_LUA_VERSION}\" not found and could not be targeted for building")
281285
endif()

0 commit comments

Comments
 (0)