mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
fix(LuaLib): Fix compilation with lua5.1 (#291)
This commit is contained in:
@@ -16,10 +16,6 @@ endif()
|
|||||||
|
|
||||||
if (LUA_VERSION MATCHES "luajit")
|
if (LUA_VERSION MATCHES "luajit")
|
||||||
add_subdirectory(src/lualib/luajit)
|
add_subdirectory(src/lualib/luajit)
|
||||||
set(LUAJIT_VERSION true)
|
|
||||||
else()
|
else()
|
||||||
add_subdirectory(src/lualib/lua)
|
add_subdirectory(src/lualib/lua)
|
||||||
set(LUAJIT_VERSION false)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(lualib PROPERTIES INTERFACE_COMPILE_DEFINITIONS LUAJIT_VERSION)
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ if (WIN32)
|
|||||||
PROPERTIES
|
PROPERTIES
|
||||||
IMPORTED_LOCATION ${LUA_BIN_FOLDER}/src/lua51.lib
|
IMPORTED_LOCATION ${LUA_BIN_FOLDER}/src/lua51.lib
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${LUA_SRC_FOLDER}/src"
|
INTERFACE_INCLUDE_DIRECTORIES "${LUA_SRC_FOLDER}/src"
|
||||||
|
INTERFACE_COMPILE_DEFINITIONS "LUAJIT_VERSION=1"
|
||||||
)
|
)
|
||||||
|
|
||||||
# install generated files
|
# install generated files
|
||||||
@@ -92,6 +93,7 @@ if (WIN32)
|
|||||||
IMPORTED_LOCATION ${LUA_BIN_FOLDER}/src/lua51.dll
|
IMPORTED_LOCATION ${LUA_BIN_FOLDER}/src/lua51.dll
|
||||||
IMPORTED_IMPLIB ${LUA_BIN_FOLDER}/src/lua51.lib
|
IMPORTED_IMPLIB ${LUA_BIN_FOLDER}/src/lua51.lib
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${LUA_SRC_FOLDER}/src"
|
INTERFACE_INCLUDE_DIRECTORIES "${LUA_SRC_FOLDER}/src"
|
||||||
|
INTERFACE_COMPILE_DEFINITIONS "LUAJIT_VERSION=1"
|
||||||
)
|
)
|
||||||
|
|
||||||
# install generated files
|
# install generated files
|
||||||
@@ -147,6 +149,7 @@ if (UNIX OR APPLE)
|
|||||||
PROPERTIES
|
PROPERTIES
|
||||||
# IMPORTED_LOCATION ${LUAJIT_LIB_PATH} # cmake bullshit. spent days figuring this and turns out set_target_properties does squat shit while set_property works fine.
|
# IMPORTED_LOCATION ${LUAJIT_LIB_PATH} # cmake bullshit. spent days figuring this and turns out set_target_properties does squat shit while set_property works fine.
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${LUA_SRC_FOLDER}/src"
|
INTERFACE_INCLUDE_DIRECTORIES "${LUA_SRC_FOLDER}/src"
|
||||||
|
INTERFACE_COMPILE_DEFINITIONS "LUAJIT_VERSION=1"
|
||||||
)
|
)
|
||||||
set_property(TARGET lualib PROPERTY IMPORTED_LOCATION ${LUAJIT_LIB_PATH})
|
set_property(TARGET lualib PROPERTY IMPORTED_LOCATION ${LUAJIT_LIB_PATH})
|
||||||
|
|
||||||
@@ -154,3 +157,4 @@ if (UNIX OR APPLE)
|
|||||||
install(DIRECTORY ${LUA_INSTALL_PATH}/ DESTINATION ${CMAKE_INSTALL_PREFIX})
|
install(DIRECTORY ${LUA_INSTALL_PATH}/ DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user