65 FILE(MAKE_DIRECTORY include)
66 FOREACH(HEADER ${LUA_HEADERS})
67 GET_FILENAME_COMPONENT(H ${HEADER} NAME)
68 CONFIGURE_FILE(${HEADER} "${LUA_INCLUDE_DIRS}/${H}" COPYONLY)
72 IF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
73 ADD_DEFINITIONS(-DLUA_USE_LINUX)
74 MESSAGE("* Looks like you're using Linux, lua will be compiled with")
75 MESSAGE(" CFlags: -DLUA_USE_LINUX")
76 ELSE(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
78 MESSAGE("* Looks like you're some Unix, lua will be compiled with")
79 MESSAGE(" CFlags: -DLUA_USE_POSIX -DLUA_USE_DLOPEN")
80 MESSAGE(" I hope this is not too optimistic for your system")
81 ADD_DEFINITIONS(-DLUA_USE_POSIX -DLUA_USE_DLOPEN)
83 MESSAGE("* Could not recognise you system, lua will be compiled with generic options")
85 ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
88 ADD_LIBRARY(lua STATIC ${LUA_SRC})