mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 21:48:59 +08:00
[libuuid] Initial commit of 1.0.3
This commit is contained in:
parent
9c6698ab34
commit
dc193dd9e5
35
ports/libuuid/CMakeLists.txt
Normal file
35
ports/libuuid/CMakeLists.txt
Normal file
@ -0,0 +1,35 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(libuuid C)
|
||||
|
||||
configure_file(config.linux.h config.h COPYONLY)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
add_library(uuid STATIC
|
||||
clear.c
|
||||
compare.c
|
||||
copy.c
|
||||
gen_uuid.c
|
||||
isnull.c
|
||||
pack.c
|
||||
parse.c
|
||||
randutils.c
|
||||
unpack.c
|
||||
unparse.c
|
||||
uuid_time.c
|
||||
)
|
||||
target_compile_options(uuid PRIVATE -include "${CMAKE_CURRENT_BINARY_DIR}/config.h")
|
||||
|
||||
add_executable(test_uuid test_uuid.c)
|
||||
target_link_libraries(test_uuid uuid)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
install(FILES uuid.h DESTINATION include)
|
||||
endif()
|
||||
|
||||
install(
|
||||
TARGETS uuid
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
3
ports/libuuid/CONTROL
Normal file
3
ports/libuuid/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: libuuid
|
||||
Version: 1.0.3
|
||||
Description: Universally unique id library
|
13
ports/libuuid/config.linux.h
Normal file
13
ports/libuuid/config.linux.h
Normal file
@ -0,0 +1,13 @@
|
||||
#define HAVE_DECL__SC_HOST_NAME_MAX 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
#define HAVE_SRANDOM 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_SYS_FILE_H 1
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_USLEEP 1
|
||||
#define PACKAGE_STRING "libuuid 1.0.3"
|
29
ports/libuuid/portfile.cmake
Normal file
29
ports/libuuid/portfile.cmake
Normal file
@ -0,0 +1,29 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libuuid-1.0.3)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://sourceforge.net/projects/libuuid/files/libuuid-1.0.3.tar.gz"
|
||||
FILENAME libuuid-1.0.3.tar.gz
|
||||
SHA512 77488caccc66503f6f2ded7bdfc4d3bc2c20b24a8dc95b2051633c695e99ec27876ffbafe38269b939826e1fdb06eea328f07b796c9e0aaca12331a787175507
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
file(COPY
|
||||
${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_LIST_DIR}/config.linux.h
|
||||
DESTINATION ${SOURCE_PATH}
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/COPYING
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/libuuid RENAME copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
Loading…
Reference in New Issue
Block a user