2020-11-16 14:47:43 +08:00
|
|
|
|
|
|
|
set(lib_name luajit)
|
|
|
|
set(target_name ${lib_name})
|
|
|
|
project(${lib_name})
|
|
|
|
|
2022-08-08 18:02:17 +08:00
|
|
|
include(../../cmake/AXConfigThirdparty.cmake)
|
2020-11-16 14:47:43 +08:00
|
|
|
|
|
|
|
if(WINDOWS)
|
|
|
|
add_library(${target_name} SHARED IMPORTED GLOBAL)
|
|
|
|
else()
|
|
|
|
add_library(${target_name} STATIC IMPORTED GLOBAL)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set_target_properties(${target_name} PROPERTIES
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include"
|
|
|
|
INTERFACE_COMPILE_DEFINITIONS USING_LUAJIT=1 # for lua-cjson
|
|
|
|
)
|
|
|
|
if(WINDOWS)
|
|
|
|
set_target_properties(${target_name} PROPERTIES
|
|
|
|
IMPORTED_LOCATION "${platform_spec_path}/lua51.dll"
|
|
|
|
IMPORTED_IMPLIB "${platform_spec_path}/lua51.lib"
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
set_target_properties(${target_name} PROPERTIES
|
|
|
|
IMPORTED_LOCATION "${platform_spec_path}/lib${lib_name}.a"
|
|
|
|
)
|
|
|
|
endif()
|