mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 23:59:00 +08:00
32d25e6b85
* [lua] Fix library type and usage * version * Use c code in executables * version * Apply suggestion * version * Add an extra CMakeLists.txt to avoid scope pollution of SET_SOURCE_FILES_PROPERTIES * version * Apply suggestions * version * Various nitpicks: * Use "supports" on features rather than if tests plus message FATAL_ERROR * Deduplicate ENABLE_LUA_CPP and COMPILE_AS_CPP * Add quotes. * Use file(INSTALL rather than configure_file(COPYONLY) Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
24 lines
602 B
CMake
24 lines
602 B
CMake
set(REQUIRES )
|
|
foreach(ARG IN_LISTS ${ARGS})
|
|
if (ARG STREQUAL "REQUIRED")
|
|
set(REQUIRES "REQUIRED")
|
|
endif()
|
|
endforeach()
|
|
|
|
_find_package(unofficial-lua CONFIG ${REQUIRES})
|
|
|
|
if (@COMPILE_AS_CPP@)
|
|
_find_package(unofficial-lua-cpp CONFIG ${REQUIRES})
|
|
endif()
|
|
|
|
get_filename_component(LUA_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}" PATH)
|
|
get_filename_component(LUA_INCLUDE_DIR "${LUA_INCLUDE_DIR}" PATH)
|
|
set(LUA_INCLUDE_DIR ${LUA_INCLUDE_DIR}/include)
|
|
|
|
list(APPEND LUA_LIBRARIES lua)
|
|
if (TARGET lua-cpp)
|
|
list(APPEND LUA_LIBRARIES lua-cpp)
|
|
endif()
|
|
|
|
set(LUA_FOUND 1)
|