Merge 63446206c1 into f61f9c29d8
This commit is contained in:
commit
24a403b00d
210
.github/workflows/CI-release_package.yml
vendored
Normal file
210
.github/workflows/CI-release_package.yml
vendored
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
name: CI-release_package
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-windows:
|
||||||
|
name: Windows (${{ matrix.config.target }})
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
config:
|
||||||
|
- {target: x64, build: win64 }
|
||||||
|
- {target: Win32, build: win32 }
|
||||||
|
steps:
|
||||||
|
- uses: ilammy/msvc-dev-cmd@v1
|
||||||
|
with:
|
||||||
|
arch: ${{ matrix.config.target }}
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Configure
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. -D LIBUV_BUILD_TESTS=OFF -A ${{ matrix.config.target }}
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cmake --build . --config Release
|
||||||
|
- name: Create NSIS Installer from Release
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cpack -G NSIS
|
||||||
|
- name: Upload NSIS binary artifacts
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: built/Package/libuv-${{ github.event.release.tag_name }}-${{ matrix.config.build }}.exe
|
||||||
|
asset_name: libuv-${{ github.event.release.tag_name }}-${{ matrix.config.build }}.exe
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
file_glob: true
|
||||||
|
body: "Various platform library/package installers, includes libraries and needed header *.h files."
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
name: Linux ${{ matrix.config.target }}
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
config:
|
||||||
|
- {target: amd64, flags: -m64 }
|
||||||
|
# - {target: i386, flags: -m32 }
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
sudo dpkg --add-architecture i386
|
||||||
|
sudo apt-get update -q -y
|
||||||
|
sudo apt-get install -y gcc-multilib g++-multilib valgrind libc6-dbg libc6-dbg:i386
|
||||||
|
- name: Configure & build
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Release -D LIBUV_BUILD_TESTS=OFF -DCMAKE_C_FLAGS=${{ matrix.config.flags }}
|
||||||
|
cmake --build .
|
||||||
|
- name: Create DEB Installer from Release
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cpack -G DEB
|
||||||
|
- name: Upload DEB binary artifacts
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: built/Package/libuv_${{ github.event.release.tag_name }}_${{ matrix.config.target }}.deb
|
||||||
|
asset_name: libuv_${{ github.event.release.tag_name }}_${{ matrix.config.target }}.deb
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
file_glob: true
|
||||||
|
body: "Various platform library/package installers, includes libraries and needed header *.h files."
|
||||||
|
|
||||||
|
build-centos:
|
||||||
|
name: CentOS
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
container: quay.io/centos/centos:stream9
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Prepare
|
||||||
|
run: |
|
||||||
|
dnf install git make cmake gcc gcc-c++ binutils glibc-devel valgrind autoconf libtool bison automake libxml2-devel sudo which rpmdevtools rpmlint -y
|
||||||
|
- name: Configure & build
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Release -D LIBUV_BUILD_TESTS=OFF
|
||||||
|
cmake --build .
|
||||||
|
- name: Create RPM Installer from Release
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cpack -G RPM
|
||||||
|
- name: Upload RPM binary artifacts
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: built/Package/libuv-${{ github.event.release.tag_name }}-Linux.rpm
|
||||||
|
asset_name: libuv-${{ github.event.release.tag_name }}-Linux.rpm
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
file_glob: true
|
||||||
|
body: "Various platform library/package installers, includes libraries and needed header *.h files."
|
||||||
|
|
||||||
|
build-macos:
|
||||||
|
name: macOS
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
runs-on: macos-12
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Envinfo
|
||||||
|
run: npx envinfo
|
||||||
|
- name: Setup
|
||||||
|
run: |
|
||||||
|
brew install ninja automake libtool
|
||||||
|
- name: Configure & build
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Release -D LIBUV_BUILD_TESTS=OFF -G Ninja
|
||||||
|
cmake --build .
|
||||||
|
- name: Create DMG Installer from Release
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cpack -G DragNDrop
|
||||||
|
- name: Upload DMG binary artifacts
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: built/Package/libuv-${{ github.event.release.tag_name }}-Darwin.dmg
|
||||||
|
asset_name: libuv-${{ github.event.release.tag_name }}-Darwin.dmg
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
file_glob: true
|
||||||
|
body: "Various platform library/package installers, includes libraries and needed header *.h files."
|
||||||
|
|
||||||
|
build-qemu:
|
||||||
|
name: ${{ matrix.target }}
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- target: armhf
|
||||||
|
arch: armv7
|
||||||
|
- target: arm64
|
||||||
|
arch: aarch64
|
||||||
|
- target: ppc64el
|
||||||
|
arch: ppc64le
|
||||||
|
- target: riscv64
|
||||||
|
arch: riscv64
|
||||||
|
- target: s390x
|
||||||
|
arch: s390x
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: uraimo/run-on-arch-action@v2
|
||||||
|
with:
|
||||||
|
arch: ${{ matrix.arch }}
|
||||||
|
distro: ubuntu_latest
|
||||||
|
githubToken: ${{ github.token }}
|
||||||
|
setup: |
|
||||||
|
mkdir -p built/Package
|
||||||
|
install: |
|
||||||
|
apt-get update -q -y
|
||||||
|
apt-get install -q -y --no-install-recommends cmake build-essential
|
||||||
|
env: |
|
||||||
|
# Valgrind on arm will fail if the stack size is larger than 8MB.
|
||||||
|
# Set QEMUs stack size to 8MB since Github runners use 16MB default.
|
||||||
|
QEMU_STACK_SIZE: 8388608
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Release -D LIBUV_BUILD_TESTS=OFF
|
||||||
|
cmake --build .
|
||||||
|
cpack -G DEB
|
||||||
|
- name: Upload ${{ matrix.arch }} DEB binary artifacts
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: built/Package/libuv_${{ github.event.release.tag_name }}_${{ matrix.target }}.deb
|
||||||
|
asset_name: libuv_${{ github.event.release.tag_name }}_${{ matrix.target }}.deb
|
||||||
|
tag: ${{ github.ref }}
|
||||||
|
overwrite: true
|
||||||
|
file_glob: true
|
||||||
|
body: "Various platform library/package installers, includes libraries and needed header `*.h` files."
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -40,6 +40,7 @@ Makefile
|
|||||||
Makefile.in
|
Makefile.in
|
||||||
|
|
||||||
/build/
|
/build/
|
||||||
|
/built/
|
||||||
|
|
||||||
/test/.libs/
|
/test/.libs/
|
||||||
/test/run-tests
|
/test/run-tests
|
||||||
|
|||||||
@ -812,3 +812,99 @@ message(STATUS "summary of build options:
|
|||||||
C compiler: ${CMAKE_C_COMPILER} (${CMAKE_C_COMPILER_ID})
|
C compiler: ${CMAKE_C_COMPILER} (${CMAKE_C_COMPILER_ID})
|
||||||
CFLAGS: ${CMAKE_C_FLAGS_${_build_type}} ${CMAKE_C_FLAGS}
|
CFLAGS: ${CMAKE_C_FLAGS_${_build_type}} ${CMAKE_C_FLAGS}
|
||||||
")
|
")
|
||||||
|
|
||||||
|
message("Generated with config types: ${CMAKE_CONFIGURATION_TYPES}")
|
||||||
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/built")
|
||||||
|
set_target_properties(${LIB_SELECTED} PROPERTIES VERSION ${UV_VERSION_MAJOR})
|
||||||
|
set_target_properties(${LIB_SELECTED} PROPERTIES SOVERSION ${UV_VERSION_MAJOR})
|
||||||
|
|
||||||
|
set(_fmt TGZ)
|
||||||
|
if(WIN32)
|
||||||
|
set(_fmt ZIP)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CPACK_GENERATOR ${_fmt})
|
||||||
|
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
|
||||||
|
set(CPACK_DEB_COMPONENT_INSTALL ON)
|
||||||
|
set(CPACK_RPM_COMPONENT_INSTALL ON)
|
||||||
|
set(CPACK_NUGET_COMPONENT_INSTALL ON)
|
||||||
|
set(CPACK_WIX_COMPONENT_INSTALL ON)
|
||||||
|
set(CPACK_NSIS_MODIFY_PATH ON)
|
||||||
|
set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
|
||||||
|
set(CPACK_VERBATIM_VARIABLES YES)
|
||||||
|
|
||||||
|
set(CPACK_SOURCE_IGNORE_FILES
|
||||||
|
"~$"
|
||||||
|
"\\\\.svn/"
|
||||||
|
"/CMakeFiles/"
|
||||||
|
"/CMakeCache*"
|
||||||
|
"/cmake_install\\\\.cmake$"
|
||||||
|
"/cmake_uninstall\\\\.cmake$"
|
||||||
|
"^_CPack_.*/"
|
||||||
|
"/CPack*"
|
||||||
|
"\\\\.o$"
|
||||||
|
"/m4/"
|
||||||
|
"/build/"
|
||||||
|
"/built/"
|
||||||
|
)
|
||||||
|
|
||||||
|
set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
|
||||||
|
CACHE PATH "Location of header files" )
|
||||||
|
|
||||||
|
set(SYSCONFIG_INSTALL_DIR ${CMAKE_INSTALL_SYSCONFDIR}/${PROJECT_NAME}
|
||||||
|
CACHE PATH "Location of configuration files" )
|
||||||
|
|
||||||
|
configure_package_config_file(libuvConfig.cmake.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/libuvConfig.cmake
|
||||||
|
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||||
|
PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR)
|
||||||
|
|
||||||
|
write_basic_package_version_file(
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/libuvConfigVersion.cmake
|
||||||
|
VERSION ${PACKAGE_VERSION}
|
||||||
|
COMPATIBILITY SameMajorVersion )
|
||||||
|
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libuvConfig.cmake
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/libuvConfigVersion.cmake
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} )
|
||||||
|
|
||||||
|
set(CMAKE_INSTALL_CONFIG_NAME ${CMAKE_BUILD_TYPE})
|
||||||
|
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/Package")
|
||||||
|
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME})
|
||||||
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY libuv)
|
||||||
|
|
||||||
|
set(CPACK_PACKAGE_CONTACT "fixme@libuv.org")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Fixme Project Maintainers <${CPACK_PACKAGE_CONTACT}>")
|
||||||
|
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
|
||||||
|
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
|
||||||
|
SET(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "multi-platform support library with a focus on asynchronous I/O.")
|
||||||
|
|
||||||
|
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE)
|
||||||
|
set(CPACK_RESOURCE_FILE_README ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
|
||||||
|
|
||||||
|
set(CPACK_PACKAGE_VENDOR "http://libuv.org/")
|
||||||
|
set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION})
|
||||||
|
set(CPACK_PACKAGE_DESCRIPTION ${PROJECT_DESCRIPTION})
|
||||||
|
|
||||||
|
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
|
||||||
|
set(CPACK_RPM_PACKAGE_URL "http://libuv.org/")
|
||||||
|
set(CPACK_RPM_PACKAGE_ARCHITECTURE "noarch")
|
||||||
|
|
||||||
|
set(CMAKE_INSTALL_CONFIG_NAME ${CMAKE_BUILD_TYPE})
|
||||||
|
install(
|
||||||
|
TARGETS ${LIB_SELECTED}
|
||||||
|
EXPORT "${PROJECT_NAME}Targets"
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
EXPORT "${PROJECT_NAME}Targets"
|
||||||
|
FILE "${PROJECT_NAME}Targets.cmake"
|
||||||
|
NAMESPACE ${PROJECT_NAME}::
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||||
|
)
|
||||||
|
|
||||||
|
set(CPACK_INSTALL_CMAKE_CONFIGURATIONS Release)
|
||||||
|
include(CPack)
|
||||||
|
|||||||
138
Findlibuv.cmake
Normal file
138
Findlibuv.cmake
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
#[=======================================================================[
|
||||||
|
|
||||||
|
FindLibuv
|
||||||
|
---------
|
||||||
|
|
||||||
|
Find libuv includes and library.
|
||||||
|
|
||||||
|
Imported Targets
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
An :ref:`imported target <Imported targets>` named
|
||||||
|
``LIBUV::LIBUV`` is provided if libuv has been found.
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module defines the following variables:
|
||||||
|
|
||||||
|
``LIBUV_FOUND``
|
||||||
|
True if libuv was found, false otherwise.
|
||||||
|
``LIBUV_INCLUDE_DIRS``
|
||||||
|
Include directories needed to include libuv headers.
|
||||||
|
``LIBUV_LIBRARIES``
|
||||||
|
Libraries needed to link to libuv.
|
||||||
|
``LIBUV_VERSION``
|
||||||
|
The version of libuv found.
|
||||||
|
``LIBUV_VERSION_MAJOR``
|
||||||
|
The major version of libuv.
|
||||||
|
``LIBUV_VERSION_MINOR``
|
||||||
|
The minor version of libuv.
|
||||||
|
``LIBUV_VERSION_PATCH``
|
||||||
|
The patch version of libuv.
|
||||||
|
|
||||||
|
Cache Variables
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This module uses the following cache variables:
|
||||||
|
|
||||||
|
``LIBUV_LIBRARY``
|
||||||
|
The location of the libuv library file.
|
||||||
|
``LIBUV_INCLUDE_DIR``
|
||||||
|
The location of the libuv include directory containing ``uv.h``.
|
||||||
|
|
||||||
|
The cache variables should not be used by project code.
|
||||||
|
They may be set by end users to point at libuv components.
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright 2014-2016 Kitware, Inc.
|
||||||
|
#
|
||||||
|
# Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
# see accompanying file Copyright.txt for details.
|
||||||
|
#
|
||||||
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
# See the License for more information.
|
||||||
|
#=============================================================================
|
||||||
|
# (To distribute this file outside of CMake, substitute the full
|
||||||
|
# License text for the above reference.)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
find_library(libuv_LIBRARY
|
||||||
|
NAMES uv
|
||||||
|
)
|
||||||
|
mark_as_advanced(libuv_LIBRARY)
|
||||||
|
|
||||||
|
find_path(libuv_INCLUDE_DIR
|
||||||
|
NAMES uv.h
|
||||||
|
)
|
||||||
|
mark_as_advanced(libuv_INCLUDE_DIR)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Extract version number if possible.
|
||||||
|
set(_LIBUV_H_REGEX "#[ \t]*define[ \t]+UV_VERSION_(MAJOR|MINOR|PATCH)[ \t]+[0-9]+")
|
||||||
|
if(LIBUV_INCLUDE_DIR AND EXISTS "${LIBUV_INCLUDE_DIR}/uv-version.h")
|
||||||
|
file(STRINGS "${LIBUV_INCLUDE_DIR}/uv-version.h" _LIBUV_H REGEX "${_LIBUV_H_REGEX}")
|
||||||
|
elseif(LIBUV_INCLUDE_DIR AND EXISTS "${LIBUV_INCLUDE_DIR}/uv.h")
|
||||||
|
file(STRINGS "${LIBUV_INCLUDE_DIR}/uv.h" _LIBUV_H REGEX "${_LIBUV_H_REGEX}")
|
||||||
|
else()
|
||||||
|
set(_LIBUV_H "")
|
||||||
|
endif()
|
||||||
|
foreach(c MAJOR MINOR PATCH)
|
||||||
|
if(_LIBUV_H MATCHES "#[ \t]*define[ \t]+UV_VERSION_${c}[ \t]+([0-9]+)")
|
||||||
|
set(_LIBUV_VERSION_${c} "${CMAKE_MATCH_1}")
|
||||||
|
else()
|
||||||
|
unset(_LIBUV_VERSION_${c})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(DEFINED _LIBUV_VERSION_MAJOR AND DEFINED _LIBUV_VERSION_MINOR)
|
||||||
|
set(LIBUV_VERSION_MAJOR "${_LIBUV_VERSION_MAJOR}")
|
||||||
|
set(LIBUV_VERSION_MINOR "${_LIBUV_VERSION_MINOR}")
|
||||||
|
set(LIBUV_VERSION "${LIBUV_VERSION_MAJOR}.${LIBUV_VERSION_MINOR}")
|
||||||
|
if(DEFINED _LIBUV_VERSION_PATCH)
|
||||||
|
set(LIBUV_VERSION_PATCH "${_LIBUV_VERSION_PATCH}")
|
||||||
|
set(LIBUV_VERSION "${LIBUV_VERSION}.${LIBUV_VERSION_PATCH}")
|
||||||
|
else()
|
||||||
|
unset(LIBUV_VERSION_PATCH)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(LIBUV_VERSION_MAJOR "")
|
||||||
|
set(LIBUV_VERSION_MINOR "")
|
||||||
|
set(LIBUV_VERSION_PATCH "")
|
||||||
|
set(LIBUV_VERSION "")
|
||||||
|
endif()
|
||||||
|
unset(_LIBUV_VERSION_MAJOR)
|
||||||
|
unset(_LIBUV_VERSION_MINOR)
|
||||||
|
unset(_LIBUV_VERSION_PATCH)
|
||||||
|
unset(_LIBUV_H_REGEX)
|
||||||
|
unset(_LIBUV_H)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Set Find Package Arguments
|
||||||
|
include (FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(libuv
|
||||||
|
FOUND_VAR libuv_FOUND
|
||||||
|
REQUIRED_VARS LIBUV_LIBRARY LIBUV_INCLUDE_DIR
|
||||||
|
VERSION_VAR LIBUV_VERSION
|
||||||
|
HANDLE_COMPONENTS
|
||||||
|
FAIL_MESSAGE
|
||||||
|
"Could NOT find Libuv"
|
||||||
|
)
|
||||||
|
|
||||||
|
set(LIBUV_FOUND ${libuv_FOUND})
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
# Provide documented result variables and targets.
|
||||||
|
if(LIBUV_FOUND)
|
||||||
|
set(LIBUV_INCLUDE_DIRS ${LIBUV_INCLUDE_DIR})
|
||||||
|
set(LIBUV_LIBRARIES ${LIBUV_LIBRARY})
|
||||||
|
if(NOT TARGET LIBUV::LIBUV)
|
||||||
|
add_library(LIBUV::LIBUV UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(LIBUV::LIBUV PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${LIBUV_LIBRARY}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${LIBUV_INCLUDE_DIRS}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
8
libuvConfig.cmake.in
Normal file
8
libuvConfig.cmake.in
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
set(LIBUV_VERSION ${PROJECT_VERSION})
|
||||||
|
|
||||||
|
@PACKAGE_INIT@
|
||||||
|
|
||||||
|
set_and_check(LIBUV_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
||||||
|
set_and_check(LIBUV_SYSCONFIG_DIR "@PACKAGE_SYSCONFIG_INSTALL_DIR@")
|
||||||
|
|
||||||
|
check_required_components(libuv)
|
||||||
Loading…
Reference in New Issue
Block a user