Gobligine/cmake/modules/FindTolua++.cmake
Pali Rohár 5faeecd6cb Fixed CMake
- Added support for static linking (on Mingw --static-libgcc)
 - Fixed compiling resource file on Windows
 - Fixed searching for tolua++
2011-03-06 18:07:24 +01:00

40 lines
1.3 KiB
CMake

# - Try to find the tolua++
# Once done this will define
#
# TOLUA++_FOUND - system has tolua++ program
# TOLUA++_LIB_FOUND - system has tolua++ library
# TOLUA++_APP -the tolua++ program
# TOLUA++_INLUDE_DIR - the tolua++ include directory
# TOLUA++_LIBRARY - the tolua++ library
# Copyright (c) 2011, Pali Rohár <pali.rohar@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if(TOLUA++_INCLUDE_DIR AND TOLUA++_LIBRARY AND TOLUA++_APP)
set(TOLUA++_FOUND true)
set(TOLUA++_LIB_FOUND true)
else()
find_path(TOLUA++_INCLUDE_DIR tolua++.h)
find_library(TOLUA++_LIBRARY NAMES tolua++ tolua++5.1)
find_program(TOLUA++_APP NAMES tolua++ tolua++5.1)
if(TOLUA++_INCLUDE_DIR AND TOLUA++_APP)
set(TOLUA++_FOUND true)
message(STATUS "Found program tolua++: ${TOLUA++_APP}")
else()
set(TOLUA++_FOUND false)
message(FATAL_ERROR "Could not find program tolua++")
endif()
if(TOLUA++_INCLUDE_DIR AND TOLUA++_LIBRARY)
set(TOLUA++_LIB_FOUND true)
message(STATUS "Found library tolua++: ${TOLUA++_LIBRARY}")
else()
set(TOLUA++_LIB_FOUND false)
message(STATUS "Could not find library tolua++")
endif()
mark_as_advanced(TOLUA++_INCLUDE_DIR AND TOLUA++_LIBRARY AND TOLUA++_APP)
endif()