early-access version 2853
This commit is contained in:
59
externals/vcpkg/ports/libimobiledevice/CMakeLists.txt
vendored
Executable file
59
externals/vcpkg/ports/libimobiledevice/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,59 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(libimobiledevice C)
|
||||
|
||||
# find dependencies
|
||||
find_library(libplist NAMES plist plist-2.0 libplist libplist-2.0 REQUIRED)
|
||||
find_library(libusbmuxd libusbmuxd REQUIRED)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_path(dirent_INCLUDE_DIR dirent.h)
|
||||
if (WIN32)
|
||||
find_library(getopt getopt REQUIRED)
|
||||
endif()
|
||||
|
||||
# ready to create library
|
||||
file(GLOB_RECURSE IMOBDEV_COMMON_HDR common/*.h)
|
||||
file(GLOB_RECURSE IMOBDEV_COMMON_SRC common/*.c)
|
||||
|
||||
file(GLOB IMOBDEV_PUBLIC_HDR include/*.h)
|
||||
file(GLOB IMOBDEV_PUBLIC_SUB_HDR include/libimobiledevice/*.h)
|
||||
file(GLOB_RECURSE IMOBDEV_PRIVATE_HDR src/*.h)
|
||||
file(GLOB_RECURSE IMOBDEV_SRC src/*.c)
|
||||
|
||||
add_library(libimobiledevice ${IMOBDEV_SRC} ${IMOBDEV_PUBLIC_HDR} ${IMOBDEV_PUBLIC_SUB_HDR} ${IMOBDEV_PRIVATE_HDR} ${IMOBDEV_COMMON_HDR} ${IMOBDEV_COMMON_SRC})
|
||||
set_target_properties(libimobiledevice PROPERTIES OUTPUT_NAME libimobiledevice-1.0)
|
||||
target_include_directories(libimobiledevice PRIVATE ${dirent_INCLUDE_DIR} include .)
|
||||
target_compile_definitions(libimobiledevice PRIVATE -DHAVE_OPENSSL)
|
||||
target_link_libraries(libimobiledevice PRIVATE ${libplist} ${libusbmuxd} ${getopt} OpenSSL::SSL OpenSSL::Crypto)
|
||||
if (WIN32)
|
||||
target_link_libraries(libimobiledevice PRIVATE Ws2_32)
|
||||
else()
|
||||
endif()
|
||||
|
||||
# install
|
||||
install(
|
||||
TARGETS libimobiledevice
|
||||
RUNTIME DESTINATION bin
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
)
|
||||
|
||||
set(LIBPLIST_VERSION 2.0)
|
||||
set(LIBUSBMUXD_VERSION 2.0)
|
||||
set(PACKAGE_NAME libimobiledevice)
|
||||
set(PACKAGE_VERSION 1.0)
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix \${prefix})
|
||||
set(libdir \${prefix}/lib)
|
||||
set(includedir \${prefix}/../include)
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/libimobiledevice-1.0.pc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libimobiledevice-1.0.pc
|
||||
@ONLY
|
||||
)
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libimobiledevice-1.0.pc
|
||||
DESTINATION lib/pkgconfig
|
||||
)
|
||||
|
||||
install(FILES ${IMOBDEV_PUBLIC_HDR} DESTINATION include)
|
||||
install(FILES ${IMOBDEV_PUBLIC_SUB_HDR} DESTINATION include/libimobiledevice)
|
||||
22
externals/vcpkg/ports/libimobiledevice/portfile.cmake
vendored
Executable file
22
externals/vcpkg/ports/libimobiledevice/portfile.cmake
vendored
Executable file
@@ -0,0 +1,22 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libimobiledevice-win32/libimobiledevice
|
||||
REF 0d4a7e905baeadafa098e629a5241fac6fbf7d24 # v1.3.7
|
||||
SHA512 db6369b2fa8e7b659948602ac8c4cd568bf37c0f73e58150f61f1af7000de95aa1a6a9ae546d6a37de4cb08a8059127fe5ed067351c4092c01a45350586f755a
|
||||
HEAD_REF msvc-master
|
||||
)
|
||||
|
||||
configure_file("${CURRENT_PORT_DIR}/CMakeLists.txt" "${SOURCE_PATH}/CMakeLists.txt" COPYONLY)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
17
externals/vcpkg/ports/libimobiledevice/vcpkg.json
vendored
Executable file
17
externals/vcpkg/ports/libimobiledevice/vcpkg.json
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "libimobiledevice",
|
||||
"version": "1.3.17",
|
||||
"description": "A cross-platform protocol library to communicate with iOS devices",
|
||||
"homepage": "http://www.libimobiledevice.org",
|
||||
"dependencies": [
|
||||
"dirent",
|
||||
"getopt",
|
||||
"libplist",
|
||||
"libusbmuxd",
|
||||
"openssl",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user