Fixed: #955 CMake does not search luabind
This commit is contained in:
parent
6577496fc2
commit
d7943cfa7d
3 changed files with 59 additions and 2 deletions
|
@ -82,6 +82,7 @@ IF(WITH_LUA51)
|
|||
ELSE(WITH_LUA51)
|
||||
FIND_PACKAGE(Lua50 REQUIRED)
|
||||
ENDIF(WITH_LUA51)
|
||||
FIND_PACKAGE(Luabind REQUIRED)
|
||||
FIND_PACKAGE(CURL REQUIRED)
|
||||
FIND_PACKAGE(Libwww)
|
||||
FIND_PACKAGE(ZLIB)
|
||||
|
|
55
code/ryzom/CMakeModules/FindLuabind.cmake
Normal file
55
code/ryzom/CMakeModules/FindLuabind.cmake
Normal file
|
@ -0,0 +1,55 @@
|
|||
# - Locate Luabind library
|
||||
# This module defines
|
||||
# LUABIND_LIBRARY, the library to link against
|
||||
# LUABIND_FOUND, if false, do not try to link to LUABIND
|
||||
# LUABIND_INCLUDE_DIR, where to find headers.
|
||||
|
||||
|
||||
IF(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
|
||||
# in cache already
|
||||
SET(LUABIND_FIND_QUIETLY TRUE)
|
||||
ENDIF(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
|
||||
|
||||
|
||||
|
||||
|
||||
FIND_PATH(LUABIND_INCLUDE_DIR
|
||||
luabind.hpp
|
||||
PATHS
|
||||
$ENV{LUABIND_DIR}/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/csw/include
|
||||
/opt/include
|
||||
PATH_SUFFIXES luabind
|
||||
)
|
||||
|
||||
|
||||
FIND_LIBRARY(LUABIND_LIBRARY
|
||||
NAMES luabind libluabind luabind_d libluabind_d libluabindd
|
||||
PATHS
|
||||
$ENV{LUABIND_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
|
||||
IF(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
|
||||
SET(LUABIND_FOUND "YES")
|
||||
IF(NOT LUABIND_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARY}")
|
||||
ENDIF(NOT LUABIND_FIND_QUIETLY)
|
||||
ELSE(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
|
||||
IF(NOT LUABIND_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find Luabind!")
|
||||
ENDIF(NOT LUABIND_FIND_QUIETLY)
|
||||
ENDIF(LUABIND_LIBRARY AND LUABIND_INCLUDE_DIR)
|
|
@ -66,6 +66,7 @@ INCLUDE_DIRECTORIES(
|
|||
${LIBXML2_INCLUDE_DIR}
|
||||
${NEL_INCLUDE_DIR}
|
||||
${LUA_INCLUDE_DIR}
|
||||
${LUABIND_INCLUDE_DIR}
|
||||
${LIBWWW_INCLUDE_DIR}
|
||||
${CURL_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
@ -79,6 +80,7 @@ TARGET_LINK_LIBRARIES(ryzom_client ${PLATFORM_LINKFLAGS}
|
|||
${NELGEORGES_LIBRARY}
|
||||
${NEL3D_LIBRARY}
|
||||
${LUA_LIBRARIES}
|
||||
${LUABIND_LIBRARY}
|
||||
${CURL_LIBRARIES}
|
||||
${NELSOUND_LIBRARY}
|
||||
${NELSNDDRV_LIBRARY}
|
||||
|
@ -86,8 +88,7 @@ TARGET_LINK_LIBRARIES(ryzom_client ${PLATFORM_LINKFLAGS}
|
|||
${NELPACS_LIBRARY}
|
||||
${LIBWWW_LIBRARY}
|
||||
${SEVENZIP_LIBRARY}
|
||||
luabind # TODO: find luabind and expat cleanly using a find script
|
||||
expat)
|
||||
expat) # TODO: find expat cleanly using a find script
|
||||
|
||||
IF(NOT APPLE AND NOT WIN32)
|
||||
TARGET_LINK_LIBRARIES(ryzom_client ${X11_LIBRARIES})
|
||||
|
|
Loading…
Reference in a new issue