2010-08-20 11:27:17 +00:00
|
|
|
# - Locate Luabind library
|
|
|
|
# This module defines
|
2010-09-11 22:40:26 +00:00
|
|
|
# LUABIND_LIBRARIES, the libraries to link against
|
2010-08-20 11:27:17 +00:00
|
|
|
# LUABIND_FOUND, if false, do not try to link to LUABIND
|
|
|
|
# LUABIND_INCLUDE_DIR, where to find headers.
|
|
|
|
|
2010-09-11 22:40:26 +00:00
|
|
|
IF(LUABIND_LIBRARIES AND LUABIND_INCLUDE_DIR)
|
2010-08-20 11:27:17 +00:00
|
|
|
# in cache already
|
|
|
|
SET(LUABIND_FIND_QUIETLY TRUE)
|
2010-09-11 22:40:26 +00:00
|
|
|
ENDIF(LUABIND_LIBRARIES AND LUABIND_INCLUDE_DIR)
|
2010-08-20 11:27:17 +00:00
|
|
|
|
|
|
|
FIND_PATH(LUABIND_INCLUDE_DIR
|
2010-09-25 13:41:37 +00:00
|
|
|
luabind/luabind.hpp
|
2010-08-20 11:27:17 +00:00
|
|
|
PATHS
|
|
|
|
$ENV{LUABIND_DIR}/include
|
|
|
|
/usr/local/include
|
|
|
|
/usr/include
|
|
|
|
/sw/include
|
|
|
|
/opt/local/include
|
|
|
|
/opt/csw/include
|
|
|
|
/opt/include
|
|
|
|
)
|
|
|
|
|
2010-09-25 13:41:37 +00:00
|
|
|
IF(WITH_STLPORT)
|
|
|
|
FIND_LIBRARY(LUABIND_LIBRARY_RELEASE
|
2010-09-26 21:17:51 +00:00
|
|
|
NAMES luabind_stlport luabind libluabind
|
2010-09-25 13:41:37 +00:00
|
|
|
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
|
|
|
|
)
|
2010-08-20 11:27:17 +00:00
|
|
|
|
2010-09-25 13:41:37 +00:00
|
|
|
FIND_LIBRARY(LUABIND_LIBRARY_DEBUG
|
2010-09-26 21:17:51 +00:00
|
|
|
NAMES luabind_stlportd luabind_d libluabind_d libluabindd
|
2010-09-25 13:41:37 +00:00
|
|
|
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
|
|
|
|
)
|
|
|
|
ELSE(WITH_STLPORT)
|
|
|
|
FIND_LIBRARY(LUABIND_LIBRARY_RELEASE
|
|
|
|
NAMES luabind libluabind
|
|
|
|
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
|
|
|
|
)
|
2010-08-20 11:27:17 +00:00
|
|
|
|
2010-09-25 13:41:37 +00:00
|
|
|
FIND_LIBRARY(LUABIND_LIBRARY_DEBUG
|
|
|
|
NAMES 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
|
|
|
|
)
|
|
|
|
ENDIF(WITH_STLPORT)
|
2010-08-20 11:27:17 +00:00
|
|
|
|
2010-09-11 22:40:26 +00:00
|
|
|
IF(LUABIND_INCLUDE_DIR)
|
|
|
|
IF(LUABIND_LIBRARY_RELEASE)
|
2010-09-25 13:41:37 +00:00
|
|
|
SET(LUABIND_FOUND TRUE)
|
2010-09-11 22:40:26 +00:00
|
|
|
|
2010-09-25 13:41:37 +00:00
|
|
|
SET(LUABIND_LIBRARIES "optimized;${LUABIND_LIBRARY_RELEASE}")
|
2010-09-11 22:40:26 +00:00
|
|
|
IF(LUABIND_LIBRARY_DEBUG)
|
|
|
|
SET(LUABIND_LIBRARIES "${LUABIND_LIBRARIES};debug;${LUABIND_LIBRARY_DEBUG}")
|
|
|
|
ENDIF(LUABIND_LIBRARY_DEBUG)
|
|
|
|
ENDIF(LUABIND_LIBRARY_RELEASE)
|
|
|
|
ENDIF(LUABIND_INCLUDE_DIR)
|
|
|
|
|
|
|
|
IF(LUABIND_FOUND)
|
2010-08-20 11:27:17 +00:00
|
|
|
IF(NOT LUABIND_FIND_QUIETLY)
|
2010-09-11 22:40:26 +00:00
|
|
|
MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARIES}")
|
2010-08-20 11:27:17 +00:00
|
|
|
ENDIF(NOT LUABIND_FIND_QUIETLY)
|
2010-09-11 22:40:26 +00:00
|
|
|
ELSE(LUABIND_FOUND)
|
2010-08-20 11:27:17 +00:00
|
|
|
IF(NOT LUABIND_FIND_QUIETLY)
|
|
|
|
MESSAGE(STATUS "Warning: Unable to find Luabind!")
|
|
|
|
ENDIF(NOT LUABIND_FIND_QUIETLY)
|
2010-09-11 22:40:26 +00:00
|
|
|
ENDIF(LUABIND_FOUND)
|
|
|
|
|
|
|
|
MARK_AS_ADVANCED(LUABIND_LIBRARY_RELEASE LUABIND_LIBRARY_DEBUG)
|