From 34e4e03fe4d52e310067585ccee93723cc021686 Mon Sep 17 00:00:00 2001 From: mjbudd77 Date: Sun, 18 Jul 2021 15:41:29 -0400 Subject: [PATCH] Set -DLUA_USE_LINUX compiler flag when internally building and static linking lua. This is required for lua plugin functionality on linux and macosx. --- src/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 32d90c99..743c3b04 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -101,12 +101,13 @@ else(WIN32) pkg_search_module( LUA lua5.1 lua-5.1 ) add_definitions( -DHAVE_ASPRINTF ) # What system wouldn't have this? + add_definitions( -DLUA_USE_LINUX ) # This needs to be set when link LUA internally for linux and macosx if(APPLE) set( OPENGL_LDFLAGS "-framework OpenGL" ) else() set( OPENGL_LDFLAGS ${OPENGL_LIBRARIES} ) - set( SYS_LIBS -lrt -lpthread ) + set( SYS_LIBS -lrt -lpthread -ldl) endif() endif(WIN32)