Commit 460dad98 authored by Serrière Guillaume's avatar Serrière Guillaume

Fix lua in Fedora 20.

Signed-off-by: default avatarSerrière Guillaume <guillaume.serriere@inria.fr>
parent 9b70a165
......@@ -4,39 +4,36 @@
# Adds include path
# ---------------------------------
IF(WIN32)
FIND_PATH(LUA_INCLUDE_DIRS lua.h PATHS ${OV_CUSTOM_DEPENDENCIES_PATH}/lua/include NO_DEFAULT_PATH)
IF(LUA_INCLUDE_DIRS)
SET(LUA_FOUND TRUE)
ENDIF(LUA_INCLUDE_DIRS)
FIND_PATH(LUA_INCLUDE_DIR lua.h PATHS ${OV_CUSTOM_DEPENDENCIES_PATH}/lua/include NO_DEFAULT_PATH)
ELSEIF(UNIX)
INCLUDE("FindThirdPartyPkgConfig")
if(PLATFORM EQUAL "Fedora")
if(${CMAKE_SYSTEM} MATCHES fc21)
FIND_PACKAGE(Lua REQUIRED)
else ()
pkg_check_modules(LUA lua5.1)
FIND_PACKAGE(Lua51 REQUIRED)
endif()
ENDIF(WIN32)
IF(LUA_FOUND)
MESSAGE(STATUS " Found Lua... in '${LUA_INCLUDE_DIRS}'")
IF(LUA_INCLUDE_DIR)
MESSAGE(STATUS " Found Lua... in '${LUA_INCLUDE_DIR}'")
IF(WIN32)
FIND_LIBRARY(LUA_LIBRARIES lua5.1 PATHS ${LUA_INCLUDE_DIRS}/../lib NO_DEFAULT_PATH)
FIND_LIBRARY(LUA_LIBRARIES lua5.1 PATHS ${LUA_INCLUDE_DIRS}/../lib)
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(WIN32)
IF(LUA_LIBRARIES)
MESSAGE(STATUS " [ OK ] lib ${LUA_LIBRARIES}")
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${LUA_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LUA_LIBRARIES})
ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyLua)
ELSE(LUA_LIBRARIES)
MESSAGE(STATUS " [FAILED] lib lua5.1")
ENDIF(LUA_LIBRARIES)
ELSE(LUA_FOUND)
ELSE(LUA_INCLUDE_DIR)
MESSAGE(STATUS " FAILED to find Lua")
ENDIF(LUA_FOUND)
ENDIF(LUA_INCLUDE_DIR)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment