mirror of
https://github.com/luau-lang/luau.git
synced 2024-11-15 06:15:44 +08:00
Added install commands to CMakeLists.txt
Some package managers like vcpkg rely on CMake to install the built binaries. Adds the standard boilerplate to install headers, static libs, and binaries via the install target.
This commit is contained in:
parent
d6c2472f0c
commit
2c333b4bc8
@ -271,3 +271,22 @@ foreach(LIB Luau.Ast Luau.Compiler Luau.Config Luau.Analysis Luau.CodeGen Luau.V
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# define the install steps
|
||||
include(GNUInstallDirs)
|
||||
install(DIRECTORY "${PROJECT_SOURCE_DIR}/VM/include/" "${PROJECT_SOURCE_DIR}/AST/include/" "${PROJECT_SOURCE_DIR}/Compiler/include/"
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h"
|
||||
PATTERN "*.hpp"
|
||||
PATTERN "*.inl")
|
||||
|
||||
install(TARGETS Luau.Ast Luau.Compiler Luau.Config Luau.Analysis Luau.CodeGen Luau.VM
|
||||
EXPORT luau
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
if (LUAU_BUILD_CLI)
|
||||
install(TARGETS Luau.Repl.CLI Luau.Analyze.CLI Luau.Compile.CLI
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user