Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
Autoconfig for LUA_ROOT.
Browse files Browse the repository at this point in the history
  • Loading branch information
drahosp committed Mar 27, 2011
1 parent ad47550 commit 30d3890
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@ set ( LUA_MAXINPUT 512 CACHE NUMBER "Is the maximum length for an input line in

set ( LUA_DIRSEP "/" )
set ( LUA_MODULE_SUFFIX ${CMAKE_SHARED_MODULE_SUFFIX} )
set ( LUA_ROOT ${CMAKE_INSTALL_PREFIX} CACHE STRING "Destination from which modules will be resolved. See INSTALL_LMOD and INSTALL_CMOD.")
set ( LUA_LDIR ${INSTALL_LMOD} )
set ( LUA_CDIR ${INSTALL_CMOD} )

if ( LUA_USE_RELATIVE_LOADLIB )
# This will set up relative paths to lib
string ( REGEX REPLACE "[^!/]+" ".." LUA_ROOT "!/${INSTALL_BIN}/" )
else ()
# Direct path to installation
set ( LUA_ROOT ${CMAKE_INSTALL_PREFIX} CACHE STRING "Destination from which modules will be resolved. See INSTALL_LMOD and INSTALL_CMOD.")
endif ()

if ( WIN32 AND NOT CYGWIN )
# Windows systems
option ( LUA_WIN "Windows specific build." ON )
Expand All @@ -48,12 +55,6 @@ else ()
option ( LUA_USE_ULONGJMP "Use ulongjmp" ON)
endif ()

# on apple this works for 32bit intel only
if ( CMAKE_OSX_ARCHITECTURES STREQUAL "i386" )
message ( "This package only supports i386 architecture. Build using -DCMAKE_OSX_ARCHITECTURES=i386." )
message ( FATAL_ERROR "For 64bit systems consider using LuaJIT2. See www.luajit.org for details." )
endif ()

## SETUP
# Optional libraries
find_package ( Readline )
Expand Down

0 comments on commit 30d3890

Please sign in to comment.