early-access version 2853
This commit is contained in:
75
externals/vcpkg/ports/libplist/CMakeLists.txt
vendored
Executable file
75
externals/vcpkg/ports/libplist/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,75 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(plist C CXX)
|
||||
|
||||
file(GLOB_RECURSE PLIST_HEADER include/plist/*.h)
|
||||
|
||||
set(PLIST_SRC
|
||||
src/base64.c
|
||||
src/bytearray.c
|
||||
src/hashtable.c
|
||||
src/ptrarray.c
|
||||
src/time64.c
|
||||
src/xplist.c
|
||||
src/bplist.c
|
||||
src/plist.c
|
||||
)
|
||||
|
||||
set(PLISTPP_SRC
|
||||
src/Node.cpp
|
||||
src/Structure.cpp
|
||||
src/Array.cpp
|
||||
src/Boolean.cpp
|
||||
src/Data.cpp
|
||||
src/Date.cpp
|
||||
src/Dictionary.cpp
|
||||
src/Integer.cpp
|
||||
src/Key.cpp
|
||||
src/Real.cpp
|
||||
src/String.cpp
|
||||
src/Uid.cpp
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE LIBCNARY_HEADER libcnary/include/*.h)
|
||||
file(GLOB_RECURSE LIBCNARY_SRC libcnary/*c)
|
||||
|
||||
add_library(plist ${PLIST_SRC} ${PLIST_HEADER} ${LIBCNARY_SRC} ${LIBCNARY_HEADER})
|
||||
target_include_directories(plist PRIVATE src include libcnary/include)
|
||||
set_target_properties(plist PROPERTIES OUTPUT_NAME plist-2.0)
|
||||
|
||||
add_library(plist++ STATIC ${PLISTPP_SRC} ${PLIST_HEADER} ${LIBCNARY_SRC} ${LIBCNARY_HEADER})
|
||||
set_target_properties(plist++ PROPERTIES OUTPUT_NAME plist++-2.0)
|
||||
target_include_directories(plist++ PRIVATE src include libcnary/include)
|
||||
|
||||
if(WIN32 AND BUILD_SHARED_LIBS)
|
||||
target_compile_options(plist PRIVATE -W3 -WX- -sdl-)
|
||||
target_compile_definitions(plist PRIVATE -DLIBPLIST_EXPORTS)
|
||||
target_compile_options(plist++ PRIVATE -W3 -WX- -sdl-)
|
||||
target_compile_definitions(plist++ PRIVATE -DLIBPLIST_EXPORTS)
|
||||
endif()
|
||||
target_link_libraries(plist++ PRIVATE plist)
|
||||
|
||||
install(
|
||||
TARGETS plist plist++
|
||||
RUNTIME DESTINATION bin
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
)
|
||||
|
||||
set(PACKAGE_NAME libplist)
|
||||
set(PACKAGE_VERSION 2.0)
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix \${prefix})
|
||||
set(libdir \${prefix}/lib)
|
||||
set(includedir \${prefix}/../include)
|
||||
foreach (PLIST_PKGCONFIG libplist-2.0.pc libplist++-2.0.pc)
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/${PLIST_PKGCONFIG}.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PLIST_PKGCONFIG}
|
||||
@ONLY
|
||||
)
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PLIST_PKGCONFIG}
|
||||
DESTINATION lib/pkgconfig)
|
||||
endforeach()
|
||||
|
||||
install(FILES ${PLIST_HEADER} DESTINATION include/plist)
|
||||
37
externals/vcpkg/ports/libplist/dllexport.patch
vendored
Executable file
37
externals/vcpkg/ports/libplist/dllexport.patch
vendored
Executable file
@@ -0,0 +1,37 @@
|
||||
diff --git a/include/plist/plist.h b/include/plist/plist.h
|
||||
index 2863c74..9cdb219 100644
|
||||
--- a/include/plist/plist.h
|
||||
+++ b/include/plist/plist.h
|
||||
@@ -42,7 +42,7 @@ extern "C"
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
-#ifdef _MSC_VER
|
||||
+#if defined(_MSC_VER) && defined(LIBPLIST_EXPORTS)
|
||||
#define PLIST_API_MSC __declspec( dllexport )
|
||||
#else
|
||||
#define PLIST_API_MSC
|
||||
diff --git a/src/plist.h b/src/plist.h
|
||||
index 1e5d0d1..6690343 100644
|
||||
--- a/src/plist.h
|
||||
+++ b/src/plist.h
|
||||
@@ -39,10 +39,7 @@
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
-#ifdef _MSC_VER
|
||||
- #define PLIST_API __declspec( dllexport )
|
||||
-#else
|
||||
-#ifdef WIN32
|
||||
+#if (defined(_MSC_VER) || defined(WIN32)) && defined(LIBPLIST_EXPORTS)
|
||||
#define PLIST_API __declspec( dllexport )
|
||||
#else
|
||||
#ifdef HAVE_FVISIBILITY
|
||||
@@ -51,7 +48,6 @@
|
||||
#define PLIST_API
|
||||
#endif
|
||||
#endif
|
||||
-#endif
|
||||
|
||||
struct plist_data_s
|
||||
{
|
||||
47
externals/vcpkg/ports/libplist/portfile.cmake
vendored
Executable file
47
externals/vcpkg/ports/libplist/portfile.cmake
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_CRT ONLY_DYNAMIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libimobiledevice-win32/libplist
|
||||
REF bbba7cabb78aad180a7a982ada5e1f21ff0ba873 # v1.3.6
|
||||
SHA512 4cd59ed87c647259d0da99a20a05e01aa880f01f6b5cecd29e4247029a3d29f0f68b4552571eb3fd3c5549b4cb357801ffe43338b8ff34d44d6be5393d2e6b9d
|
||||
HEAD_REF msvc-master
|
||||
PATCHES dllexport.patch
|
||||
)
|
||||
|
||||
configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
||||
set(pcfile "libplist-2.0.pc")
|
||||
set(pcfiletarget "libplist.pc")
|
||||
set(basepath "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/")
|
||||
if(EXISTS "${basepath}${pcfile}")
|
||||
file(CREATE_LINK "${basepath}${pcfile}" "${basepath}${pcfiletarget}" COPY_ON_ERROR)
|
||||
endif()
|
||||
set(basepath "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/")
|
||||
if(EXISTS "${basepath}${pcfile}")
|
||||
file(CREATE_LINK "${basepath}${pcfile}" "${basepath}${pcfiletarget}" COPY_ON_ERROR)
|
||||
endif()
|
||||
|
||||
set(pcfile "libplist++-2.0.pc")
|
||||
set(pcfiletarget "libplist++.pc")
|
||||
set(basepath "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/")
|
||||
if(EXISTS "${basepath}${pcfile}")
|
||||
file(CREATE_LINK "${basepath}${pcfile}" "${basepath}${pcfiletarget}" COPY_ON_ERROR)
|
||||
endif()
|
||||
set(basepath "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/")
|
||||
if(EXISTS "${basepath}${pcfile}")
|
||||
file(CREATE_LINK "${basepath}${pcfile}" "${basepath}${pcfiletarget}" COPY_ON_ERROR)
|
||||
endif()
|
||||
7
externals/vcpkg/ports/libplist/vcpkg.json
vendored
Executable file
7
externals/vcpkg/ports/libplist/vcpkg.json
vendored
Executable file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "libplist",
|
||||
"version": "1.3.6",
|
||||
"port-version": 1,
|
||||
"description": "A library to handle Apple Property List format in binary or XML",
|
||||
"homepage": "https://libimobiledevice.org/"
|
||||
}
|
||||
Reference in New Issue
Block a user