...
  View open merge request
Commits (2)
......@@ -6,41 +6,38 @@
GET_PROPERTY(OV_PRINTED GLOBAL PROPERTY OV_TRIED_ThirdPartyLua)
IF(WIN32)
IF (WIN32)
FIND_PATH(LUA_INCLUDE_DIR lua.h PATHS ${LIST_DEPENDENCIES_PATH} PATH_SUFFIXES lua/include NO_DEFAULT_PATH)
ELSEIF(UNIX)
if(${CMAKE_SYSTEM} MATCHES fc21)
IF (LUA_INCLUDE_DIR)
FIND_LIBRARY(LUA_LIBRARIES lua5.1 PATHS ${LUA_INCLUDE_DIR}/../lib NO_DEFAULT_PATH)
FIND_LIBRARY(LUA_LIBRARIES lua5.1 PATHS ${LUA_INCLUDE_DIR}/../lib)
ENDIF()
IF (LUA_LIBRARIES)
INSTALL(FILES "${LUA_INCLUDE_DIR}/../bin/lua5.1.dll" DESTINATION "${DIST_BINDIR}")
ENDIF()
ELSEIF (UNIX)
if (${CMAKE_SYSTEM} MATCHES "fc")
FIND_PACKAGE(Lua REQUIRED)
else ()
FIND_PACKAGE(Lua51 REQUIRED)
endif()
ENDIF()
IF(LUA_INCLUDE_DIR)
IF (LUA_INCLUDE_DIR)
OV_PRINT(OV_PRINTED " Found Lua... in '${LUA_INCLUDE_DIR}'")
IF(WIN32)
FIND_LIBRARY(LUA_LIBRARIES lua5.1 PATHS ${LUA_INCLUDE_DIR}/../lib NO_DEFAULT_PATH)
FIND_LIBRARY(LUA_LIBRARIES lua5.1 PATHS ${LUA_INCLUDE_DIR}/../lib)
ENDIF()
IF(LUA_LIBRARIES)
OV_PRINT(OV_PRINTED " [ OK ] lib ${LUA_LIBRARIES}")
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LUA_LIBRARIES})
ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyLua)
IF(WIN32)
INSTALL(FILES "${LUA_INCLUDE_DIR}/../bin/lua5.1.dll" DESTINATION "${DIST_BINDIR}")
ENDIF()
ELSE()
OV_PRINT(OV_PRINTED " [FAILED] lib lua5.1")
OV_PRINT(OV_PRINTED " [FAILED] lib lua")
ENDIF()
ELSE()
OV_PRINT(OV_PRINTED " FAILED to find Lua")
ENDIF()
SET_PROPERTY(GLOBAL PROPERTY OV_TRIED_ThirdPartyLua "Yes")