Skip to content

Commit

Permalink
Merge pull request #261 from vickysharma0812/dev
Browse files Browse the repository at this point in the history
v23.10.1
  • Loading branch information
vickysharma0812 authored Dec 1, 2023
2 parents fd512d3 + d49d827 commit 60002a6
Show file tree
Hide file tree
Showing 6 changed files with 337 additions and 566 deletions.
31 changes: 13 additions & 18 deletions cmake/addLua.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,23 @@ IF( ${PROJECT_NAME} MATCHES "easifemBase" )
LIST( APPEND TARGET_COMPILE_DEF "-DUSE_LUA" )
FIND_PACKAGE(
Lua
REQUIRED
5.4
EXACT
)

IF(LUA_FOUND)

IF(LUA_VERSION_MAJOR LESS 5)
MESSAGE(ERROR "LUA MAJOR VERSION SHOULD BE 5.4")
ENDIF()

IF(LUA_VERSION_MINOR LESS 4)
MESSAGE(ERROR "LUA MINOR VERSION SHOULD BE 5.4")
ENDIF()

TARGET_LINK_LIBRARIES(${PROJECT_NAME} PUBLIC ${LUA_LIBRARIES} )
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC ${LUA_INCLUDE_DIR})
IF( NOT LUA_FOUND)
FIND_PACKAGE(PkgConfig REQUIRED)
pkg_check_modules(LUA REQUIRED lua)
FIND_LIBRARY(LUA_LIBRARY NAMES lua lua5.4)
SET(LUA_LIBRARIES ${LUA_LIBRARY})
FIND_PATH(LUA_INCLUDE_DIR NAMES lua5.4/lua.h lua5.4/lualib.h lua/lua.h lua/lualib.h)
ENDIF()

MESSAGE( STATUS "LUA LIBRARIES :: ${LUA_LIBRARIES}" )
MESSAGE( STATUS "LUA INCLUDE DIR :: ${LUA_INCLUDE_DIR}" )
TARGET_LINK_LIBRARIES(${PROJECT_NAME} PUBLIC ${LUA_LIBRARIES} )
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC ${LUA_INCLUDE_DIR})

ELSE()
MESSAGE(ERROR "LUA NOT FOUND")
ENDIF()
MESSAGE( STATUS "LUA LIBRARIES :: ${LUA_LIBRARIES}" )
MESSAGE( STATUS "LUA INCLUDE DIR :: ${LUA_INCLUDE_DIR}" )

ELSE()
MESSAGE( STATUS "NOT USING LUA LIBRARIES" )
Expand Down
Loading

0 comments on commit 60002a6

Please sign in to comment.