mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 01:38:59 +08:00
919348f0e2
One of two ports for #38340 - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - ~[ ] SHA512s are updated for each updated download.~ - ~[ ] The "supports" clause reflects platforms that may be fixed by this new version.~ - ~[ ] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~ - ~[ ] Any patches that are no longer applied are deleted from the port's directory.~ - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
44 lines
1.3 KiB
CMake
44 lines
1.3 KiB
CMake
cmake_minimum_required(VERSION 3.11)
|
|
project(luafilesystem)
|
|
|
|
find_path(LUA_INCLUDE_DIR lua.h PATH_SUFFIXES lua)
|
|
find_library(LUA_LIBRARY lua)
|
|
set(LFS_INCLUDES ${LUA_INCLUDE_DIR})
|
|
set(LFS_LIBRARIES ${LUA_LIBRARY})
|
|
|
|
add_library(lfs src/lfs.h src/lfs.c src/lfs.def)
|
|
|
|
target_include_directories(lfs PRIVATE ${LFS_INCLUDES})
|
|
target_link_libraries(lfs PRIVATE ${LFS_LIBRARIES})
|
|
|
|
install(TARGETS lfs
|
|
EXPORT "unofficial-${PROJECT_NAME}-targets"
|
|
RUNTIME DESTINATION bin
|
|
LIBRARY DESTINATION lib
|
|
ARCHIVE DESTINATION lib)
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
configure_package_config_file(
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/unofficial-${PROJECT_NAME}-config.cmake.in"
|
|
"${CMAKE_CURRENT_BINARY_DIR}/unofficial-${PROJECT_NAME}-config.cmake"
|
|
INSTALL_DESTINATION "share/unofficial-${PROJECT_NAME}"
|
|
)
|
|
|
|
set(VERSION_FILE_PATH "${CMAKE_CURRENT_BINARY_DIR}/unofficial-${PROJECT_NAME}-config-version.cmake")
|
|
write_basic_package_version_file(
|
|
"${VERSION_FILE_PATH}"
|
|
VERSION "${LFS_VERSION}"
|
|
COMPATIBILITY SameMajorVersion
|
|
)
|
|
|
|
install(
|
|
FILES "${CMAKE_CURRENT_BINARY_DIR}/unofficial-${PROJECT_NAME}-config.cmake"
|
|
DESTINATION "share/unofficial-${PROJECT_NAME}"
|
|
)
|
|
|
|
install(
|
|
EXPORT "unofficial-${PROJECT_NAME}-targets"
|
|
NAMESPACE "unofficial::${PROJECT_NAME}::"
|
|
DESTINATION "share/unofficial-${PROJECT_NAME}")
|