chore(build): include dl.so when compiling on Linux
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
6964e374c0
commit
6e0fc0ca9b
1 changed files with 4 additions and 0 deletions
|
@ -123,6 +123,10 @@ endif()
|
||||||
|
|
||||||
find_package(Lua REQUIRED)
|
find_package(Lua REQUIRED)
|
||||||
set(EXTRA_LIBS ${EXTRA_LIBS} ${LUA_LIBRARIES})
|
set(EXTRA_LIBS ${EXTRA_LIBS} ${LUA_LIBRARIES})
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
|
# Lua static library for linux depends on dl.so
|
||||||
|
set(EXTRA_LIBS ${EXTRA_LIBS} -ldl)
|
||||||
|
endif()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I ${LUA_INCLUDE_DIR}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I ${LUA_INCLUDE_DIR}")
|
||||||
if ("${HAS_LUA_NEWSTATE}$" MATCHES "TRUE")
|
if ("${HAS_LUA_NEWSTATE}$" MATCHES "TRUE")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D LEAN_USE_LUA_NEWSTATE")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D LEAN_USE_LUA_NEWSTATE")
|
||||||
|
|
Loading…
Reference in a new issue