mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 12:53:02 +08:00
Merge branch 'master' of https://github.com/Microsoft/vcpkg into qt5_modular
This commit is contained in:
commit
48128e5b4d
@ -1,21 +1,29 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(abseil CXX)
|
||||
|
||||
add_definitions(-DNOMINMAX)
|
||||
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX d)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
|
||||
option(INSTALL_HEADERS "Install header files" ON)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
option(INSTALL_HEADERS "Install header files" ON)
|
||||
else()
|
||||
option(INSTALL_HEADERS "Install header files" OFF)
|
||||
endif()
|
||||
|
||||
function(add_sublibrary LIB)
|
||||
file(GLOB_RECURSE SOURCES "absl/${LIB}/*.cc")
|
||||
list(FILTER SOURCES EXCLUDE REGEX "_test")
|
||||
list(FILTER SOURCES EXCLUDE REGEX "_test(_.+)?.cc$|_nonprod.cc$")
|
||||
file(GLOB HEADERS "absl/${LIB}/*.h")
|
||||
file(GLOB INTERNAL_HEADERS "absl/${LIB}/internal/*.h")
|
||||
|
||||
if(SOURCES)
|
||||
add_library(${LIB} ${SOURCES})
|
||||
if("STATIC" IN_LIST ARGN)
|
||||
add_library(${LIB} STATIC ${SOURCES})
|
||||
else()
|
||||
add_library(${LIB} ${SOURCES})
|
||||
endif()
|
||||
set_target_properties(${LIB} PROPERTIES OUTPUT_NAME "absl_${LIB}")
|
||||
target_include_directories(${LIB} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
|
||||
else()
|
||||
@ -49,14 +57,17 @@ function(target_link_public_libraries A)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
add_sublibrary(base)
|
||||
add_sublibrary(meta)
|
||||
add_sublibrary(algorithm)
|
||||
add_sublibrary(base)
|
||||
add_sublibrary(container)
|
||||
add_sublibrary(memory)
|
||||
add_sublibrary(strings)
|
||||
add_sublibrary(debugging)
|
||||
add_sublibrary(memory)
|
||||
add_sublibrary(meta)
|
||||
add_sublibrary(numeric)
|
||||
add_sublibrary(strings)
|
||||
add_sublibrary(synchronization STATIC)
|
||||
# Time must be static because there are global variables intended for export
|
||||
add_sublibrary(time STATIC)
|
||||
add_sublibrary(types)
|
||||
add_sublibrary(utility)
|
||||
|
||||
@ -68,6 +79,11 @@ target_link_public_libraries(numeric base)
|
||||
target_link_public_libraries(strings base memory meta numeric)
|
||||
target_link_public_libraries(types base utility meta algorithm strings)
|
||||
target_link_public_libraries(utility base meta)
|
||||
target_link_public_libraries(time base numeric)
|
||||
target_link_public_libraries(synchronization base time)
|
||||
|
||||
find_package(unofficial-cctz REQUIRED)
|
||||
targeT_link_libraries(time PUBLIC unofficial::cctz)
|
||||
|
||||
install(
|
||||
EXPORT unofficial-abseil-targets
|
||||
|
@ -1,6 +1,7 @@
|
||||
Source: abseil
|
||||
Version: 2017-09-28
|
||||
Version: 2017-10-14
|
||||
Description: an open-source collection designed to augment the C++ standard library.
|
||||
Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.
|
||||
In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.
|
||||
Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole.
|
||||
Build-Depends: cctz
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff --git a/absl/base/optimization.h b/absl/base/optimization.h
|
||||
index db8beaf..aaaffa4 100644
|
||||
--- a/absl/base/optimization.h
|
||||
+++ b/absl/base/optimization.h
|
||||
@@ -46,6 +46,7 @@
|
||||
// GCC will not tail call given inline volatile assembly.
|
||||
#define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __asm__ __volatile__("")
|
||||
#elif defined(_MSC_VER)
|
||||
+#include <intrin.h>
|
||||
// The __nop() intrinsic blocks the optimisation.
|
||||
#define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __nop()
|
||||
#else
|
@ -10,22 +10,16 @@ message("To use from cmake:\n find_package(unofficial-abseil REQUIRED)\n link_
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO abseil/abseil-cpp
|
||||
REF cdf20caa491f59c0a35a8d8fbec0d948e4bc7e4c
|
||||
SHA512 04889e7804b644821d0bf5d1b13f15a072e748bf0465442c64528e014c71f415544e9146c9518f9fe7bb14a295b18f293c3f7b672f6a51dba9909f3b74667fae
|
||||
REF 1a9ba5e2e5a14413704f0c913fac53359576d3b6
|
||||
SHA512 756e494c30324c937ca655d91afdee9acb923c7ee837a7c685441305bea2d54a75b3b21be7355abe416660984ba51ace9d234d70168fb029c601b7442397e8ff
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-intrin.patch"
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG -DINSTALL_HEADERS=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
@ -24,7 +24,7 @@ vcpkg_apply_patches(
|
||||
${CMAKE_CURRENT_LIST_DIR}/Fix-building-in-Visual-Studio-2017.patch
|
||||
)
|
||||
|
||||
if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
set(DEBUG_CONFIG "Debug Static")
|
||||
set(RELEASE_CONFIG "Release Static")
|
||||
else()
|
||||
@ -53,7 +53,7 @@ file(COPY ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${DEBUG_CONFIG
|
||||
file(COPY ${SOURCE_PATH}/bin/vs-2015/${TRIPLET_SYSTEM_ARCH}/${RELEASE_CONFIG}/antlr4-runtime.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
|
||||
if (${VCPKG_LIBRARY_LINKAGE} STREQUAL static)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/static.patch
|
||||
|
@ -1,4 +1,4 @@
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
@ -23,7 +23,7 @@ vcpkg_extract_source_archive(${ARCHIVE})
|
||||
vcpkg_extract_source_archive(${GBC_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/tools/)
|
||||
set(FETCHED_GBC_PATH ${CURRENT_BUILDTREES_DIR}/tools/gbc-6.0.0-amd64.exe)
|
||||
|
||||
if (NOT EXISTS ${FETCHED_GBC_PATH})
|
||||
if (NOT EXISTS "${FETCHED_GBC_PATH}")
|
||||
message(FATAL_ERROR "Fetching GBC failed. Expected '${FETCHED_GBC_PATH}' to exists, but it doesn't.")
|
||||
endif()
|
||||
|
||||
|
@ -1,29 +1,19 @@
|
||||
cmake_minimum_required(VERSION 3.8.0)
|
||||
project(butteraugli)
|
||||
project(butteraugli CXX)
|
||||
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
add_compile_options(-D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
|
||||
if(MSVC)
|
||||
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX)
|
||||
add_compile_options(/W3 /wd4005 /wd4996 /wd4018)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
find_package(JPEG REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
|
||||
include_directories("." ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS})
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
endif()
|
||||
|
||||
include_directories(".")
|
||||
|
||||
add_library(butteraugli_lib butteraugli/butteraugli.cc)
|
||||
|
||||
add_executable(butteraugli butteraugli/butteraugli_main.cc)
|
||||
|
||||
target_link_libraries(butteraugli butteraugli_lib ${JPEG_LIBRARIES} ${PNG_LIBRARIES})
|
||||
|
||||
|
||||
install(
|
||||
TARGETS butteraugli_lib
|
||||
RUNTIME DESTINATION bin
|
||||
@ -32,6 +22,10 @@ install(
|
||||
)
|
||||
|
||||
if(NOT DISABLE_INSTALL_TOOLS)
|
||||
add_executable(butteraugli butteraugli/butteraugli_main.cc)
|
||||
target_include_directories(butteraugli PRIVATE ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS})
|
||||
target_link_libraries(butteraugli PRIVATE butteraugli_lib ${JPEG_LIBRARIES} ${PNG_LIBRARIES})
|
||||
|
||||
install (
|
||||
TARGETS butteraugli
|
||||
RUNTIME DESTINATION tools/butteraugli
|
||||
|
36
ports/cctz/CMakeLists.txt
Normal file
36
ports/cctz/CMakeLists.txt
Normal file
@ -0,0 +1,36 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(cctz CXX)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX d)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
option(INSTALL_HEADERS "Install header files" ON)
|
||||
else()
|
||||
option(INSTALL_HEADERS "Install header files" OFF)
|
||||
endif()
|
||||
|
||||
file(GLOB SOURCES src/*.cc)
|
||||
list(FILTER SOURCES EXCLUDE REGEX "_test.cc$|benchmarks|_tool.cc$")
|
||||
|
||||
file(GLOB HEADERS include/cctz/*.h)
|
||||
|
||||
add_library(cctz ${SOURCES})
|
||||
target_include_directories(cctz PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
||||
|
||||
if(INSTALL_HEADERS)
|
||||
install(FILES ${HEADERS} DESTINATION "include/cctz")
|
||||
endif()
|
||||
|
||||
install(TARGETS cctz EXPORT unofficial-cctz-targets
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
install(
|
||||
EXPORT unofficial-cctz-targets
|
||||
FILE unofficial-cctz-config.cmake
|
||||
NAMESPACE unofficial::
|
||||
DESTINATION share/unofficial-cctz
|
||||
)
|
3
ports/cctz/CONTROL
Normal file
3
ports/cctz/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: cctz
|
||||
Version: v2.1
|
||||
Description: two libraries that cooperate with <chrono> to give C++ programmers all the necessary tools for computing with dates, times, and time zones in a simple and correct manner.
|
24
ports/cctz/portfile.cmake
Normal file
24
ports/cctz/portfile.cmake
Normal file
@ -0,0 +1,24 @@
|
||||
include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO google/cctz
|
||||
REF v2.1
|
||||
SHA512 b6531ce64fdd8581944457cdeff7f9ff9c00958af51ddb262c74e08fcc076466c59c7bef1ce7edccc9512a7f4cb204e04581d287c4a9a684057fe39421c3fbc6
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cctz)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/cctz ${CURRENT_PACKAGES_DIR}/share/unofficial-cctz)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cctz RENAME copyright)
|
3
ports/celero/CONTROL
Normal file
3
ports/celero/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: celero
|
||||
Version: 2.1.0-1
|
||||
Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++.
|
29
ports/celero/portfile.cmake
Normal file
29
ports/celero/portfile.cmake
Normal file
@ -0,0 +1,29 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
message(STATUS "Celero currently can only be built statically")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO DigitalInBlue/Celero
|
||||
REF v2.1.0
|
||||
SHA512 30563567255b09a2c810d97896839589ed99d45b6c8d075fd16d1a0068457d70195a199f5c982c84784c2e03284c1eaac565253fa72b81d9e2d4102721b80221
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||||
OPTIONS
|
||||
-DCELERO_ENABLE_EXPERIMENTS=OFF
|
||||
-DCELERO_ENABLE_TESTS=OFF
|
||||
-DCELERO_RUN_EXAMPLE_ON_BUILD=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/celero RENAME copyright)
|
4
ports/eastl/CONTROL
Normal file
4
ports/eastl/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: eastl
|
||||
Version: 3.05.08
|
||||
Description: Electronic Arts Standard Template Library.
|
||||
It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations.
|
29
ports/eastl/portfile.cmake
Normal file
29
ports/eastl/portfile.cmake
Normal file
@ -0,0 +1,29 @@
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
message(STATUS "Warning: Dynamic building not supported by EASTL. Building static.")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eastl)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO electronicarts/EASTL
|
||||
REF 3.05.08
|
||||
SHA512 7b9e87d967252026a660a648688a19e7b88d4eca7f373ba7427b315103a6f8cea555a85b2ef74557cf7e8a486b847589cac4b622b4ab88cab7c0f0a22355ab66
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/eastl RENAME copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/3RDPARTYLICENSES.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/eastl)
|
@ -72,7 +72,7 @@ set(SRCS ${DEPRECATION_SRCS}
|
||||
# define (to nothing instead of _declspec(dllimport) ) the DLL_API macro.
|
||||
# For this purpouse we include (depending on the BUILD_SHARED_LIBS )
|
||||
# the appropriate FreeImageConfig.h .
|
||||
if(${BUILD_SHARED_LIBS})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-dynamic.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h)
|
||||
else()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-static.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h)
|
||||
@ -81,7 +81,7 @@ list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h)
|
||||
|
||||
add_library(FreeImage ${SRCS} ${PRIVATE_HEADERS} ${PUBLIC_HEADERS})
|
||||
|
||||
if(${BUILD_SHARED_LIBS})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_EXPORTS)
|
||||
else()
|
||||
target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_LIB)
|
||||
@ -119,7 +119,7 @@ add_library(FreeImagePlus
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.rc)
|
||||
|
||||
if(${BUILD_SHARED_LIBS})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(FreeImagePlus PRIVATE -DFIP_EXPORTS)
|
||||
else()
|
||||
target_compile_definitions(FreeImagePlus PRIVATE -DFREEIMAGE_LIB)
|
||||
|
@ -1,70 +0,0 @@
|
||||
From 823171a129401d226ac4821fb997ce585045170c Mon Sep 17 00:00:00 2001
|
||||
From: Manuel Massing <m.massing@warped-space.de>
|
||||
Date: Wed, 23 Nov 2016 23:50:12 +0100
|
||||
Subject: [PATCH] Add support for MSVC1900 (backported from GDAL2)
|
||||
|
||||
---
|
||||
nmake.opt | 6 ++++++
|
||||
port/cpl_config.h.vc | 8 +++++---
|
||||
2 files changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/nmake.opt b/nmake.opt
|
||||
index 8900135..4d1c4fa 100644
|
||||
--- a/nmake.opt
|
||||
+++ b/nmake.opt
|
||||
@@ -31,6 +31,7 @@
|
||||
# Check version of Visual C++ compiler:
|
||||
# nmake -f makefile.vc MSVC_VER=xxxx
|
||||
# where xxxx is one of following:
|
||||
+# 1900 = 14.0(2015)
|
||||
# 1800 = 12.0(2013)
|
||||
# 1700 = 11.0(2012)
|
||||
# 1600 = 10.0(2010)
|
||||
@@ -627,8 +628,13 @@ GDALLIB = $(GDAL_ROOT)/gdal.lib
|
||||
!ENDIF
|
||||
|
||||
!IFDEF ODBC_SUPPORTED
|
||||
+!IF $(MSVC_VER) >= 1900
|
||||
+# legacy_stdio_definitions.lib : https://connect.microsoft.com/VisualStudio/feedback/details/1134693/vs-2015-ctp-5-c-vsnwprintf-s-and-other-functions-are-not-exported-in-appcrt140-dll-breaking-linkage-of-static-libraries
|
||||
+ODBCLIB = legacy_stdio_definitions.lib odbc32.lib odbccp32.lib user32.lib
|
||||
+!ELSE
|
||||
ODBCLIB = odbc32.lib odbccp32.lib user32.lib
|
||||
!ENDIF
|
||||
+!ENDIF
|
||||
|
||||
!IF DEFINED(MRSID_DIR) || DEFINED(MRSID_RASTER_DIR) || DEFINED(MRSID_LIDAR_DIR)
|
||||
!IF "$(MRSID_PLUGIN)" != "YES"
|
||||
diff --git a/port/cpl_config.h.vc b/port/cpl_config.h.vc
|
||||
index bfff8f6..fe7b82a 100644
|
||||
--- a/port/cpl_config.h.vc
|
||||
+++ b/port/cpl_config.h.vc
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
-/* We define this here in general so that a VC++ build will publically
|
||||
+/* We define this here in general so that a VC++ build will publicly
|
||||
declare STDCALL interfaces even if an application is built against it
|
||||
using MinGW */
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1500)
|
||||
# define vsnprintf _vsnprintf
|
||||
#endif
|
||||
-#define snprintf _snprintf
|
||||
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
|
||||
+# define snprintf _snprintf
|
||||
+#endif
|
||||
|
||||
#define HAVE_GETCWD 1
|
||||
/* gmt_notunix.h from GMT project also redefines getcwd. See #3138 */
|
||||
@@ -86,7 +88,7 @@
|
||||
/* Set the native cpu bit order */
|
||||
#define HOST_FILLORDER FILLORDER_LSB2MSB
|
||||
|
||||
-/* Define as 0 or 1 according to the floating point format suported by the
|
||||
+/* Define as 0 or 1 according to the floating point format supported by the
|
||||
machine */
|
||||
#define HAVE_IEEEFP 1
|
||||
|
||||
--
|
||||
2.10.1.windows.1
|
||||
|
@ -1,18 +1,8 @@
|
||||
From b25c3dc49ca1bcf9a789cf64c9fa8694e35127f0 Mon Sep 17 00:00:00 2001
|
||||
From: Manuel Massing <m.massing@warped-space.de>
|
||||
Date: Sun, 27 Nov 2016 09:57:04 +0100
|
||||
Subject: [PATCH 2/2] Add variable CXX_CRT_FLAGS to allow for selection of C
|
||||
runtime linkage in nmake build.
|
||||
|
||||
---
|
||||
nmake.opt | 18 ++++++++++++++----
|
||||
1 file changed, 14 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/nmake.opt b/nmake.opt
|
||||
index 4d1c4fa..47c2df8 100644
|
||||
index bd5719c2d1..f6101ccd59 100644
|
||||
--- a/nmake.opt
|
||||
+++ b/nmake.opt
|
||||
@@ -125,18 +125,28 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb
|
||||
@@ -127,18 +127,28 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb
|
||||
CXX_PDB_FLAGS=
|
||||
!ENDIF
|
||||
|
||||
@ -29,22 +19,19 @@ index 4d1c4fa..47c2df8 100644
|
||||
!IFNDEF OPTFLAGS
|
||||
!IF $(MSVC_VER) >= 1400
|
||||
!IFNDEF DEBUG
|
||||
-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MD /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
|
||||
-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
|
||||
+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG
|
||||
!ELSE
|
||||
-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MD /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
|
||||
-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
|
||||
+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG
|
||||
!ENDIF
|
||||
!ELSE
|
||||
!IFNDEF DEBUG
|
||||
-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /Ox /DNDEBUG
|
||||
-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /Ox /FC /DNDEBUG
|
||||
+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /Ox /DNDEBUG
|
||||
!ELSE
|
||||
-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /DDEBUG
|
||||
-OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /FC /DDEBUG
|
||||
+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /DDEBUG
|
||||
!ENDIF
|
||||
!ENDIF #MSVC_VER
|
||||
!ENDIF # OPTFLAGS
|
||||
--
|
||||
2.10.1.windows.1
|
||||
|
@ -0,0 +1,14 @@
|
||||
diff --git a/nmake.opt b/nmake.opt
|
||||
index bd5719c2d1..c0ca442cbe 100644
|
||||
--- a/nmake.opt
|
||||
+++ b/nmake.opt
|
||||
@@ -195,6 +205,9 @@ SOFTWARNFLAGS= /wd4244 /wd4702 /wd4701 /wd4013 /wd4706 /wd4057 /wd4210 /wd4305
|
||||
# Linker debug options
|
||||
!IFDEF DEBUG
|
||||
LDEBUG= /debug
|
||||
+!ELSEIFDEF WITH_PDB
|
||||
+# Ensures that PDB is included in release DLL if so requested
|
||||
+LDEBUG= /debug /opt:ref /opt:icf
|
||||
!ENDIF
|
||||
|
||||
# Uncomment the following if you are building for 64-bit windows
|
@ -1,26 +0,0 @@
|
||||
From 9da0cb6eed442ebf3eea232cd85e26c155c963ef Mon Sep 17 00:00:00 2001
|
||||
From: Manuel Massing <m.massing@warped-space.de>
|
||||
Date: Tue, 29 Nov 2016 12:43:58 +0100
|
||||
Subject: [PATCH 3/4] - Ensures inclusion of PDB in release dll if so requested
|
||||
|
||||
---
|
||||
gdal/nmake.opt | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/nmake.opt b/nmake.opt
|
||||
index 47c2df8..4844d22 100644
|
||||
--- a/nmake.opt
|
||||
+++ b/nmake.opt
|
||||
@@ -174,6 +174,9 @@ SOFTWARNFLAGS= /wd4244 /wd4702 /wd4701 /wd4013 /wd4706 /wd4057 /wd4210 /wd4305
|
||||
# Linker debug options
|
||||
!IFDEF DEBUG
|
||||
LDEBUG= /debug
|
||||
+!ELSEIFDEF WITH_PDB
|
||||
+# Ensures that PDB is included in release DLL if so requested
|
||||
+LDEBUG= /debug /opt:ref /opt:icf
|
||||
!ENDIF
|
||||
|
||||
# Uncomment the following if you are building for 64-bit windows
|
||||
--
|
||||
2.10.1.windows.1
|
||||
|
20
ports/gdal/0003-Fix-openjpeg-include.patch
Normal file
20
ports/gdal/0003-Fix-openjpeg-include.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff --git a/frmts/openjpeg/openjpegdataset.cpp b/frmts/openjpeg/openjpegdataset.cpp
|
||||
index 5978882bc9..72cc7b9559 100644
|
||||
--- a/frmts/openjpeg/openjpegdataset.cpp
|
||||
+++ b/frmts/openjpeg/openjpegdataset.cpp
|
||||
@@ -34,14 +34,8 @@
|
||||
#pragma clang diagnostic ignored "-Wdocumentation"
|
||||
#endif
|
||||
|
||||
-#if defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20200
|
||||
-#include <openjpeg-2.2/openjpeg.h>
|
||||
-#elif defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20100
|
||||
-#include <openjpeg-2.1/openjpeg.h>
|
||||
-#else
|
||||
#include <stdio.h> /* openjpeg.h needs FILE* */
|
||||
-#include <openjpeg-2.0/openjpeg.h>
|
||||
-#endif
|
||||
+#include <openjpeg.h>
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
@ -1,19 +0,0 @@
|
||||
diff --git a/frmts/openjpeg/openjpegdataset.cpp b/frmts/openjpeg/openjpegdataset.cpp
|
||||
index 1fd4f4f..417f7a8 100644
|
||||
--- a/frmts/openjpeg/openjpegdataset.cpp
|
||||
+++ b/frmts/openjpeg/openjpegdataset.cpp
|
||||
@@ -29,12 +29,8 @@
|
||||
|
||||
/* This file is to be used with openjpeg 2.0 */
|
||||
|
||||
-#if defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20100
|
||||
-#include <openjpeg-2.1/openjpeg.h>
|
||||
-#else
|
||||
-#include <stdio.h> /* openjpeg.h needs FILE* */
|
||||
-#include <openjpeg-2.0/openjpeg.h>
|
||||
-#endif
|
||||
+#include <stdio.h>
|
||||
+#include <openjpeg.h>
|
||||
#include <vector>
|
||||
|
||||
#include "gdaljp2abstractdataset.h"
|
@ -1,4 +1,4 @@
|
||||
Source: gdal
|
||||
Version: 1.11.3-5
|
||||
Version: 2.2.2
|
||||
Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data.
|
||||
Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma
|
||||
|
@ -5,25 +5,24 @@ endif()
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://download.osgeo.org/gdal/1.11.3/gdal1113.zip"
|
||||
FILENAME "gdal1113.zip"
|
||||
SHA512 42feb98a54019d3b6ac54f598f299a57e117db500c662d39faa9d5f5090f03c1b8d7680242e1abd8035738edc4fc3197ae118a0ce50733691a76a5cf377bcd46
|
||||
)
|
||||
URLS "http://download.osgeo.org/gdal/2.2.2/gdal222.zip"
|
||||
FILENAME "gdal222.zip"
|
||||
SHA512 b886238a7915c97f4acec5920dabe959d1ab15a8be0bc31ba0d05ad69d1d7d96f864faf0aa82921fa1a1b40b733744202b86f2f45ff63d6518cd18a53f3544a8
|
||||
)
|
||||
|
||||
# Extract source into archictecture specific directory, because GDALs' nmake based build currently does not
|
||||
# support out of source builds.
|
||||
set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-1.11.3)
|
||||
set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-1.11.3)
|
||||
set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-2.2.2)
|
||||
set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-2.2.2)
|
||||
|
||||
foreach(BUILD_TYPE debug release)
|
||||
vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE})
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-1.11.3
|
||||
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-2.2.2
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001-Add-support-for-MSVC1900-backported-from-GDAL2.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0002-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0003-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0004-Fix-openjpeg-include.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0003-Fix-openjpeg-include.patch
|
||||
)
|
||||
endforeach()
|
||||
|
||||
@ -211,7 +210,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
else()
|
||||
file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
||||
file(REMOVE ${EXE_FILES} ${CURRENT_PACKAGES_DIR}/lib/gdal.lib)
|
||||
file(COPY ${SOURCE_PATH_DEBUG}/gdal111.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(COPY ${SOURCE_PATH_DEBUG}/gdal202.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/lib/gdal.lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib)
|
||||
|
43
ports/imgui/CMakeLists.txt
Normal file
43
ports/imgui/CMakeLists.txt
Normal file
@ -0,0 +1,43 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(imgui CXX)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX d)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
|
||||
find_path(STB_INCLUDE_DIR stb_rect_pack.h stb_textedit.h stb_truetype.h)
|
||||
|
||||
set(IMGUI_INCLUDES_PUBLIC
|
||||
imgui.h
|
||||
imconfig.h
|
||||
)
|
||||
|
||||
set(IMGUI_INCLUDES_PRIVATE
|
||||
imgui_internal.h
|
||||
)
|
||||
|
||||
set(IMGUI_SOURCES
|
||||
imgui.cpp
|
||||
imgui_demo.cpp
|
||||
imgui_draw.cpp
|
||||
)
|
||||
|
||||
add_library(imgui
|
||||
${IMGUI_INCLUDES_PUBLIC}
|
||||
${IMGUI_INCLUDES_PRIVATE}
|
||||
${IMGUI_SOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(imgui PUBLIC ${STB_INCLUDE_DIR})
|
||||
|
||||
install(TARGETS imgui
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT IMGUI_SKIP_HEADERS)
|
||||
install(
|
||||
FILES ${IMGUI_INCLUDES_PUBLIC}
|
||||
DESTINATION include
|
||||
)
|
||||
endif()
|
4
ports/imgui/CONTROL
Normal file
4
ports/imgui/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: imgui
|
||||
Version: 1.51-1
|
||||
Build-Depends: stb
|
||||
Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.
|
33
ports/imgui/portfile.cmake
Normal file
33
ports/imgui/portfile.cmake
Normal file
@ -0,0 +1,33 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ocornut/imgui
|
||||
REF v1.51
|
||||
SHA512 33aea46d0ab8419fcd4af765c9f1a88dfb1b80ad466276b655a67f40ffedabe399db6b0d76a2ece74e551928bd6f842ae3fa42998e0b1a2206157a3852e002d6
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
file(GLOB STB_HEADERS ${SOURCE_PATH}/stb_*.h)
|
||||
if(STB_HEADERS)
|
||||
file(REMOVE ${STB_HEADERS})
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DIMGUI_SKIP_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/imgui)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/imgui/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/imgui/copyright)
|
105
ports/libidn2/CMakeLists.txt
Normal file
105
ports/libidn2/CMakeLists.txt
Normal file
@ -0,0 +1,105 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
|
||||
project(libidn2 C)
|
||||
|
||||
find_path(ICONV_INCLUDE_DIR iconv.h)
|
||||
find_library(ICONV NAMES libiconv)
|
||||
find_library(ICONV_CHARSET NAMES libcharset)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
|
||||
if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
endif()
|
||||
|
||||
add_definitions(-DIDN2_BUILDING)
|
||||
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
add_definitions(-DIDN2_STATIC)
|
||||
endif()
|
||||
|
||||
# List the source files
|
||||
set(LIB_SRC lib/bidi.c
|
||||
lib/context.c
|
||||
lib/data.c
|
||||
lib/decode.c
|
||||
lib/error.c
|
||||
lib/free.c
|
||||
lib/idna.c
|
||||
lib/lookup.c
|
||||
lib/puny_decode.c
|
||||
lib/puny_encode.c
|
||||
lib/register.c
|
||||
lib/tables.c
|
||||
lib/tr46map.c
|
||||
lib/tr46map_data.c
|
||||
lib/version.c
|
||||
)
|
||||
|
||||
# List the libunistring source files
|
||||
set(UNISTR_SRC unistring/c-ctype.c
|
||||
unistring/c-strcasecmp.c
|
||||
unistring/c-strncasecmp.c
|
||||
unistring/malloca.c
|
||||
unistring/striconveh.c
|
||||
unistring/striconveha.c
|
||||
unistring/uniconv/u8-conv-from-enc.c
|
||||
unistring/uniconv/u8-strconv-from-enc.c
|
||||
unistring/uniconv/u8-strconv-from-locale.c
|
||||
unistring/uniconv/u8-strconv-to-enc.c
|
||||
unistring/uniconv/u8-strconv-to-locale.c
|
||||
unistring/unistr/u32-cpy.c
|
||||
unistring/unistr/u32-cpy-alloc.c
|
||||
unistring/unistr/u32-mbtouc-unsafe.c
|
||||
unistring/unistr/u32-strlen.c
|
||||
unistring/unistr/u32-to-u8.c
|
||||
unistring/unistr/u32-uctomb.c
|
||||
unistring/unistr/u8-check.c
|
||||
unistring/unistr/u8-mblen.c
|
||||
unistring/unistr/u8-mbtouc.c
|
||||
unistring/unistr/u8-mbtouc-aux.c
|
||||
unistring/unistr/u8-mbtouc-unsafe.c
|
||||
unistring/unistr/u8-mbtouc-unsafe-aux.c
|
||||
unistring/unistr/u8-mbtoucr.c
|
||||
unistring/unistr/u8-prev.c
|
||||
unistring/unistr/u8-strlen.c
|
||||
unistring/unistr/u8-to-u32.c
|
||||
unistring/unistr/u8-uctomb.c
|
||||
unistring/unistr/u8-uctomb-aux.c
|
||||
unistring/uninorm/canonical-decomposition.c
|
||||
unistring/uninorm/composition.c
|
||||
unistring/uninorm/decompose-internal.c
|
||||
unistring/uninorm/decomposition-table.c
|
||||
unistring/uninorm/nfc.c
|
||||
unistring/uninorm/nfd.c
|
||||
unistring/uninorm/u32-normalize.c
|
||||
unistring/unictype/bidi_of.c
|
||||
unistring/unictype/categ_M.c
|
||||
unistring/unictype/categ_none.c
|
||||
unistring/unictype/categ_of.c
|
||||
unistring/unictype/categ_test.c
|
||||
unistring/unictype/combiningclass.c
|
||||
unistring/unictype/joiningtype_of.c
|
||||
unistring/unictype/scripts.c
|
||||
)
|
||||
|
||||
# List the gnulib source files
|
||||
set(GL_SRC gl/rawmemchr.c
|
||||
gl/strchrnul.c
|
||||
gl/strverscmp.c
|
||||
gl/msvc-inval.c
|
||||
gl/msvc-nothrow.c
|
||||
)
|
||||
|
||||
add_library(libidn2 ${LIB_SRC} ${UNISTR_SRC} ${GL_SRC})
|
||||
|
||||
target_include_directories(libidn2 PRIVATE . ./unistring ./gl ${ICONV_INCLUDE_DIR})
|
||||
target_link_libraries(libidn2 PRIVATE ${ICONV} ${ICONV_CHARSET})
|
||||
|
||||
install(TARGETS libidn2
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
|
||||
install(FILES lib/idn2.h DESTINATION include)
|
4
ports/libidn2/CONTROL
Normal file
4
ports/libidn2/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: libidn2
|
||||
Version: 2.0.4
|
||||
Build-Depends: libiconv
|
||||
Description: GNU Libidn is an implementation of the Stringprep, Punycode and IDNA 2003 specifications. Libidn's purpose is to encode and decode internationalized domain names.
|
995
ports/libidn2/config.h
Normal file
995
ports/libidn2/config.h
Normal file
@ -0,0 +1,995 @@
|
||||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to the number of bits in type 'ptrdiff_t'. */
|
||||
/* #undef BITSIZEOF_PTRDIFF_T */
|
||||
|
||||
/* Define to the number of bits in type 'sig_atomic_t'. */
|
||||
/* #undef BITSIZEOF_SIG_ATOMIC_T */
|
||||
|
||||
/* Define to the number of bits in type 'size_t'. */
|
||||
/* #undef BITSIZEOF_SIZE_T */
|
||||
|
||||
/* Define to the number of bits in type 'wchar_t'. */
|
||||
/* #undef BITSIZEOF_WCHAR_T */
|
||||
|
||||
/* Define to the number of bits in type 'wint_t'. */
|
||||
/* #undef BITSIZEOF_WINT_T */
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define to 1 if // is a file system root distinct from /. */
|
||||
/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
/* #undef ENABLE_NLS */
|
||||
|
||||
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
|
||||
whether the gnulib module fscanf shall be considered present. */
|
||||
#define GNULIB_FSCANF 1
|
||||
|
||||
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
|
||||
whether the gnulib module msvc-nothrow shall be considered present. */
|
||||
#define GNULIB_MSVC_NOTHROW 1
|
||||
|
||||
/* Define to 1 if printf and friends should be labeled with attribute
|
||||
"__gnu_printf__" instead of "__printf__" */
|
||||
#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1
|
||||
|
||||
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
|
||||
whether the gnulib module scanf shall be considered present. */
|
||||
#define GNULIB_SCANF 1
|
||||
|
||||
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
|
||||
whether the gnulib module strerror shall be considered present. */
|
||||
#define GNULIB_STRERROR 1
|
||||
|
||||
/* Define to 1 when the gnulib module getdelim should be tested. */
|
||||
/* #undef GNULIB_TEST_GETDELIM */
|
||||
|
||||
/* Define to 1 when the gnulib module getline should be tested. */
|
||||
/* #undef GNULIB_TEST_GETLINE */
|
||||
|
||||
/* Define to 1 when the gnulib module malloc-posix should be tested. */
|
||||
/* #undef GNULIB_TEST_MALLOC_POSIX */
|
||||
|
||||
/* Define to 1 when the gnulib module rawmemchr should be tested. */
|
||||
/* #undef GNULIB_TEST_RAWMEMCHR */
|
||||
|
||||
/* Define to 1 when the gnulib module strchrnul should be tested. */
|
||||
/* #undef GNULIB_TEST_STRCHRNUL */
|
||||
|
||||
/* Define to 1 when the gnulib module strerror should be tested. */
|
||||
/* #undef GNULIB_TEST_STRERROR */
|
||||
|
||||
/* Define to 1 when the gnulib module strverscmp should be tested. */
|
||||
/* #undef GNULIB_TEST_STRVERSCMP */
|
||||
|
||||
/* Define to 1 when the gnulib module uninorm/u32-normalize should be tested.
|
||||
*/
|
||||
/* #undef GNULIB_TEST_UNINORM_U32_NORMALIZE */
|
||||
|
||||
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
|
||||
whether the gnulib module unistr/u32-mbtouc-unsafe shall be considered
|
||||
present. */
|
||||
#define GNULIB_UNISTR_U32_MBTOUC_UNSAFE 1
|
||||
|
||||
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
|
||||
whether the gnulib module unistr/u32-uctomb shall be considered present. */
|
||||
#define GNULIB_UNISTR_U32_UCTOMB 1
|
||||
|
||||
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
|
||||
whether the gnulib module unistr/u8-mbtouc shall be considered present. */
|
||||
#define GNULIB_UNISTR_U8_MBTOUC 1
|
||||
|
||||
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
|
||||
whether the gnulib module unistr/u8-mbtoucr shall be considered present. */
|
||||
#define GNULIB_UNISTR_U8_MBTOUCR 1
|
||||
|
||||
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
|
||||
whether the gnulib module unistr/u8-mbtouc-unsafe shall be considered
|
||||
present. */
|
||||
#define GNULIB_UNISTR_U8_MBTOUC_UNSAFE 1
|
||||
|
||||
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
|
||||
whether the gnulib module unistr/u8-uctomb shall be considered present. */
|
||||
#define GNULIB_UNISTR_U8_UCTOMB 1
|
||||
|
||||
/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
|
||||
may be supplied by this distribution. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
|
||||
CoreFoundation framework. */
|
||||
/* #undef HAVE_CFLOCALECOPYCURRENT */
|
||||
|
||||
/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
|
||||
the CoreFoundation framework. */
|
||||
/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
|
||||
|
||||
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||
*/
|
||||
#define HAVE_DCGETTEXT 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_GETC_UNLOCKED 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `getdelim', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_GETDELIM 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `getline', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_GETLINE 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `program_invocation_name', and
|
||||
to 0 if you don't. */
|
||||
#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `program_invocation_short_name',
|
||||
and to 0 if you don't. */
|
||||
#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_STRERROR_R 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't.
|
||||
*/
|
||||
#define HAVE_DECL___ARGV 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
|
||||
/* Define to 1 if you have the `flockfile' function. */
|
||||
/* #undef HAVE_FLOCKFILE */
|
||||
|
||||
/* Define to 1 if you have the `funlockfile' function. */
|
||||
/* #undef HAVE_FUNLOCKFILE */
|
||||
|
||||
/* Define to 1 if you have the 'getdelim' function. */
|
||||
/* #undef HAVE_GETDELIM */
|
||||
|
||||
/* Define to 1 if you have the 'getexecname' function. */
|
||||
/* #undef HAVE_GETEXECNAME */
|
||||
|
||||
/* Define to 1 if you have the 'getprogname' function. */
|
||||
/* #undef HAVE_GETPROGNAME */
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#define HAVE_GETTEXT 1
|
||||
|
||||
/* Define if you have the iconv() function and it works. */
|
||||
#define HAVE_ICONV 1
|
||||
|
||||
/* Define to 1 if you have the <iconv.h> header file. */
|
||||
#define HAVE_ICONV_H 1
|
||||
|
||||
/* Define to 1 if the compiler supports one of the keywords 'inline',
|
||||
'__inline__', '__inline' and effectively inlines functions marked as such.
|
||||
*/
|
||||
#define HAVE_INLINE 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
|
||||
/* #undef HAVE_LANGINFO_CODESET */
|
||||
|
||||
/* Define if you have the libunistring library. */
|
||||
/* #undef HAVE_LIBUNISTRING */
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if the system has the type 'long long int'. */
|
||||
#define HAVE_LONG_LONG_INT 1
|
||||
|
||||
/* Define if the 'malloc' function is POSIX compliant. */
|
||||
/* #undef HAVE_MALLOC_POSIX */
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 on MSVC platforms that have the "invalid parameter handler"
|
||||
concept. */
|
||||
#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1
|
||||
|
||||
/* Define to 1 if you have the `rawmemchr' function. */
|
||||
/* #undef HAVE_RAWMEMCHR */
|
||||
|
||||
/* Define to 1 if atoll is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_ATOLL 1
|
||||
|
||||
/* Define to 1 if canonicalize_file_name is declared even after undefining
|
||||
macros. */
|
||||
/* #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME */
|
||||
|
||||
/* Define to 1 if chdir is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_CHDIR */
|
||||
|
||||
/* Define to 1 if chown is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_CHOWN */
|
||||
|
||||
/* Define to 1 if dprintf is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_DPRINTF */
|
||||
|
||||
/* Define to 1 if dup is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_DUP */
|
||||
|
||||
/* Define to 1 if dup2 is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_DUP2 */
|
||||
|
||||
/* Define to 1 if dup3 is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_DUP3 */
|
||||
|
||||
/* Define to 1 if endusershell is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_ENDUSERSHELL */
|
||||
|
||||
/* Define to 1 if environ is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_ENVIRON */
|
||||
|
||||
/* Define to 1 if euidaccess is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_EUIDACCESS */
|
||||
|
||||
/* Define to 1 if faccessat is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_FACCESSAT */
|
||||
|
||||
/* Define to 1 if fchdir is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_FCHDIR */
|
||||
|
||||
/* Define to 1 if fchownat is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_FCHOWNAT */
|
||||
|
||||
/* Define to 1 if fdatasync is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_FDATASYNC */
|
||||
|
||||
/* Define to 1 if ffsl is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_FFSL */
|
||||
|
||||
/* Define to 1 if ffsll is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_FFSLL */
|
||||
|
||||
/* Define to 1 if fpurge is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_FPURGE */
|
||||
|
||||
/* Define to 1 if fseeko is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_FSEEKO 1
|
||||
|
||||
/* Define to 1 if fsync is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_FSYNC */
|
||||
|
||||
/* Define to 1 if ftello is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_FTELLO 1
|
||||
|
||||
/* Define to 1 if ftruncate is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_FTRUNCATE 1
|
||||
|
||||
/* Define to 1 if getcwd is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETCWD */
|
||||
|
||||
/* Define to 1 if getdelim is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETDELIM */
|
||||
|
||||
/* Define to 1 if getdomainname is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETDOMAINNAME */
|
||||
|
||||
/* Define to 1 if getdtablesize is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETDTABLESIZE */
|
||||
|
||||
/* Define to 1 if getgroups is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETGROUPS */
|
||||
|
||||
/* Define to 1 if gethostname is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETHOSTNAME */
|
||||
|
||||
/* Define to 1 if getline is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETLINE */
|
||||
|
||||
/* Define to 1 if getloadavg is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETLOADAVG */
|
||||
|
||||
/* Define to 1 if getlogin is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETLOGIN */
|
||||
|
||||
/* Define to 1 if getlogin_r is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETLOGIN_R */
|
||||
|
||||
/* Define to 1 if getpagesize is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETPAGESIZE */
|
||||
|
||||
/* Define to 1 if gets is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETS */
|
||||
|
||||
/* Define to 1 if getsubopt is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETSUBOPT */
|
||||
|
||||
/* Define to 1 if getusershell is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GETUSERSHELL */
|
||||
|
||||
/* Define to 1 if grantpt is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GRANTPT */
|
||||
|
||||
/* Define to 1 if group_member is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_GROUP_MEMBER */
|
||||
|
||||
/* Define to 1 if initstate is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_INITSTATE */
|
||||
|
||||
/* Define to 1 if initstate_r is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_INITSTATE_R */
|
||||
|
||||
/* Define to 1 if isatty is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_ISATTY */
|
||||
|
||||
/* Define to 1 if lchown is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_LCHOWN */
|
||||
|
||||
/* Define to 1 if link is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_LINK */
|
||||
|
||||
/* Define to 1 if linkat is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_LINKAT */
|
||||
|
||||
/* Define to 1 if lseek is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_LSEEK */
|
||||
|
||||
/* Define to 1 if memmem is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_MEMMEM */
|
||||
|
||||
/* Define to 1 if mempcpy is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_MEMPCPY */
|
||||
|
||||
/* Define to 1 if memrchr is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_MEMRCHR */
|
||||
|
||||
/* Define to 1 if mkdtemp is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_MKDTEMP */
|
||||
|
||||
/* Define to 1 if mkostemp is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_MKOSTEMP */
|
||||
|
||||
/* Define to 1 if mkostemps is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_MKOSTEMPS */
|
||||
|
||||
/* Define to 1 if mkstemp is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_MKSTEMP */
|
||||
|
||||
/* Define to 1 if mkstemps is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_MKSTEMPS */
|
||||
|
||||
/* Define to 1 if pclose is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_PCLOSE */
|
||||
|
||||
/* Define to 1 if pipe is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_PIPE */
|
||||
|
||||
/* Define to 1 if pipe2 is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_PIPE2 */
|
||||
|
||||
/* Define to 1 if popen is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_POPEN */
|
||||
|
||||
/* Define to 1 if posix_openpt is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_POSIX_OPENPT */
|
||||
|
||||
/* Define to 1 if pread is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_PREAD */
|
||||
|
||||
/* Define to 1 if ptsname is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_PTSNAME */
|
||||
|
||||
/* Define to 1 if ptsname_r is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_PTSNAME_R */
|
||||
|
||||
/* Define to 1 if pwrite is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_PWRITE */
|
||||
|
||||
/* Define to 1 if qsort_r is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_QSORT_R */
|
||||
|
||||
/* Define to 1 if random is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_RANDOM */
|
||||
|
||||
/* Define to 1 if random_r is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_RANDOM_R */
|
||||
|
||||
/* Define to 1 if rawmemchr is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_RAWMEMCHR */
|
||||
|
||||
/* Define to 1 if readlink is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_READLINK */
|
||||
|
||||
/* Define to 1 if readlinkat is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_READLINKAT */
|
||||
|
||||
/* Define to 1 if realpath is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_REALPATH */
|
||||
|
||||
/* Define to 1 if renameat is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_RENAMEAT */
|
||||
|
||||
/* Define to 1 if rmdir is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_RMDIR */
|
||||
|
||||
/* Define to 1 if rpmatch is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_RPMATCH */
|
||||
|
||||
/* Define to 1 if secure_getenv is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_SECURE_GETENV */
|
||||
|
||||
/* Define to 1 if setenv is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_SETENV */
|
||||
|
||||
/* Define to 1 if sethostname is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_SETHOSTNAME */
|
||||
|
||||
/* Define to 1 if setstate is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_SETSTATE */
|
||||
|
||||
/* Define to 1 if setstate_r is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_SETSTATE_R */
|
||||
|
||||
/* Define to 1 if setusershell is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_SETUSERSHELL */
|
||||
|
||||
/* Define to 1 if sleep is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_SLEEP 1
|
||||
|
||||
/* Define to 1 if snprintf is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_SNPRINTF 1
|
||||
|
||||
/* Define to 1 if srandom is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_SRANDOM */
|
||||
|
||||
/* Define to 1 if srandom_r is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_SRANDOM_R */
|
||||
|
||||
/* Define to 1 if stpcpy is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_STPCPY */
|
||||
|
||||
/* Define to 1 if stpncpy is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_STPNCPY */
|
||||
|
||||
/* Define to 1 if strcasestr is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_STRCASESTR */
|
||||
|
||||
/* Define to 1 if strchrnul is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_STRCHRNUL */
|
||||
|
||||
/* Define to 1 if strdup is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_STRDUP 1
|
||||
|
||||
/* Define to 1 if strerror_r is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_STRERROR_R */
|
||||
|
||||
/* Define to 1 if strncat is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_STRNCAT 1
|
||||
|
||||
/* Define to 1 if strndup is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_STRNDUP */
|
||||
|
||||
/* Define to 1 if strnlen is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_STRNLEN 1
|
||||
|
||||
/* Define to 1 if strpbrk is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_STRPBRK */
|
||||
|
||||
/* Define to 1 if strsep is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_STRSEP */
|
||||
|
||||
/* Define to 1 if strsignal is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_STRSIGNAL */
|
||||
|
||||
/* Define to 1 if strtod is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_STRTOD 1
|
||||
|
||||
/* Define to 1 if strtok_r is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_STRTOK_R */
|
||||
|
||||
/* Define to 1 if strtoll is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_STRTOLL */
|
||||
|
||||
/* Define to 1 if strtoull is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_STRTOULL */
|
||||
|
||||
/* Define to 1 if strverscmp is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_STRVERSCMP */
|
||||
|
||||
/* Define to 1 if symlink is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_SYMLINK */
|
||||
|
||||
/* Define to 1 if symlinkat is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_SYMLINKAT */
|
||||
|
||||
/* Define to 1 if tmpfile is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_TMPFILE */
|
||||
|
||||
/* Define to 1 if truncate is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_TRUNCATE 1
|
||||
|
||||
/* Define to 1 if ttyname_r is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_TTYNAME_R */
|
||||
|
||||
/* Define to 1 if unlink is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_UNLINK 1
|
||||
|
||||
/* Define to 1 if unlinkat is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_UNLINKAT */
|
||||
|
||||
/* Define to 1 if unlockpt is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_UNLOCKPT */
|
||||
|
||||
/* Define to 1 if unsetenv is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_UNSETENV */
|
||||
|
||||
/* Define to 1 if usleep is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_USLEEP 1
|
||||
|
||||
/* Define to 1 if vdprintf is declared even after undefining macros. */
|
||||
/* #undef HAVE_RAW_DECL_VDPRINTF */
|
||||
|
||||
/* Define to 1 if vsnprintf is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL_VSNPRINTF 1
|
||||
|
||||
/* Define to 1 if _Exit is declared even after undefining macros. */
|
||||
#define HAVE_RAW_DECL__EXIT 1
|
||||
|
||||
/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
|
||||
/* #undef HAVE_SIGNED_SIG_ATOMIC_T */
|
||||
|
||||
/* Define to 1 if 'wchar_t' is a signed integer type. */
|
||||
/* #undef HAVE_SIGNED_WCHAR_T */
|
||||
|
||||
/* Define to 1 if 'wint_t' is a signed integer type. */
|
||||
/* #undef HAVE_SIGNED_WINT_T */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strchrnul' function. */
|
||||
/* #undef HAVE_STRCHRNUL */
|
||||
|
||||
/* Define to 1 if you have the `strerror_r' function. */
|
||||
/* #undef HAVE_STRERROR_R */
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
/* #undef HAVE_STRINGS_H */
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strverscmp' function. */
|
||||
/* #undef HAVE_STRVERSCMP */
|
||||
|
||||
/* Define to 1 if you have the 'symlink' function. */
|
||||
/* #undef HAVE_SYMLINK */
|
||||
|
||||
/* Define to 1 if you have the <sys/bitypes.h> header file. */
|
||||
/* #undef HAVE_SYS_BITYPES_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/inttypes.h> header file. */
|
||||
/* #undef HAVE_SYS_INTTYPES_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
/* #undef HAVE_SYS_SOCKET_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
|
||||
/* Define to 1 if the system has the type 'unsigned long long int'. */
|
||||
#define HAVE_UNSIGNED_LONG_LONG_INT 1
|
||||
|
||||
/* Define if you have a global __progname variable */
|
||||
/* #undef HAVE_VAR___PROGNAME */
|
||||
|
||||
/* Define to 1 or 0, depending whether the compiler supports simple visibility
|
||||
declarations. */
|
||||
/* #undef HAVE_VISIBILITY */
|
||||
|
||||
/* Define to 1 if you have the <wchar.h> header file. */
|
||||
#define HAVE_WCHAR_H 1
|
||||
|
||||
/* Define if you have the 'wchar_t' type. */
|
||||
#define HAVE_WCHAR_T 1
|
||||
|
||||
/* Define to 1 if you have the <winsock2.h> header file. */
|
||||
#define HAVE_WINSOCK2_H 1
|
||||
|
||||
/* Define if you have the 'wint_t' type. */
|
||||
#define HAVE_WINT_T 1
|
||||
|
||||
/* Define to 1 if O_NOATIME works. */
|
||||
#define HAVE_WORKING_O_NOATIME 0
|
||||
|
||||
/* Define to 1 if O_NOFOLLOW works. */
|
||||
#define HAVE_WORKING_O_NOFOLLOW 0
|
||||
|
||||
/* Define to 1 if the system has the type `_Bool'. */
|
||||
#define HAVE__BOOL 1
|
||||
|
||||
/* Define to 1 if you have the '_set_invalid_parameter_handler' function. */
|
||||
#define HAVE__SET_INVALID_PARAMETER_HANDLER 1
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
#define ICONV_CONST
|
||||
|
||||
/* Define to a symbolic name denoting the flavor of iconv_open()
|
||||
implementation. */
|
||||
/* #undef ICONV_FLAVOR */
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
|
||||
#define MALLOC_0_IS_NONNULL 1
|
||||
|
||||
/* Use GNU style printf and scanf. */
|
||||
#ifndef __USE_MINGW_ANSI_STDIO
|
||||
# define __USE_MINGW_ANSI_STDIO 1
|
||||
#endif
|
||||
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "libidn2"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "help-libidn@gnu.org"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "libidn2"
|
||||
|
||||
/* String identifying the packager of this software */
|
||||
/* #undef PACKAGE_PACKAGER */
|
||||
|
||||
/* Packager info for bug reports (URL/e-mail/...) */
|
||||
/* #undef PACKAGE_PACKAGER_BUG_REPORTS */
|
||||
|
||||
/* Packager-specific version information */
|
||||
/* #undef PACKAGE_PACKAGER_VERSION */
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "libidn2 2.0.4"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "libidn2"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL "https://www.gnu.org/software/libidn/#libidn2"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "2.0.4"
|
||||
|
||||
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
|
||||
'ptrdiff_t'. */
|
||||
/* #undef PTRDIFF_T_SUFFIX */
|
||||
|
||||
/* Define to 1 if strerror(0) does not return a message implying success. */
|
||||
/* #undef REPLACE_STRERROR_0 */
|
||||
|
||||
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
|
||||
'sig_atomic_t'. */
|
||||
/* #undef SIG_ATOMIC_T_SUFFIX */
|
||||
|
||||
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
|
||||
'size_t'. */
|
||||
/* #undef SIZE_T_SUFFIX */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at runtime.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if strerror_r returns char *. */
|
||||
/* #undef STRERROR_R_CHAR_P */
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# define _ALL_SOURCE 1
|
||||
#endif
|
||||
/* Enable general extensions on macOS. */
|
||||
#ifndef _DARWIN_C_SOURCE
|
||||
# define _DARWIN_C_SOURCE 1
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# define _POSIX_PTHREAD_SEMANTICS 1
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
|
||||
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
|
||||
# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
|
||||
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
# define __STDC_WANT_IEC_60559_BFP_EXT__ 1
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
|
||||
# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
|
||||
#ifndef __STDC_WANT_LIB_EXT2__
|
||||
# define __STDC_WANT_LIB_EXT2__ 1
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC 24747:2009. */
|
||||
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
|
||||
# define __STDC_WANT_MATH_SPEC_FUNCS__ 1
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# define _TANDEM_SOURCE 1
|
||||
#endif
|
||||
/* Enable X/Open extensions if necessary. HP-UX 11.11 defines
|
||||
mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
|
||||
whether compiling with -Ae or -D_HPUX_SOURCE=1. */
|
||||
#ifndef _XOPEN_SOURCE
|
||||
/* # undef _XOPEN_SOURCE */
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# define __EXTENSIONS__ 1
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "2.0.4"
|
||||
|
||||
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
|
||||
'wchar_t'. */
|
||||
/* #undef WCHAR_T_SUFFIX */
|
||||
|
||||
/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
|
||||
'wint_t'. */
|
||||
/* #undef WINT_T_SUFFIX */
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
/* #undef _MINIX */
|
||||
|
||||
/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */
|
||||
/* #undef _NETBSD_SOURCE */
|
||||
|
||||
/* The _Noreturn keyword of C11. */
|
||||
#if ! (defined _Noreturn \
|
||||
|| (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
|
||||
# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
|
||||
|| 0x5110 <= __SUNPRO_C)
|
||||
# define _Noreturn __attribute__ ((__noreturn__))
|
||||
# elif defined _MSC_VER && 1200 <= _MSC_VER
|
||||
# define _Noreturn __declspec (noreturn)
|
||||
# else
|
||||
# define _Noreturn
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
/* #undef _POSIX_1_SOURCE */
|
||||
|
||||
/* Define to 1 if you need to in order for 'stat' and other things to work. */
|
||||
/* #undef _POSIX_SOURCE */
|
||||
|
||||
/* For standard stat data types on VMS. */
|
||||
#define _USE_STD_STAT 1
|
||||
|
||||
/* Define to 1 if the system <stdint.h> predates C++11. */
|
||||
/* #undef __STDC_CONSTANT_MACROS */
|
||||
|
||||
/* Define to 1 if the system <stdint.h> predates C++11. */
|
||||
/* #undef __STDC_LIMIT_MACROS */
|
||||
|
||||
/* Please see the Gnulib manual for how to use these macros.
|
||||
|
||||
Suppress extern inline with HP-UX cc, as it appears to be broken; see
|
||||
<http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
|
||||
|
||||
Suppress extern inline with Sun C in standards-conformance mode, as it
|
||||
mishandles inline functions that call each other. E.g., for 'inline void f
|
||||
(void) { } inline void g (void) { f (); }', c99 incorrectly complains
|
||||
'reference to static identifier "f" in extern inline function'.
|
||||
This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
|
||||
|
||||
Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
|
||||
on configurations that mistakenly use 'static inline' to implement
|
||||
functions or macros in standard C headers like <ctype.h>. For example,
|
||||
if isdigit is mistakenly implemented via a static inline function,
|
||||
a program containing an extern inline function that calls isdigit
|
||||
may not work since the C standard prohibits extern inline functions
|
||||
from calling static functions. This bug is known to occur on:
|
||||
|
||||
OS X 10.8 and earlier; see:
|
||||
http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
|
||||
|
||||
DragonFly; see
|
||||
http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
|
||||
|
||||
FreeBSD; see:
|
||||
http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
|
||||
|
||||
OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
|
||||
for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
|
||||
Assume DragonFly and FreeBSD will be similar. */
|
||||
#if (((defined __APPLE__ && defined __MACH__) \
|
||||
|| defined __DragonFly__ || defined __FreeBSD__) \
|
||||
&& (defined __header_inline \
|
||||
? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
|
||||
&& ! defined __clang__) \
|
||||
: ((! defined _DONT_USE_CTYPE_INLINE_ \
|
||||
&& (defined __GNUC__ || defined __cplusplus)) \
|
||||
|| (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
|
||||
&& defined __GNUC__ && ! defined __cplusplus))))
|
||||
# define _GL_EXTERN_INLINE_STDHEADER_BUG
|
||||
#endif
|
||||
#if ((__GNUC__ \
|
||||
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
|
||||
: (199901L <= __STDC_VERSION__ \
|
||||
&& !defined __HP_cc \
|
||||
&& !defined __PGI \
|
||||
&& !(defined __SUNPRO_C && __STDC__))) \
|
||||
&& !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
|
||||
# define _GL_INLINE inline
|
||||
# define _GL_EXTERN_INLINE extern inline
|
||||
# define _GL_EXTERN_INLINE_IN_USE
|
||||
#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
|
||||
&& !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
|
||||
# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
|
||||
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
|
||||
# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
|
||||
# else
|
||||
# define _GL_INLINE extern inline
|
||||
# endif
|
||||
# define _GL_EXTERN_INLINE extern
|
||||
# define _GL_EXTERN_INLINE_IN_USE
|
||||
#else
|
||||
# define _GL_INLINE static _GL_UNUSED
|
||||
# define _GL_EXTERN_INLINE static _GL_UNUSED
|
||||
#endif
|
||||
|
||||
/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
|
||||
suppress bogus "no previous prototype for 'FOO'"
|
||||
and "no previous declaration for 'FOO'" diagnostics,
|
||||
when FOO is an inline function in the header; see
|
||||
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
|
||||
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */
|
||||
#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
|
||||
# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
|
||||
# define _GL_INLINE_HEADER_CONST_PRAGMA
|
||||
# else
|
||||
# define _GL_INLINE_HEADER_CONST_PRAGMA \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
|
||||
# endif
|
||||
# define _GL_INLINE_HEADER_BEGIN \
|
||||
_Pragma ("GCC diagnostic push") \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
|
||||
_Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
|
||||
_GL_INLINE_HEADER_CONST_PRAGMA
|
||||
# define _GL_INLINE_HEADER_END \
|
||||
_Pragma ("GCC diagnostic pop")
|
||||
#else
|
||||
# define _GL_INLINE_HEADER_BEGIN
|
||||
# define _GL_INLINE_HEADER_END
|
||||
#endif
|
||||
|
||||
/* A replacement for va_copy, if needed. */
|
||||
#define gl_va_copy(a,b) ((a) = (b))
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
||||
|
||||
/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
|
||||
the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
|
||||
earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
|
||||
__APPLE__ && __MACH__ test for Mac OS X.
|
||||
__APPLE_CC__ tests for the Apple compiler and its version.
|
||||
__STDC_VERSION__ tests for the C99 mode. */
|
||||
#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
|
||||
# define __GNUC_STDC_INLINE__ 1
|
||||
#endif
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
/* #undef mode_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
/* #undef pid_t */
|
||||
|
||||
/* Define to the equivalent of the C99 'restrict' keyword, or to
|
||||
nothing if this is not supported. Do not define if restrict is
|
||||
supported directly. */
|
||||
#define restrict __restrict
|
||||
/* Work around a bug in Sun C++: it does not support _Restrict or
|
||||
__restrict__, even though the corresponding Sun C compiler ends up with
|
||||
"#define restrict _Restrict" or "#define restrict __restrict__" in the
|
||||
previous line. Perhaps some future version of Sun C++ will work with
|
||||
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
|
||||
#if defined __SUNPRO_CC && !defined __RESTRICT
|
||||
# define _Restrict
|
||||
# define __restrict__
|
||||
#endif
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define as a signed type of the same size as size_t. */
|
||||
#define ssize_t intptr_t
|
||||
|
||||
/* Define as a marker that can be attached to declarations that might not
|
||||
be used. This helps to reduce warnings, such as from
|
||||
GCC -Wunused-parameter. */
|
||||
#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
|
||||
# define _GL_UNUSED __attribute__ ((__unused__))
|
||||
#else
|
||||
# define _GL_UNUSED
|
||||
#endif
|
||||
/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
|
||||
is a misnomer outside of parameter lists. */
|
||||
#define _UNUSED_PARAMETER_ _GL_UNUSED
|
||||
|
||||
/* gcc supports the "unused" attribute on possibly unused labels, and
|
||||
g++ has since version 4.5. Note to support C++ as well as C,
|
||||
_GL_UNUSED_LABEL should be used with a trailing ; */
|
||||
#if !defined __cplusplus || __GNUC__ > 4 \
|
||||
|| (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
|
||||
# define _GL_UNUSED_LABEL _GL_UNUSED
|
||||
#else
|
||||
# define _GL_UNUSED_LABEL
|
||||
#endif
|
||||
|
||||
/* The __pure__ attribute was added in gcc 2.96. */
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
|
||||
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
|
||||
#else
|
||||
# define _GL_ATTRIBUTE_PURE /* empty */
|
||||
#endif
|
||||
|
||||
/* The __const__ attribute was added in gcc 2.95. */
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
|
||||
# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
|
||||
#else
|
||||
# define _GL_ATTRIBUTE_CONST /* empty */
|
||||
#endif
|
||||
|
||||
|
||||
/* Define as a macro for copying va_list variables. */
|
||||
/* #undef va_copy */
|
48
ports/libidn2/portfile.cmake
Normal file
48
ports/libidn2/portfile.cmake
Normal file
@ -0,0 +1,48 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
set(IDN2_VERSION 2.0.4)
|
||||
set(IDN2_FILENAME libidn2-${IDN2_VERSION}.tar.gz)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libidn2-${IDN2_VERSION})
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://ftp.gnu.org/gnu/libidn/${IDN2_FILENAME}"
|
||||
FILENAME "${IDN2_FILENAME}"
|
||||
SHA512 1e51bd4b8f8907531576291f1c2a8865d17429b4105418b4c98754eb982cd1cbb3adbeab4ec0c1c561d2dba11d876c7c09e5dc5b315c55a2c24986d7a2a3b4d2
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH})
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/string.h DESTINATION ${SOURCE_PATH}/gl)
|
||||
|
||||
function(simple_copy_template_header FILE_PATH BASE_NAME)
|
||||
if(NOT EXISTS ${FILE_PATH}/${BASE_NAME}.h)
|
||||
if(EXISTS ${FILE_PATH}/${BASE_NAME}.in.h)
|
||||
configure_file(${FILE_PATH}/${BASE_NAME}.in.h ${FILE_PATH}/${BASE_NAME}.h)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# There seems to be no difference between source and destination files after 'configure'
|
||||
# apart from auto-generated notification at the top. So why not just do a simple copy.
|
||||
simple_copy_template_header(${SOURCE_PATH}/unistring uniconv)
|
||||
simple_copy_template_header(${SOURCE_PATH}/unistring unictype)
|
||||
simple_copy_template_header(${SOURCE_PATH}/unistring uninorm)
|
||||
simple_copy_template_header(${SOURCE_PATH}/unistring unistr)
|
||||
simple_copy_template_header(${SOURCE_PATH}/unistring unitypes)
|
||||
simple_copy_template_header(${SOURCE_PATH}/unistring alloca)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# License and man
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2 RENAME copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/doc/libidn2.pdf DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2)
|
||||
|
||||
vcpkg_copy_pdbs()
|
10
ports/libidn2/string.h
Normal file
10
ports/libidn2/string.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef _GL_STRING_H
|
||||
#define _GL_STRING_H
|
||||
|
||||
char * strchrnul (const char *s, int c_in);
|
||||
int strverscmp (const char *s1, const char *s2);
|
||||
void * rawmemchr (const void *s, int c_in);
|
||||
|
||||
#include <../ucrt/string.h>
|
||||
|
||||
#endif /* _GL_STRING_H */
|
@ -16,12 +16,12 @@ vcpkg_find_acquire_program(NASM)
|
||||
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
|
||||
set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}")
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(BUILD_STATIC OFF)
|
||||
set(NOT_BUILD_STATIC ON)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
set(ENABLE_STATIC OFF)
|
||||
set(ENABLE_SHARED ON)
|
||||
else()
|
||||
set(BUILD_STATIC ON)
|
||||
set(NOT_BUILD_STATIC OFF)
|
||||
set(ENABLE_STATIC ON)
|
||||
set(ENABLE_SHARED OFF)
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
||||
@ -32,9 +32,8 @@ vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DENABLE_STATIC=${BUILD_STATIC}
|
||||
-DENABLE_SHARED=${NOT_BUILD_STATIC}
|
||||
-DWITH_CRT_DLL=ON
|
||||
-DENABLE_STATIC=${ENABLE_STATIC}
|
||||
-DENABLE_SHARED=${ENABLE_SHARED}
|
||||
-DENABLE_EXECUTABLES=OFF
|
||||
-DINSTALL_DOCS=OFF
|
||||
${LIBJPEGTURBO_SIMD}
|
||||
|
@ -119,7 +119,7 @@ RUNTIME DESTINATION bin
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib)
|
||||
|
||||
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
install(FILES agent/address.h DESTINATION include/nice)
|
||||
install(FILES agent/agent.h DESTINATION include/nice)
|
||||
install(FILES agent/candidate.h DESTINATION include/nice)
|
||||
|
@ -66,7 +66,7 @@ if(USE_X86)
|
||||
add_definitions(-DOC_X86_ASM)
|
||||
endif()
|
||||
|
||||
if (${BUILD_SHARED_LIBS})
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_definitions(-DLIBTHEORA_EXPORTS)
|
||||
endif()
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: mpfr
|
||||
Version: 3.1.5-1
|
||||
Version: 3.1.6
|
||||
Description: The MPFR library is a C library for multiple-precision floating-point computations with correct rounding
|
||||
Build-Depends: mpir
|
||||
|
@ -1,9 +1,9 @@
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpfr-3.1.5)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpfr-3.1.6)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://www.mpfr.org/mpfr-current/mpfr-3.1.5.tar.xz"
|
||||
FILENAME "mpfr-3.1.5.tar.xz"
|
||||
SHA512 3643469b9099b31e41d6ec9158196cd1c30894030c8864ee5b1b1e91b488bccbf7c263c951b03fe9f4ae6f9d29279e157a7dfed0885467d875f107a3d964f032
|
||||
URLS "http://www.mpfr.org/mpfr-current/mpfr-3.1.6.tar.xz"
|
||||
FILENAME "mpfr-3.1.6.tar.xz"
|
||||
SHA512 746ee74d5026f267f74ab352d850ed30ff627d530aa840c71b24793e44875f8503946bd7399905dea2b2dd5744326254d7889337fe94cfe58d03c4066e9d8054
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
@ -22,7 +22,7 @@ vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS)
|
||||
set(SYSTEM_MPIEXEC_FILEPATH "${PROGRAM_FILES_PLATFORM_BITNESS}/Microsoft MPI/Bin/mpiexec.exe")
|
||||
set(MSMPI_EXPECTED_FULL_VERSION "8.1.12438.1084")
|
||||
|
||||
if(EXISTS ${SYSTEM_MPIEXEC_FILEPATH})
|
||||
if(EXISTS "${SYSTEM_MPIEXEC_FILEPATH}")
|
||||
set(MPIEXEC_VERSION_LOGNAME "mpiexec-version")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${SYSTEM_MPIEXEC_FILEPATH}
|
||||
@ -31,8 +31,8 @@ if(EXISTS ${SYSTEM_MPIEXEC_FILEPATH})
|
||||
)
|
||||
file(READ ${CURRENT_BUILDTREES_DIR}/${MPIEXEC_VERSION_LOGNAME}-out.log MPIEXEC_OUTPUT)
|
||||
|
||||
if(${MPIEXEC_OUTPUT} MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)\\]")
|
||||
if(NOT ${CMAKE_MATCH_1} STREQUAL ${MSMPI_EXPECTED_FULL_VERSION})
|
||||
if(MPIEXEC_OUTPUT MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)\\]")
|
||||
if(NOT CMAKE_MATCH_1 STREQUAL MSMPI_EXPECTED_FULL_VERSION)
|
||||
download_msmpi_redistributable_package()
|
||||
|
||||
message(FATAL_ERROR
|
||||
@ -102,7 +102,7 @@ file(INSTALL
|
||||
DESTINATION
|
||||
${CURRENT_PACKAGES_DIR}/lib
|
||||
)
|
||||
if(${TRIPLET_SYSTEM_ARCH} STREQUAL "x86")
|
||||
if(TRIPLET_SYSTEM_ARCH STREQUAL "x86")
|
||||
file(INSTALL
|
||||
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifes.lib"
|
||||
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifms.lib"
|
||||
@ -121,7 +121,7 @@ file(INSTALL
|
||||
DESTINATION
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib
|
||||
)
|
||||
if(${TRIPLET_SYSTEM_ARCH} STREQUAL "x86")
|
||||
if(TRIPLET_SYSTEM_ARCH STREQUAL "x86")
|
||||
file(INSTALL
|
||||
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifes.lib"
|
||||
"${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifms.lib"
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: openni2
|
||||
Version: 2.2.0.33-2
|
||||
Version: 2.2.0.33-4
|
||||
Build-Depends: kinectsdk1
|
||||
Description: OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera.
|
||||
|
@ -1,15 +1,3 @@
|
||||
# Common Ambient Variables:
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
||||
# PORT = current port name (zlib, etc)
|
||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
||||
#
|
||||
|
||||
# UWP Not Support
|
||||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
message(FATAL_ERROR "Error: UWP builds are currently not supported.")
|
||||
@ -28,16 +16,13 @@ endif()
|
||||
|
||||
# Download Source Code
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/OpenNI2-2.2-beta2)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/OpenNI/OpenNI2/archive/2.2-beta2.zip"
|
||||
FILENAME "OpenNI2-2.2-beta.zip"
|
||||
SHA512 9779161493114265745c9eb8b15db95a3ed2322cd75504931d0fb7b6214d7abc8a9eb2ea5f35e309bc4d2748f015eee27ada4974a2e9568b5ecb9d98099c84e9
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO OpenNI/OpenNI2
|
||||
REF 2.2-beta2
|
||||
SHA512 60a3a3043679f3069aea869e92dc5881328ce4393d4140ea8d089027321ac501ae27d283657214e2834d216d0d49bf4f29a4b3d3e43df27a6ed21f889cd0083f
|
||||
HEAD_REF master
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR)
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch.in" "${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch" @ONLY)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
@ -46,6 +31,17 @@ vcpkg_apply_patches(
|
||||
"${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch"
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
|
||||
file(COPY ${SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
|
||||
get_filename_component(SOURCE_DIR_NAME "${SOURCE_PATH}" NAME)
|
||||
|
||||
# Use fresh copy of sources for building and modification
|
||||
set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${SOURCE_DIR_NAME}")
|
||||
|
||||
file(TO_NATIVE_PATH ${CURRENT_INSTALLED_DIR} NATIVE_INSTALLED_DIR)
|
||||
configure_file("${SOURCE_PATH}/Source/Drivers/Kinect/Kinect.vcxproj" "${SOURCE_PATH}/Source/Drivers/Kinect/Kinect.vcxproj" @ONLY)
|
||||
|
||||
# Build OpenNI2
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH "${SOURCE_PATH}/OpenNI.sln"
|
||||
|
@ -7,7 +7,7 @@ index 08a49fe..7fd8620 100644
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
- <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc;</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x86-windows\include</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINDLL;%(PreprocessorDefinitions);_WINDOWS</PreprocessorDefinitions>
|
||||
<DisableLanguageExtensions>false</DisableLanguageExtensions>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
@ -16,7 +16,7 @@ index 08a49fe..7fd8620 100644
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Kinect10.lib;XnLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
- <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86;</AdditionalLibraryDirectories>
|
||||
+ <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x86-windows\debug\lib</AdditionalLibraryDirectories>
|
||||
+ <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\debug\lib</AdditionalLibraryDirectories>
|
||||
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
@ -25,7 +25,7 @@ index 08a49fe..7fd8620 100644
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
- <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc;</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x64-windows\include</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WINDLL;%(PreprocessorDefinitions);_WINDOWS</PreprocessorDefinitions>
|
||||
<DisableLanguageExtensions>false</DisableLanguageExtensions>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
@ -34,7 +34,7 @@ index 08a49fe..7fd8620 100644
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>Kinect10.lib;XnLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
- <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64;</AdditionalLibraryDirectories>
|
||||
+ <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x64-windows\debug\lib</AdditionalLibraryDirectories>
|
||||
+ <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\debug\lib</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
<IgnoreAllDefaultLibraries>
|
||||
@ -43,7 +43,7 @@ index 08a49fe..7fd8620 100644
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
- <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc;</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x86-windows\include</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -52,7 +52,7 @@ index 08a49fe..7fd8620 100644
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>Kinect10.lib;XnLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
- <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86;</AdditionalLibraryDirectories>
|
||||
+ <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x86-windows\lib</AdditionalLibraryDirectories>
|
||||
+ <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\lib</AdditionalLibraryDirectories>
|
||||
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
@ -61,7 +61,7 @@ index 08a49fe..7fd8620 100644
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
- <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc;</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x64-windows\include</AdditionalIncludeDirectories>
|
||||
+ <AdditionalIncludeDirectories>..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -70,7 +70,7 @@ index 08a49fe..7fd8620 100644
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>Kinect10.lib;XnLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
- <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64;</AdditionalLibraryDirectories>
|
||||
+ <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_VCPKG_ROOT_DIR@\packages\kinectsdk1_x64-windows\lib</AdditionalLibraryDirectories>
|
||||
+ <AdditionalLibraryDirectories>$(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\lib</AdditionalLibraryDirectories>
|
||||
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
@ -1,4 +1,4 @@
|
||||
Source: pcl
|
||||
Version: 1.8.1-1
|
||||
Build-Depends: boost, eigen3, flann, qhull, vtk, openni2, qt5
|
||||
Version: 1.8.1-2
|
||||
Build-Depends: boost, eigen3, flann, qhull, vtk, openni2, qt5, winpcap
|
||||
Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing.
|
||||
|
@ -50,7 +50,7 @@ vcpkg_configure_cmake(
|
||||
-DWITH_CUDA=OFF
|
||||
-DWITH_LIBUSB=OFF
|
||||
-DWITH_OPENNI2=ON
|
||||
-DWITH_PCAP=OFF
|
||||
-DWITH_PCAP=ON
|
||||
-DWITH_PNG=OFF
|
||||
-DWITH_QHULL=ON
|
||||
-DWITH_QT=ON
|
||||
|
@ -1,5 +1,5 @@
|
||||
option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D})
|
||||
if(NOT ${SUFFIX_D})
|
||||
if(NOT SUFFIX_D)
|
||||
find_library(GLSLANG glslang)
|
||||
find_library(OSDEPENDENT OSDependent)
|
||||
find_library(OGLCOMPILER OGLCompiler)
|
||||
|
@ -1,5 +1,5 @@
|
||||
option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D})
|
||||
if(NOT ${SUFFIX_D})
|
||||
if(NOT SUFFIX_D)
|
||||
find_library(SPIRVTOOLSOPT spirv-tools-opt)
|
||||
find_library(SPIRVTOOLS spirv-tools)
|
||||
ELSE()
|
||||
|
4
ports/spatialite-tools/CONTROL
Normal file
4
ports/spatialite-tools/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: spatialite-tools
|
||||
Version: 4.3.0
|
||||
Description: Contains spatialite.exe and other command line tools to work with SpatiaLite databases (import, export, SQL queries)
|
||||
Build-Depends: sqlite3, libspatialite, geos, readosm, proj4, zlib, libiconv, expat
|
128
ports/spatialite-tools/fix-makefiles.patch
Normal file
128
ports/spatialite-tools/fix-makefiles.patch
Normal file
@ -0,0 +1,128 @@
|
||||
diff --git a/makefile.vc b/makefile.vc
|
||||
index 33c85d2..c811e7d 100644
|
||||
--- a/makefile.vc
|
||||
+++ b/makefile.vc
|
||||
@@ -15,7 +15,7 @@ SPATIALITE_OSM_RAW_EXE = spatialite_osm_raw.exe
|
||||
SPATIALITE_OSM_FILTER_EXE = spatialite_osm_filter.exe
|
||||
SPATIALITE_GML_EXE = spatialite_gml.exe
|
||||
|
||||
-CFLAGS = /nologo -IC:\OSGeo4W\include $(OPTFLAGS)
|
||||
+CFLAGS = /nologo -I$(INSTALLED_ROOT)\include $(OPTFLAGS)
|
||||
|
||||
default: all
|
||||
|
||||
@@ -26,89 +26,58 @@ all: $(SPATIALITE_EXE) $(SHP_DOCTOR_EXE) $(SPATIALITE_TOOL_EXE) \
|
||||
$(SPATIALITE_OSM_FILTER_EXE)
|
||||
|
||||
$(SPATIALITE_EXE): shell.obj
|
||||
- cl shell.obj C:\OSGeo4W\lib\proj_i.lib \
|
||||
- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \
|
||||
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib \
|
||||
- /Fe$(SPATIALITE_EXE)
|
||||
+ cl shell.obj $(LIBS_ALL) /Fe$(SPATIALITE_EXE)
|
||||
if exist $(SPATIALITE_EXE).manifest mt -manifest \
|
||||
$(SPATIALITE_EXE).manifest -outputresource:$(SPATIALITE_EXE);1
|
||||
|
||||
$(EXIF_LOADER_EXE): exif_loader.obj
|
||||
- cl exif_loader.obj C:\OSGeo4W\lib\proj_i.lib \
|
||||
- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \
|
||||
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
|
||||
+ cl exif_loader.obj $(LIBS_ALL)
|
||||
if exist $(EXIF_LOADER_EXE).manifest mt -manifest \
|
||||
$(EXIF_LOADER_EXE).manifest -outputresource:$(EXIF_LOADER_EXE);1
|
||||
|
||||
$(SHP_DOCTOR_EXE): shp_doctor.obj
|
||||
- cl shp_doctor.obj C:\OSGeo4W\lib\proj_i.lib \
|
||||
- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \
|
||||
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
|
||||
+ cl shp_doctor.obj $(LIBS_ALL)
|
||||
if exist $(SHP_DOCTOR_EXE).manifest mt -manifest \
|
||||
$(SHP_DOCTOR_EXE).manifest -outputresource:$(SHP_DOCTOR_EXE);1
|
||||
|
||||
$(SPATIALITE_NETWORK_EXE): spatialite_network.obj
|
||||
- cl spatialite_network.obj C:\OSGeo4W\lib\proj_i.lib \
|
||||
- C:\OSGeo4W\lib\iconv.lib \
|
||||
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
|
||||
+ cl spatialite_network.obj $(LIBS_ALL)
|
||||
if exist $(SPATIALITE_NETWORK_EXE).manifest mt -manifest \
|
||||
$(SPATIALITE_TOOL_EXE).manifest \
|
||||
-outputresource:$(SPATIALITE_TOOL_EXE);1
|
||||
|
||||
$(SPATIALITE_TOOL_EXE): spatialite_tool.obj
|
||||
- cl spatialite_tool.obj C:\OSGeo4W\lib\proj_i.lib \
|
||||
- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \
|
||||
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
|
||||
+ cl spatialite_tool.obj $(LIBS_ALL)
|
||||
if exist $(SPATIALITE_TOOL_EXE).manifest mt -manifest \
|
||||
$(SPATIALITE_TOOL_EXE).manifest \
|
||||
-outputresource:$(SPATIALITE_TOOL_EXE);1
|
||||
|
||||
$(SPATIALITE_OSM_NET_EXE): spatialite_osm_net.obj
|
||||
- cl spatialite_osm_net.obj C:\OSGeo4W\lib\proj_i.lib \
|
||||
- C:\OSGeo4W\lib\iconv.lib \
|
||||
- C:\OSGeo4W\lib\readosm_i.lib \
|
||||
- C:\OSGeo4W\lib\libexpat.lib \
|
||||
- C:\OSGeo4W\lib\zlib.lib \
|
||||
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
|
||||
+ cl spatialite_osm_net.obj $(LIBS_ALL)
|
||||
if exist $(SPATIALITE_OSM_EXE).manifest mt -manifest \
|
||||
$(SPATIALITE_OSM_EXE).manifest \
|
||||
-outputresource:$(SPATIALITE_OSM_NET_EXE);1
|
||||
|
||||
$(SPATIALITE_OSM_MAP_EXE): spatialite_osm_map.obj
|
||||
- cl spatialite_osm_map.obj C:\OSGeo4W\lib\proj_i.lib \
|
||||
- C:\OSGeo4W\lib\iconv.lib \
|
||||
- C:\OSGeo4W\lib\readosm_i.lib \
|
||||
- C:\OSGeo4W\lib\libexpat.lib \
|
||||
- C:\OSGeo4W\lib\zlib.lib \
|
||||
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
|
||||
+ cl spatialite_osm_map.obj $(LIBS_ALL)
|
||||
if exist $(SPATIALITE_OSM_MAP_EXE).manifest mt -manifest \
|
||||
$(SPATIALITE_OSM_MAP_EXE).manifest \
|
||||
-outputresource:$(SPATIALITE_OSM_MAP_EXE);1
|
||||
|
||||
$(SPATIALITE_GML_EXE): spatialite_gml.obj
|
||||
- cl spatialite_gml.obj C:\OSGeo4W\lib\proj_i.lib \
|
||||
- C:\OSGeo4W\lib\iconv.lib \
|
||||
- C:\OSGeo4W\lib\libexpat.lib \
|
||||
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
|
||||
+ cl spatialite_gml.obj $(LIBS_ALL)
|
||||
if exist $(SPATIALITE_GML_EXE).manifest mt -manifest \
|
||||
$(SPATIALITE_GML_EXE).manifest \
|
||||
-outputresource:$(SPATIALITE_GML_EXE);1
|
||||
|
||||
$(SPATIALITE_OSM_RAW_EXE): spatialite_osm_raw.obj
|
||||
- cl spatialite_osm_raw.obj C:\OSGeo4W\lib\proj_i.lib \
|
||||
- C:\OSGeo4W\lib\iconv.lib \
|
||||
- C:\OSGeo4W\lib\readosm_i.lib \
|
||||
- C:\OSGeo4W\lib\libexpat.lib \
|
||||
- C:\OSGeo4W\lib\zlib.lib \
|
||||
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
|
||||
+ cl spatialite_osm_raw.obj $(LIBS_ALL)
|
||||
if exist $(SPATIALITE_OSM_RAW_EXE).manifest mt -manifest \
|
||||
$(SPATIALITE_OSM_RAW_EXE).manifest \
|
||||
-outputresource:$(SPATIALITE_OSM_RAW_EXE);1
|
||||
|
||||
$(SPATIALITE_OSM_FILTER_EXE): spatialite_osm_filter.obj
|
||||
- cl spatialite_osm_filter.obj C:\OSGeo4W\lib\proj_i.lib \
|
||||
- C:\OSGeo4W\lib\iconv.lib \
|
||||
- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib
|
||||
+ cl spatialite_osm_filter.obj $(LIBS_ALL)
|
||||
if exist $(SPATIALITE_OSM_FILTER_EXE).manifest mt -manifest \
|
||||
$(SPATIALITE_OSM_FILTER_EXE).manifest \
|
||||
-outputresource:$(SPATIALITE_OSM_FILTER_EXE);1
|
||||
diff --git a/nmake.opt b/nmake.opt
|
||||
index 4f4a953..d9efecf 100644
|
||||
--- a/nmake.opt
|
||||
+++ b/nmake.opt
|
||||
@@ -1,8 +1,8 @@
|
||||
# Directory tree where SpatiaLite will be installed.
|
||||
-INSTDIR=C:\OSGeo4W
|
||||
+INSTDIR=$(INST_DIR)
|
||||
|
||||
# Uncomment the first for an optimized build, or the second for debug.
|
||||
-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \
|
||||
+OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \
|
||||
/D_LARGE_FILE=1 /D_FILE_OFFSET_BITS=64 /D_LARGEFILE_SOURCE=1
|
||||
#OPTFLAGS= /nologo /Zi /MD /Fdspatialite.pdb
|
||||
|
118
ports/spatialite-tools/portfile.cmake
Normal file
118
ports/spatialite-tools/portfile.cmake
Normal file
@ -0,0 +1,118 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
option(BUILD_DEBUG_TOOLS "Build debug version of tools" OFF)
|
||||
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/spatialite-tools-4.3.0)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://www.gaia-gis.it/gaia-sins/spatialite-tools-4.3.0.tar.gz"
|
||||
FILENAME "spatialite-tools-4.3.0.tar.gz"
|
||||
SHA512 e1de27c1c65ff2ff0b08583113517bea74edf33fff59ad6e9c77492ea3ae87d9c0f17d7670ee6602b32eea73ad3678bb5410ef2c6fac6e213bf2e341a907db88
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
find_program(NMAKE nmake)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch
|
||||
)
|
||||
|
||||
set(LDIR "\"${CURRENT_INSTALLED_DIR}\"")
|
||||
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
||||
set(CL_FLAGS_DBG "/MDd /Zi")
|
||||
set(CL_FLAGS_REL "/MD /Ox")
|
||||
set(GEOS_LIBS_REL "${LDIR}/lib/geos_c.lib")
|
||||
set(GEOS_LIBS_DBG "${LDIR}/debug/lib/geos_c.lib")
|
||||
set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib")
|
||||
set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib")
|
||||
set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib")
|
||||
set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib")
|
||||
set(ICONV_LIBS_REL "${LDIR}/lib/libiconv.lib")
|
||||
set(ICONV_LIBS_DBG "${LDIR}/debug/lib/libiconv.lib")
|
||||
else()
|
||||
set(CL_FLAGS_DBG "/MTd /Zi")
|
||||
set(CL_FLAGS_REL "/MT /Ox")
|
||||
set(GEOS_LIBS_REL "${LDIR}/lib/libgeos_c.lib ${LDIR}/lib/libgeos.lib")
|
||||
set(GEOS_LIBS_DBG "${LDIR}/debug/lib/libgeos_c.lib ${LDIR}/debug/lib/libgeos.lib")
|
||||
set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib ${LDIR}/lib/lzma.lib ws2_32.lib")
|
||||
set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib ${LDIR}/debug/lib/lzma.lib ws2_32.lib")
|
||||
set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib ${LDIR}/lib/freexl.lib")
|
||||
set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib ${LDIR}/debug/lib/freexl.lib")
|
||||
set(ICONV_LIBS_REL "${LDIR}/lib/libiconv.lib ${LDIR}/lib/libcharset.lib")
|
||||
set(ICONV_LIBS_DBG "${LDIR}/debug/lib/libiconv.lib ${LDIR}/debug/lib/libcharset.lib ")
|
||||
endif()
|
||||
|
||||
set(LIBS_ALL_DBG
|
||||
"${ICONV_LIBS_DBG} \
|
||||
${LDIR}/debug/lib/sqlite3.lib \
|
||||
${SPATIALITE_LIBS_DBG} \
|
||||
${LIBXML2_LIBS_DBG} \
|
||||
${GEOS_LIBS_DBG} \
|
||||
${LDIR}/debug/lib/readosm.lib \
|
||||
${LDIR}/debug/lib/expat.lib \
|
||||
${LDIR}/debug/lib/zlibd.lib \
|
||||
${LDIR}/debug/lib/projd.lib"
|
||||
)
|
||||
set(LIBS_ALL_REL
|
||||
"${ICONV_LIBS_REL} \
|
||||
${LDIR}/lib/sqlite3.lib \
|
||||
${SPATIALITE_LIBS_REL} \
|
||||
${LIBXML2_LIBS_REL} \
|
||||
${GEOS_LIBS_REL} \
|
||||
${LDIR}/lib/readosm.lib \
|
||||
${LDIR}/lib/expat.lib \
|
||||
${LDIR}/lib/zlib.lib \
|
||||
${LDIR}/lib/proj.lib"
|
||||
)
|
||||
|
||||
if(BUILD_DEBUG_TOOLS)
|
||||
################
|
||||
# Debug build
|
||||
################
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-dgb")
|
||||
|
||||
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} -f makefile.vc clean install
|
||||
"INST_DIR=\"${INST_DIR_REL}\"" "INSTALLED_ROOT=${LDIR}" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}"
|
||||
WORKING_DIRECTORY ${SOURCE_PATH}
|
||||
LOGNAME nmake-build-${TARGET_TRIPLET}-debug
|
||||
)
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
|
||||
set(EXE_FOLDER ${CURRENT_PACKAGES_DIR}/bin/)
|
||||
else()
|
||||
################
|
||||
# Release build
|
||||
################
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-rel")
|
||||
|
||||
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} -f makefile.vc clean install
|
||||
"INST_DIR=\"${INST_DIR_REL}\"" "INSTALLED_ROOT=${LDIR}" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}"
|
||||
WORKING_DIRECTORY ${SOURCE_PATH}
|
||||
LOGNAME nmake-build-${TARGET_TRIPLET}-release
|
||||
)
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-rel done")
|
||||
set(EXE_FOLDER ${CURRENT_PACKAGES_DIR}/bin/)
|
||||
endif()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/)
|
||||
file(GLOB EXES "${EXE_FOLDER}/*.exe")
|
||||
file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
||||
file(REMOVE ${EXES})
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
if(NOT BUILD_DEBUG_TOOLS AND VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
||||
endif()
|
||||
|
||||
message(STATUS "Packaging ${TARGET_TRIPLET} done")
|
||||
|
||||
# Allow empty include directory
|
||||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|
3
ports/tiny-dnn/CONTROL
Normal file
3
ports/tiny-dnn/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: tiny-dnn
|
||||
Version: 2017-10-09-dd906fed8c8aff8dc837657c42f9d55f8b793b0e
|
||||
Description: A C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource.
|
15
ports/tiny-dnn/portfile.cmake
Normal file
15
ports/tiny-dnn/portfile.cmake
Normal file
@ -0,0 +1,15 @@
|
||||
#header-only library
|
||||
include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO tiny-dnn/tiny-dnn
|
||||
REF dd906fed8c8aff8dc837657c42f9d55f8b793b0e
|
||||
SHA512 d853db7f49af1bece55337b93631c41191f3abd8287969f230330662fecc612e4e53ab789535fc6f9770ae0c8623d8e020e6036c2c804783d08f176a08c05d1b
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/tiny_dnn DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/tiny-dnn-dd906fed8c8aff8dc837657c42f9d55f8b793b0e/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiny-dnn)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/tiny-dnn/LICENSE ${CURRENT_PACKAGES_DIR}/share/tiny-dnn/copyright)
|
@ -1,4 +1,4 @@
|
||||
Source: vtk
|
||||
Version: 8.0.0-2
|
||||
Version: 8.0.0-3
|
||||
Description: Software system for 3D computer graphics, image processing, and visualization
|
||||
Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj4, lz4, libtheora
|
||||
Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj4, lz4, libtheora, libharu
|
||||
|
127
ports/vtk/FindGDAL.cmake
Normal file
127
ports/vtk/FindGDAL.cmake
Normal file
@ -0,0 +1,127 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindGDAL
|
||||
# --------
|
||||
#
|
||||
#
|
||||
#
|
||||
# Locate gdal
|
||||
#
|
||||
# This module accepts the following environment variables:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# GDAL_DIR or GDAL_ROOT - Specify the location of GDAL
|
||||
#
|
||||
#
|
||||
#
|
||||
# This module defines the following CMake variables:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# GDAL_FOUND - True if libgdal is found
|
||||
# GDAL_LIBRARY - A variable pointing to the GDAL library
|
||||
# GDAL_INCLUDE_DIR - Where to find the headers
|
||||
|
||||
#
|
||||
# $GDALDIR is an environment variable that would
|
||||
# correspond to the ./configure --prefix=$GDAL_DIR
|
||||
# used in building gdal.
|
||||
#
|
||||
# Created by Eric Wing. I'm not a gdal user, but OpenSceneGraph uses it
|
||||
# for osgTerrain so I whipped this module together for completeness.
|
||||
# I actually don't know the conventions or where files are typically
|
||||
# placed in distros.
|
||||
# Any real gdal users are encouraged to correct this (but please don't
|
||||
# break the OS X framework stuff when doing so which is what usually seems
|
||||
# to happen).
|
||||
|
||||
# This makes the presumption that you are include gdal.h like
|
||||
#
|
||||
#include "gdal.h"
|
||||
|
||||
find_path(GDAL_INCLUDE_DIR gdal.h
|
||||
HINTS
|
||||
ENV GDAL_DIR
|
||||
ENV GDAL_ROOT
|
||||
PATH_SUFFIXES
|
||||
include/gdal
|
||||
include/GDAL
|
||||
include
|
||||
PATHS
|
||||
~/Library/Frameworks/gdal.framework/Headers
|
||||
/Library/Frameworks/gdal.framework/Headers
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
# Use gdal-config to obtain the library version (this should hopefully
|
||||
# allow us to -lgdal1.x.y where x.y are correct version)
|
||||
# For some reason, libgdal development packages do not contain
|
||||
# libgdal.so...
|
||||
find_program(GDAL_CONFIG gdal-config
|
||||
HINTS
|
||||
ENV GDAL_DIR
|
||||
ENV GDAL_ROOT
|
||||
PATH_SUFFIXES bin
|
||||
PATHS
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
)
|
||||
|
||||
if(GDAL_CONFIG)
|
||||
exec_program(${GDAL_CONFIG} ARGS --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS)
|
||||
if(GDAL_CONFIG_LIBS)
|
||||
string(REGEX MATCHALL "-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_LIBS})
|
||||
string(REPLACE "-l" "" _gdal_lib "${_gdal_dashl}")
|
||||
string(REGEX MATCHALL "-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_LIBS})
|
||||
string(REPLACE "-L" "" _gdal_libpath "${_gdal_dashL}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_library(GDAL_LIBRARY_RELEASE
|
||||
NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
|
||||
HINTS
|
||||
ENV GDAL_DIR
|
||||
ENV GDAL_ROOT
|
||||
${_gdal_libpath}
|
||||
PATH_SUFFIXES lib
|
||||
PATHS
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
/usr/freeware
|
||||
)
|
||||
|
||||
find_library(GDAL_LIBRARY_DEBUG
|
||||
NAMES ${_gdal_lib} gdald gdald_i gdald1.5.0 gdald1.4.0 gdald1.3.2 GDALD
|
||||
HINTS
|
||||
ENV GDAL_DIR
|
||||
ENV GDAL_ROOT
|
||||
${_gdal_libpath}
|
||||
PATH_SUFFIXES lib
|
||||
PATHS
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
/usr/freeware
|
||||
)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(GDAL)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL DEFAULT_MSG GDAL_LIBRARY GDAL_INCLUDE_DIR)
|
||||
|
||||
set(GDAL_LIBRARIES ${GDAL_LIBRARY})
|
||||
set(GDAL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR})
|
18
ports/vtk/fix-find-libharu.patch
Normal file
18
ports/vtk/fix-find-libharu.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- a/CMake/FindLibHaru.cmake Mon Jun 26 15:29:04 2017
|
||||
+++ b/CMake/FindLibHaru.cmake Wed Aug 16 09:30:12 2017
|
||||
@@ -19,9 +19,13 @@
|
||||
|
||||
find_path(LIBHARU_INCLUDE_DIR hpdf.h)
|
||||
|
||||
-find_library(LIBHARU_LIBRARY NAMES hpdf)
|
||||
+find_library(LIBHARU_LIBRARY_RELEASE NAMES hpdf libhpdf)
|
||||
+find_library(LIBHARU_LIBRARY_DEBUG NAMES hpdfd libhpdfd)
|
||||
|
||||
-# handle the QUIETLY and REQUIRED arguments and set FONTCONFIG_FOUND to TRUE if
|
||||
+include(SelectLibraryConfigurations)
|
||||
+select_library_configurations(LIBHARU)
|
||||
+
|
||||
+# handle the QUIETLY and REQUIRED arguments and set LIBHARU_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibHaru DEFAULT_MSG
|
10
ports/vtk/fix-find-mysql.patch
Normal file
10
ports/vtk/fix-find-mysql.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/CMake/FindMySQL.cmake Mon Jun 26 15:29:04 2017
|
||||
+++ b/CMake/FindMySQL.cmake Wed Aug 16 11:21:58 2017
|
||||
@@ -28,6 +28,7 @@
|
||||
"C:/MySQL/include"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include"
|
||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/include"
|
||||
+ PATH_SUFFIXES mysql
|
||||
DOC "Specify the directory containing mysql.h."
|
||||
)
|
||||
|
11
ports/vtk/fix-find-odbc.patch
Normal file
11
ports/vtk/fix-find-odbc.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/CMake/FindODBC.cmake Mon Jun 26 15:29:04 2017
|
||||
+++ b/CMake/FindODBC.cmake Wed Aug 16 12:58:11 2017
|
||||
@@ -30,7 +30,7 @@
|
||||
)
|
||||
|
||||
FIND_LIBRARY( ODBC_LIBRARY
|
||||
- NAMES odbc iodbc unixodbc
|
||||
+ NAMES odbc iodbc unixodbc odbc32
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/lib/odbc
|
@ -1,13 +1,26 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
set(VTK_SHORT_VERSION "8.0")
|
||||
set(VTK_LONG_VERSION "${VTK_SHORT_VERSION}.0")
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO "Kitware/VTK"
|
||||
REF "v8.0.0"
|
||||
REF "v${VTK_LONG_VERSION}"
|
||||
SHA512 1a328f24df0b1c40c623ae80c9d49f8b27570144b10af02aeed41b90b50b8d4e0dd83d1341961f6818cde36e2cd793c578ebc95a46950cebfc518f486f249791
|
||||
HEAD_REF "master"
|
||||
)
|
||||
|
||||
# =============================================================================
|
||||
# Options: These should be set by feature-packages when they become available
|
||||
set(VTK_WITH_QT ON ) # IMPORTANT: if ON make sure `qt5` is listed as dependency in the CONTROL file
|
||||
set(VTK_WITH_MPI ON ) # IMPORTANT: if ON make sure `mpi` is listed as dependency in the CONTROL file
|
||||
set(VTK_WITH_PYTHON OFF) # IMPORTANT: if ON make sure `python3` is listed as dependency in the CONTROL file
|
||||
set(VTK_WITH_ALL_MODULES OFF) # IMPORTANT: if ON make sure `qt5`, `mpi`, `python3`, `ffmpeg`, `gdal`, `fontconfig`,
|
||||
# `libmysql` and `atlmfc` are listed as dependency in the CONTROL file
|
||||
|
||||
# =============================================================================
|
||||
# Apply patches to the source code
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
@ -28,33 +41,78 @@ vcpkg_apply_patches(
|
||||
${CMAKE_CURRENT_LIST_DIR}/disable-workaround-findhdf5.patch
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/fix-find-libproj4.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/fix-find-libharu.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/fix-find-mysql.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/fix-find-odbc.patch
|
||||
)
|
||||
|
||||
# Remove the FindGLEW.cmake that is distributed with VTK, since it does not
|
||||
# detect the debug libraries correctly.
|
||||
# The default file distributed with CMake should be superior by all means.
|
||||
# Remove the FindGLEW.cmake and FindPythonLibs.cmake that are distributed with VTK,
|
||||
# since they do not detect the debug libraries correctly.
|
||||
# The default files distributed with CMake (>= 3.9) should be superior by all means.
|
||||
# For GDAL, the one distributed with CMake does not detect the debug libraries correctly,
|
||||
# so we provide an own one.
|
||||
file(REMOVE ${SOURCE_PATH}/CMake/FindGLEW.cmake)
|
||||
file(REMOVE ${SOURCE_PATH}/CMake/FindPythonLibs.cmake)
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindGDAL.cmake DESTINATION ${SOURCE_PATH}/CMake)
|
||||
|
||||
# =============================================================================
|
||||
# Collect CMake options for optional components
|
||||
if(VTK_WITH_QT)
|
||||
list(APPEND ADDITIONAL_OPTIONS
|
||||
-DVTK_Group_Qt=ON
|
||||
-DVTK_QT_VERSION=5
|
||||
-DVTK_BUILD_QT_DESIGNER_PLUGIN=OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
if(VTK_WITH_MPI)
|
||||
list(APPEND ADDITIONAL_OPTIONS
|
||||
-DVTK_Group_MPI=ON
|
||||
)
|
||||
endif()
|
||||
|
||||
if(VTK_WITH_PYTHON)
|
||||
list(APPEND ADDITIONAL_OPTIONS
|
||||
-DVTK_WRAP_PYTHON=ON
|
||||
-DVTK_PYTHON_VERSION=3
|
||||
)
|
||||
endif()
|
||||
|
||||
if(VTK_WITH_ALL_MODULES)
|
||||
list(APPEND ADDITIONAL_OPTIONS
|
||||
-DVTK_BUILD_ALL_MODULES=ON
|
||||
-DVTK_USE_TK=OFF # TCL/TK currently not included in vcpkg
|
||||
# -DVTK_USE_SYSTEM_AUTOBAHN=ON
|
||||
# -DVTK_USE_SYSTEM_SIX=ON
|
||||
# -DVTK_USE_SYSTEM_MPI4PY=ON
|
||||
# -DVTK_USE_SYSTEM_CONSTANTLY=ON
|
||||
# -DVTK_USE_SYSTEM_INCREMENTAL=ON
|
||||
# -DVTK_USE_SYSTEM_TWISTED=ON
|
||||
# -DVTK_USE_SYSTEM_XDMF2=ON
|
||||
# -DVTK_USE_SYSTEM_XDMF3=ON
|
||||
# -DVTK_USE_SYSTEM_ZFP=ON
|
||||
# -DVTK_USE_SYSTEM_ZOPE=ON
|
||||
)
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
list(APPEND ADDITIONAL_OPTIONS "-DVTK_EXTERNAL_HDF5_IS_SHARED=ON")
|
||||
endif()
|
||||
|
||||
# =============================================================================
|
||||
# Configure & Install
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DVTK_Group_Imaging=ON
|
||||
-DVTK_Group_Views=ON
|
||||
-DBUILD_TESTING=OFF
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DVTK_Group_MPI=ON
|
||||
-DVTK_Group_Qt=ON
|
||||
-DVTK_QT_VERSION=5
|
||||
-DVTK_BUILD_QT_DESIGNER_PLUGIN=OFF
|
||||
# -DVTK_WRAP_PYTHON=ON
|
||||
# -DVTK_PYTHON_VERSION=3
|
||||
-DVTK_USE_SYSTEM_EXPAT=ON
|
||||
-DVTK_USE_SYSTEM_FREETYPE=ON
|
||||
# -DVTK_USE_SYSTEM_GL2PS=ON
|
||||
# -DVTK_USE_SYSTEM_LIBHARU=ON
|
||||
-DVTK_USE_SYSTEM_LIBHARU=ON
|
||||
-DVTK_USE_SYSTEM_JPEG=ON
|
||||
-DVTK_USE_SYSTEM_GLEW=ON
|
||||
-DVTK_USE_SYSTEM_HDF5=ON
|
||||
@ -85,9 +143,29 @@ vcpkg_configure_cmake(
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# =============================================================================
|
||||
# Fixup target files
|
||||
vcpkg_fixup_cmake_targets()
|
||||
|
||||
# For VTK vcpkg_fixup_cmake_targets is not enough:
|
||||
# For some reason the references to the XDMF libraries in the target files do not end up
|
||||
# correctly, so we fix them here.
|
||||
if(VTK_WITH_ALL_MODULES)
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake VTK_TARGETS_RELEASE_CONTENT)
|
||||
string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
|
||||
string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
|
||||
string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
|
||||
string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake "${VTK_TARGETS_RELEASE_CONTENT}")
|
||||
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake VTK_TARGETS_DEBUG_CONTENT)
|
||||
string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
|
||||
string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
|
||||
string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
|
||||
string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake "${VTK_TARGETS_DEBUG_CONTENT}")
|
||||
endif()
|
||||
|
||||
# For VTK `vcpkg_fixup_cmake_targets` is not enough:
|
||||
# Files for system third party dependencies are written to modules that
|
||||
# are located in the paths `share/vtk/Modules` and `debug/share/vtk/Modules`.
|
||||
# In the release folder, only the release libraries are referenced (e.g. "C:/vcpkg/installed/x64-windows/lib/zlib.lib").
|
||||
@ -158,8 +236,22 @@ set(SYSTEM_THIRD_PARTY_MODULES
|
||||
vtkpng
|
||||
vtktiff
|
||||
vtkzlib
|
||||
# vtkgl2ps
|
||||
vtklibharu
|
||||
)
|
||||
|
||||
if(VTK_WITH_PYTHON OR VTK_WITH_ALL_MODULES)
|
||||
list(APPEND SYSTEM_THIRD_PARTY_MODULES
|
||||
vtkPython
|
||||
)
|
||||
endif()
|
||||
|
||||
if(VTK_WITH_ALL_MODULES)
|
||||
list(APPEND SYSTEM_THIRD_PARTY_MODULES
|
||||
AutobahnPython
|
||||
)
|
||||
endif()
|
||||
|
||||
foreach(MODULE IN LISTS SYSTEM_THIRD_PARTY_MODULES)
|
||||
_vtk_combine_third_party_libraries("${MODULE}")
|
||||
endforeach()
|
||||
@ -172,16 +264,45 @@ file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" VTK_TARGETS_CONTE
|
||||
string(REGEX REPLACE "${CURRENT_INSTALLED_DIR}/lib/[^\\.]*\\.lib" "" VTK_TARGETS_CONTENT "${VTK_TARGETS_CONTENT}")
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets.cmake" "${VTK_TARGETS_CONTENT}")
|
||||
|
||||
# Move executable to tools directory
|
||||
# =============================================================================
|
||||
# Move executable to tools directory and clean-up other directories
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/vtk)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkEncodeString-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/vtkEncodeString-8.0.exe)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vtkHashSource-8.0.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/vtkHashSource-8.0.exe)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkEncodeString-8.0.exe)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vtkHashSource-8.0.exe)
|
||||
else()
|
||||
# On static builds there should be no bin directory at all
|
||||
function(_vtk_move_tool TOOL_NAME)
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/${TOOL_NAME}.exe)
|
||||
endif()
|
||||
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}.exe)
|
||||
endfunction()
|
||||
|
||||
set(VTK_TOOLS
|
||||
vtkEncodeString-${VTK_SHORT_VERSION}
|
||||
vtkHashSource-${VTK_SHORT_VERSION}
|
||||
vtkWrapTclInit-${VTK_SHORT_VERSION}
|
||||
vtkWrapTcl-${VTK_SHORT_VERSION}
|
||||
vtkWrapPythonInit-${VTK_SHORT_VERSION}
|
||||
vtkWrapPython-${VTK_SHORT_VERSION}
|
||||
vtkWrapJava-${VTK_SHORT_VERSION}
|
||||
vtkWrapHierarchy-${VTK_SHORT_VERSION}
|
||||
vtkParseJava-${VTK_SHORT_VERSION}
|
||||
vtkParseOGLExt-${VTK_SHORT_VERSION}
|
||||
vtkpython
|
||||
pvtkpython
|
||||
)
|
||||
|
||||
foreach(TOOL_NAME IN LISTS VTK_TOOLS)
|
||||
_vtk_move_tool("${TOOL_NAME}")
|
||||
endforeach()
|
||||
|
||||
# =============================================================================
|
||||
# Remove other files and directories that are not valid for vcpkg
|
||||
if(VTK_WITH_ALL_MODULES)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/XdmfConfig.cmake)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/XdmfConfig.cmake)
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
@ -189,6 +310,7 @@ endif()
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
# =============================================================================
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/vtk/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/vtk/copyright)
|
||||
|
@ -55,7 +55,7 @@ set(SRCS zzip/dir.c
|
||||
|
||||
add_library(zziplib ${SRCS} ${HEADERS})
|
||||
|
||||
if(${BUILD_SHARED_LIBS})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(zziplib PRIVATE -DZZIPLIB_EXPORTS)
|
||||
endif()
|
||||
|
||||
|
@ -1,156 +1,175 @@
|
||||
# Mark variables as used so cmake doesn't complain about them
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE})
|
||||
if(NOT VCPKG_TOOLCHAIN)
|
||||
if(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
|
||||
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
else()
|
||||
if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
|
||||
else()
|
||||
find_program(_VCPKG_CL cl)
|
||||
if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(_VCPKG_CL MATCHES "arm/cl.exe$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
|
||||
else()
|
||||
message(FATAL_ERROR "Unable to determine target architecture.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
mark_as_advanced(CMAKE_TOOLCHAIN_FILE)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
|
||||
set(_VCPKG_TARGET_TRIPLET_PLAT uwp)
|
||||
else()
|
||||
set(_VCPKG_TARGET_TRIPLET_PLAT windows)
|
||||
endif()
|
||||
|
||||
set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)")
|
||||
set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
#Detect .vcpkg-root to figure VCPKG_ROOT_DIR
|
||||
SET(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR})
|
||||
while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root")
|
||||
get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY)
|
||||
if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive
|
||||
message(FATAL_ERROR "Could not find .vcpkg-root")
|
||||
else()
|
||||
SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP})
|
||||
endif()
|
||||
endwhile()
|
||||
set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE})
|
||||
set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed)
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE)
|
||||
list(APPEND CMAKE_PREFIX_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
|
||||
)
|
||||
list(APPEND CMAKE_LIBRARY_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link
|
||||
)
|
||||
endif()
|
||||
list(APPEND CMAKE_PREFIX_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
|
||||
)
|
||||
list(APPEND CMAKE_LIBRARY_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link
|
||||
)
|
||||
|
||||
set(Boost_COMPILER "-vc140")
|
||||
|
||||
if (NOT DEFINED CMAKE_SYSTEM_VERSION)
|
||||
include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake)
|
||||
# This is used as an implicit parameter for vcpkg_get_windows_sdk
|
||||
set(VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR})
|
||||
vcpkg_get_windows_sdk(WINDOWS_SDK_VERSION)
|
||||
unset(VCPKG_ROOT_DIR)
|
||||
set(CMAKE_SYSTEM_VERSION ${WINDOWS_SDK_VERSION})
|
||||
endif()
|
||||
|
||||
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
|
||||
set(CMAKE_SYSTEM_IGNORE_PATH
|
||||
"${_programfiles}/OpenSSL"
|
||||
"${_programfiles}/OpenSSL-Win32"
|
||||
"${_programfiles}/OpenSSL-Win64"
|
||||
"${_programfiles}/OpenSSL-Win32/lib/VC"
|
||||
"${_programfiles}/OpenSSL-Win64/lib/VC"
|
||||
"${_programfiles}/OpenSSL-Win32/lib/VC/static"
|
||||
"${_programfiles}/OpenSSL-Win64/lib/VC/static"
|
||||
"C:/OpenSSL/"
|
||||
"C:/OpenSSL-Win32/"
|
||||
"C:/OpenSSL-Win64/"
|
||||
"C:/OpenSSL-Win32/lib/VC"
|
||||
"C:/OpenSSL-Win64/lib/VC"
|
||||
"C:/OpenSSL-Win32/lib/VC/static"
|
||||
"C:/OpenSSL-Win64/lib/VC/static"
|
||||
)
|
||||
|
||||
set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools)
|
||||
file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*)
|
||||
foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS})
|
||||
if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR})
|
||||
set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_TOOLS_DIR})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON)
|
||||
function(add_executable name)
|
||||
_add_executable(${ARGV})
|
||||
list(FIND ARGV "IMPORTED" IMPORTED_IDX)
|
||||
list(FIND ARGV "ALIAS" ALIAS_IDX)
|
||||
if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1)
|
||||
if(VCPKG_APPLOCAL_DEPS)
|
||||
add_custom_command(TARGET ${name} POST_BUILD
|
||||
COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1
|
||||
-targetBinary $<TARGET_FILE:${name}>
|
||||
-installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/bin"
|
||||
-OutVariable out
|
||||
)
|
||||
endif()
|
||||
set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props)
|
||||
set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(add_library name)
|
||||
_add_library(${ARGV})
|
||||
list(FIND ARGV "IMPORTED" IMPORTED_IDX)
|
||||
list(FIND ARGV "INTERFACE" INTERFACE_IDX)
|
||||
list(FIND ARGV "ALIAS" ALIAS_IDX)
|
||||
if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1)
|
||||
set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props)
|
||||
set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(find_package name)
|
||||
if(name STREQUAL "Boost")
|
||||
unset(Boost_USE_STATIC_LIBS)
|
||||
endif()
|
||||
_find_package(${ARGV})
|
||||
endmacro()
|
||||
|
||||
set(VCPKG_TOOLCHAIN ON)
|
||||
if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
|
||||
include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}")
|
||||
endif()
|
||||
|
||||
set(_UNUSED ${CMAKE_TOOLCHAIN_FILE})
|
||||
if(VCPKG_TOOLCHAIN)
|
||||
return()
|
||||
endif()
|
||||
|
||||
get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
|
||||
if( _CMAKE_IN_TRY_COMPILE )
|
||||
include( "${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL )
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_TRIPLET)
|
||||
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
|
||||
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
else()
|
||||
if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
|
||||
else()
|
||||
find_program(_VCPKG_CL cl)
|
||||
if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x64)
|
||||
elseif(_VCPKG_CL MATCHES "arm/cl.exe$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH arm)
|
||||
elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$")
|
||||
set(_VCPKG_TARGET_TRIPLET_ARCH x86)
|
||||
else()
|
||||
message(FATAL_ERROR "Unable to determine target architecture.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
|
||||
set(_VCPKG_TARGET_TRIPLET_PLAT uwp)
|
||||
else()
|
||||
set(_VCPKG_TARGET_TRIPLET_PLAT windows)
|
||||
endif()
|
||||
|
||||
set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)")
|
||||
set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
# Detect .vcpkg-root to figure VCPKG_ROOT_DIR
|
||||
set(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR})
|
||||
while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root")
|
||||
get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY)
|
||||
if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive
|
||||
message(FATAL_ERROR "Could not find .vcpkg-root")
|
||||
else()
|
||||
SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP})
|
||||
endif()
|
||||
endwhile()
|
||||
set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE})
|
||||
set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed)
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE)
|
||||
list(APPEND CMAKE_PREFIX_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
|
||||
)
|
||||
list(APPEND CMAKE_LIBRARY_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link
|
||||
)
|
||||
endif()
|
||||
list(APPEND CMAKE_PREFIX_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
|
||||
)
|
||||
list(APPEND CMAKE_LIBRARY_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link
|
||||
)
|
||||
|
||||
set(Boost_COMPILER "-vc140")
|
||||
|
||||
if (NOT DEFINED CMAKE_SYSTEM_VERSION)
|
||||
include(${_VCPKG_ROOT_DIR}/scripts/cmake/vcpkg_get_windows_sdk.cmake)
|
||||
# This is used as an implicit parameter for vcpkg_get_windows_sdk
|
||||
set(VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR})
|
||||
vcpkg_get_windows_sdk(WINDOWS_SDK_VERSION)
|
||||
unset(VCPKG_ROOT_DIR)
|
||||
set(CMAKE_SYSTEM_VERSION ${WINDOWS_SDK_VERSION} CACHE STRING "Windows SDK version")
|
||||
endif()
|
||||
|
||||
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
|
||||
set(CMAKE_SYSTEM_IGNORE_PATH
|
||||
"${_programfiles}/OpenSSL"
|
||||
"${_programfiles}/OpenSSL-Win32"
|
||||
"${_programfiles}/OpenSSL-Win64"
|
||||
"${_programfiles}/OpenSSL-Win32/lib/VC"
|
||||
"${_programfiles}/OpenSSL-Win64/lib/VC"
|
||||
"${_programfiles}/OpenSSL-Win32/lib/VC/static"
|
||||
"${_programfiles}/OpenSSL-Win64/lib/VC/static"
|
||||
"C:/OpenSSL/"
|
||||
"C:/OpenSSL-Win32/"
|
||||
"C:/OpenSSL-Win64/"
|
||||
"C:/OpenSSL-Win32/lib/VC"
|
||||
"C:/OpenSSL-Win64/lib/VC"
|
||||
"C:/OpenSSL-Win32/lib/VC/static"
|
||||
"C:/OpenSSL-Win64/lib/VC/static"
|
||||
)
|
||||
|
||||
set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools)
|
||||
file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*)
|
||||
foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS})
|
||||
if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR})
|
||||
set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_TOOLS_DIR})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON)
|
||||
function(add_executable name)
|
||||
_add_executable(${ARGV})
|
||||
list(FIND ARGV "IMPORTED" IMPORTED_IDX)
|
||||
list(FIND ARGV "ALIAS" ALIAS_IDX)
|
||||
if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1)
|
||||
if(VCPKG_APPLOCAL_DEPS)
|
||||
add_custom_command(TARGET ${name} POST_BUILD
|
||||
COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1
|
||||
-targetBinary $<TARGET_FILE:${name}>
|
||||
-installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/bin"
|
||||
-OutVariable out
|
||||
)
|
||||
endif()
|
||||
set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props)
|
||||
set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(add_library name)
|
||||
_add_library(${ARGV})
|
||||
list(FIND ARGV "IMPORTED" IMPORTED_IDX)
|
||||
list(FIND ARGV "INTERFACE" INTERFACE_IDX)
|
||||
list(FIND ARGV "ALIAS" ALIAS_IDX)
|
||||
if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1)
|
||||
set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props)
|
||||
set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(find_package name)
|
||||
if(name STREQUAL "Boost")
|
||||
unset(Boost_USE_STATIC_LIBS)
|
||||
endif()
|
||||
_find_package(${ARGV})
|
||||
endmacro()
|
||||
|
||||
set(VCPKG_TOOLCHAIN ON)
|
||||
set(_UNUSED ${CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION})
|
||||
set(_UNUSED ${CMAKE_EXPORT_NO_PACKAGE_REGISTRY})
|
||||
set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY})
|
||||
set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY})
|
||||
set(_UNUSED ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP})
|
||||
|
||||
if(NOT _CMAKE_IN_TRY_COMPILE)
|
||||
file(TO_CMAKE_PATH "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" _chainload_file)
|
||||
file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vcpkg.config.cmake"
|
||||
"set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")\n"
|
||||
"set(VCPKG_APPLOCAL_DEPS \"${VCPKG_APPLOCAL_DEPS}\" CACHE STRING \"\")\n"
|
||||
"set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE \"${_chainload_file}\" CACHE STRING \"\")\n")
|
||||
endif()
|
@ -26,7 +26,7 @@ function(vcpkg_acquire_depot_tools PATH_TO_ROOT_OUT)
|
||||
set(download_success 1)
|
||||
endif()
|
||||
|
||||
if (NOT ${download_success})
|
||||
if (NOT download_success)
|
||||
message(FATAL_ERROR
|
||||
"\n"
|
||||
" Failed to download file.\n"
|
||||
|
@ -61,31 +61,39 @@ function(vcpkg_configure_cmake)
|
||||
set(GENERATOR ${_csc_GENERATOR})
|
||||
elseif(_csc_PREFER_NINJA AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT _csc_HOST_ARCHITECTURE STREQUAL "x86")
|
||||
set(GENERATOR "Ninja")
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
set(GENERATOR "Visual Studio 14 2015")
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
set(GENERATOR "Visual Studio 14 2015 Win64")
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
set(GENERATOR "Visual Studio 14 2015 ARM")
|
||||
elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
set(GENERATOR "Visual Studio 14 2015")
|
||||
elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
set(GENERATOR "Visual Studio 14 2015 Win64")
|
||||
elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140")
|
||||
set(GENERATOR "Visual Studio 14 2015 ARM")
|
||||
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
set(GENERATOR "Visual Studio 15 2017")
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
set(GENERATOR "Visual Studio 15 2017 Win64")
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
set(GENERATOR "Visual Studio 15 2017 ARM")
|
||||
elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
set(GENERATOR "Visual Studio 15 2017")
|
||||
set(ARCH "ARM64")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
set(GENERATOR "Visual Studio 15 2017")
|
||||
elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
set(GENERATOR "Visual Studio 15 2017 Win64")
|
||||
elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
set(GENERATOR "Visual Studio 15 2017 ARM")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
|
||||
set(GENERATOR "Visual Studio 15 2017")
|
||||
set(ARCH "ARM64")
|
||||
else()
|
||||
message(FATAL_ERROR "Unable to determine appropriate generator for: ${VCPKG_CMAKE_SYSTEM_NAME}-${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_PLATFORM_TOOLSET}")
|
||||
endif()
|
||||
|
||||
# If we use Ninja, make sure it's on PATH
|
||||
@ -98,15 +106,18 @@ function(vcpkg_configure_cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
||||
|
||||
if(DEFINED VCPKG_CMAKE_SYSTEM_NAME)
|
||||
list(APPEND _csc_OPTIONS -DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME})
|
||||
list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}")
|
||||
endif()
|
||||
if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION)
|
||||
list(APPEND _csc_OPTIONS -DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION})
|
||||
list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}")
|
||||
endif()
|
||||
if(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=ON)
|
||||
elseif(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=OFF)
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid setting for VCPKG_LIBRARY_LINKAGE: \"${VCPKG_LIBRARY_LINKAGE}\". It must be \"static\" or \"dynamic\"")
|
||||
endif()
|
||||
|
||||
if((NOT DEFINED VCPKG_CXX_FLAGS_DEBUG AND NOT DEFINED VCPKG_C_FLAGS_DEBUG) OR
|
||||
@ -125,10 +136,45 @@ function(vcpkg_configure_cmake)
|
||||
message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS and VCPKG_C_FLAGS")
|
||||
endif()
|
||||
|
||||
if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
|
||||
list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}")
|
||||
else()
|
||||
set(VCPKG_CXX_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}")
|
||||
set(VCPKG_C_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}")
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
|
||||
list(APPEND _csc_OPTIONS_DEBUG
|
||||
"-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}"
|
||||
"-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}"
|
||||
)
|
||||
list(APPEND _csc_OPTIONS_RELEASE
|
||||
"-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}"
|
||||
"-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}"
|
||||
)
|
||||
elseif(VCPKG_CRT_LINKAGE STREQUAL "static")
|
||||
list(APPEND _csc_OPTIONS_DEBUG
|
||||
"-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}"
|
||||
"-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}"
|
||||
)
|
||||
list(APPEND _csc_OPTIONS_RELEASE
|
||||
"-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}"
|
||||
"-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}"
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid setting for VCPKG_CRT_LINKAGE: \"${VCPKG_CRT_LINKAGE}\". It must be \"static\" or \"dynamic\"")
|
||||
endif()
|
||||
|
||||
list(APPEND _csc_OPTIONS_RELEASE
|
||||
"-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}"
|
||||
"-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}"
|
||||
)
|
||||
list(APPEND _csc_OPTIONS
|
||||
"-DCMAKE_CXX_FLAGS=${VCPKG_CXX_FLAGS}"
|
||||
"-DCMAKE_C_FLAGS=${VCPKG_C_FLAGS}"
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND _csc_OPTIONS
|
||||
"-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}"
|
||||
"-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}"
|
||||
"-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}"
|
||||
"-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
|
||||
"-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
|
||||
"-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON"
|
||||
@ -139,32 +185,12 @@ function(vcpkg_configure_cmake)
|
||||
"-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON"
|
||||
)
|
||||
|
||||
if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
||||
list(APPEND _csc_OPTIONS_DEBUG
|
||||
"-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}"
|
||||
"-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}"
|
||||
)
|
||||
list(APPEND _csc_OPTIONS_RELEASE
|
||||
"-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}"
|
||||
"-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}"
|
||||
)
|
||||
|
||||
elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static)
|
||||
list(APPEND _csc_OPTIONS_DEBUG
|
||||
"-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}"
|
||||
"-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}"
|
||||
)
|
||||
list(APPEND _csc_OPTIONS_RELEASE
|
||||
"-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}"
|
||||
"-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}"
|
||||
if(DEFINED ARCH)
|
||||
list(APPEND _csc_OPTIONS
|
||||
"-A${ARCH}"
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND _csc_OPTIONS_RELEASE
|
||||
"-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}"
|
||||
"-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}"
|
||||
)
|
||||
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
||||
vcpkg_execute_required_process(
|
||||
|
@ -78,7 +78,7 @@ function(vcpkg_download_distfile VAR)
|
||||
endif()
|
||||
endforeach(url)
|
||||
|
||||
if (NOT ${download_success})
|
||||
if (NOT download_success)
|
||||
message(FATAL_ERROR
|
||||
"\n"
|
||||
" Failed to download file.\n"
|
||||
|
@ -34,7 +34,8 @@
|
||||
## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake)
|
||||
## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake)
|
||||
function(vcpkg_find_acquire_program VAR)
|
||||
if(${VAR} AND NOT ${VAR} MATCHES "-NOTFOUND")
|
||||
set(EXPANDED_VAR ${${VAR}})
|
||||
if(EXPANDED_VAR)
|
||||
return()
|
||||
endif()
|
||||
|
||||
@ -100,11 +101,11 @@ function(vcpkg_find_acquire_program VAR)
|
||||
set(HASH 556f95f7566fe23704d136239e4cf5e2a26f939ab43b44145c91b70d031a088d553e5c21301f1242a2295dcde3143b356211f0108c68e65eef8572407618326d)
|
||||
elseif(VAR MATCHES "NINJA")
|
||||
set(PROGNAME ninja)
|
||||
set(SUBDIR "ninja-1.7.2")
|
||||
set(SUBDIR "ninja-1.8.2")
|
||||
set(PATHS ${DOWNLOADS}/tools/ninja/${SUBDIR})
|
||||
set(URL "https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip")
|
||||
set(ARCHIVE "ninja-win.zip")
|
||||
set(HASH cccab9281b274c564f9ad77a2115be1f19be67d7b2ee14a55d1db1b27f3b68db8e76076e4f804b61eb8e573e26a8ecc9985675a8dcf03fd7a77b7f57234f1393)
|
||||
set(URL "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip")
|
||||
set(ARCHIVE "ninja-1.8.2-win.zip")
|
||||
set(HASH 9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5)
|
||||
elseif(VAR MATCHES "MESON")
|
||||
set(PROGNAME meson)
|
||||
set(REQUIRED_INTERPRETER PYTHON3)
|
||||
@ -162,7 +163,7 @@ function(vcpkg_find_acquire_program VAR)
|
||||
endmacro()
|
||||
|
||||
do_find()
|
||||
if(${VAR} MATCHES "-NOTFOUND")
|
||||
if("${${VAR}}" MATCHES "-NOTFOUND")
|
||||
file(DOWNLOAD ${URL} ${DOWNLOADS}/${ARCHIVE}
|
||||
EXPECTED_HASH SHA512=${HASH}
|
||||
SHOW_PROGRESS
|
||||
@ -173,7 +174,7 @@ function(vcpkg_find_acquire_program VAR)
|
||||
else()
|
||||
get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT)
|
||||
string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION)
|
||||
if(${ARCHIVE_EXTENSION} STREQUAL ".msi")
|
||||
if(ARCHIVE_EXTENSION STREQUAL ".msi")
|
||||
file(TO_NATIVE_PATH "${DOWNLOADS}/${ARCHIVE}" ARCHIVE_NATIVE_PATH)
|
||||
file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}" DESTINATION_NATIVE_PATH)
|
||||
execute_process(
|
||||
@ -191,5 +192,5 @@ function(vcpkg_find_acquire_program VAR)
|
||||
do_find()
|
||||
endif()
|
||||
|
||||
set(${VAR} ${${VAR}} PARENT_SCOPE)
|
||||
set(${VAR} "${${VAR}}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
@ -36,17 +36,19 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
|
||||
New-Item -ItemType directory -Path $downloadDir | Out-Null
|
||||
}
|
||||
|
||||
$WC = New-Object System.Net.WebClient
|
||||
$ProxyAuth = !$WC.Proxy.IsBypassed($url)
|
||||
if ($ProxyAuth)
|
||||
{
|
||||
$ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication"
|
||||
$PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic")
|
||||
$PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred)
|
||||
$WC.Proxy.Credentials=$ProxyCred
|
||||
}
|
||||
|
||||
if (($PSVersionTable.PSEdition -ne "Core") -and ($Dependency -ne "git")) # git fails with BITS
|
||||
{
|
||||
try {
|
||||
$WC = New-Object System.Net.WebClient
|
||||
$ProxyAuth = !$WC.Proxy.IsBypassed($url)
|
||||
If($ProxyAuth){
|
||||
$ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication"
|
||||
$PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic")
|
||||
$PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred)
|
||||
}
|
||||
|
||||
Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop
|
||||
}
|
||||
catch [System.Exception] {
|
||||
@ -60,7 +62,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
|
||||
if (!(Test-Path $downloadPath))
|
||||
{
|
||||
Write-Verbose("Downloading $Dependency...")
|
||||
(New-Object System.Net.WebClient).DownloadFile($url, $downloadPath)
|
||||
$WC.DownloadFile($url, $downloadPath)
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,11 +128,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
|
||||
}
|
||||
elseif($Dependency -eq "vswhere")
|
||||
{
|
||||
$requiredVersion = "2.1.4"
|
||||
$downloadVersion = "2.1.4"
|
||||
$url = "https://github.com/Microsoft/vswhere/releases/download/2.1.4/vswhere.exe"
|
||||
$requiredVersion = "2.2.3"
|
||||
$downloadVersion = "2.2.3"
|
||||
$url = "https://github.com/Microsoft/vswhere/releases/download/2.2.3/vswhere.exe"
|
||||
$downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe"
|
||||
$expectedDownloadedFileHash = "548fb9dfeed59bc4ddcce739a5729e9c8dd5932cd60ff6f74727ee069e7da458"
|
||||
$expectedDownloadedFileHash = "5f19066ac91635ad17d33fe0f79fc63c672a46f98c0358589a90163bcb2733e8"
|
||||
$executableFromDownload = $downloadPath
|
||||
$extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ param(
|
||||
$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
|
||||
$vswhereExe = & $scriptsDir\fetchDependency.ps1 "vswhere"
|
||||
|
||||
$output = & $vswhereExe -prerelease -legacy -format xml
|
||||
$output = & $vswhereExe -prerelease -legacy -products * -format xml
|
||||
[xml]$asXml = $output
|
||||
|
||||
$results = New-Object System.Collections.ArrayList
|
||||
@ -32,6 +32,21 @@ foreach ($instance in $asXml.instances.instance)
|
||||
$results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null
|
||||
}
|
||||
|
||||
# If nothing is found, attempt to find VS2015 Build Tools (not detected by vswhere.exe)
|
||||
if ($results.Count -eq 0)
|
||||
{
|
||||
$programFiles = & $scriptsDir\getProgramFiles32bit.ps1
|
||||
$installationPath = "$programFiles\Microsoft Visual Studio 14.0"
|
||||
$clExe = "$installationPath\VC\bin\cl.exe"
|
||||
$vcvarsallbat = "$installationPath\VC\vcvarsall.bat"
|
||||
|
||||
if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat))
|
||||
{
|
||||
return "PreferenceWeight1::Legacy::14.0::$installationPath"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$results.Sort()
|
||||
$results.Reverse()
|
||||
|
||||
|
@ -19,6 +19,11 @@ $validInstances = New-Object System.Collections.ArrayList
|
||||
# Windows 10 SDK
|
||||
function CheckWindows10SDK($path)
|
||||
{
|
||||
if ($path -eq $null)
|
||||
{
|
||||
return
|
||||
}
|
||||
|
||||
$folder = (Join-Path $path "Include")
|
||||
if (!(Test-Path $folder))
|
||||
{
|
||||
@ -64,6 +69,11 @@ CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10")
|
||||
# Windows 8.1 SDK
|
||||
function CheckWindows81SDK($path)
|
||||
{
|
||||
if ($path -eq $null)
|
||||
{
|
||||
return
|
||||
}
|
||||
|
||||
$folder = "$path\Include"
|
||||
if (!(Test-Path $folder))
|
||||
{
|
||||
|
31
scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd1
Normal file
31
scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd1
Normal file
@ -0,0 +1,31 @@
|
||||
@{
|
||||
|
||||
# Script module or binary module file associated with this manifest.
|
||||
ModuleToProcess = 'posh-vcpkg.psm1'
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '0.0.1'
|
||||
|
||||
# ID used to uniquely identify this module
|
||||
GUID = '948f02ab-fc99-4a53-8335-b6556eef129b'
|
||||
|
||||
# Minimum version of the Windows PowerShell engine required by this module
|
||||
PowerShellVersion = '5.0'
|
||||
|
||||
FunctionsToExport = @('TabExpansion')
|
||||
CmdletsToExport = @()
|
||||
VariablesToExport = @()
|
||||
AliasesToExport = @()
|
||||
|
||||
# Private data to pass to the module specified in RootModule/ModuleToProcess.
|
||||
# This may also contain a PSData hashtable with additional module metadata used by PowerShell.
|
||||
PrivateData =
|
||||
@{
|
||||
PSData =
|
||||
@{
|
||||
# Tags applied to this module. These help with module discovery in online galleries.
|
||||
Tags = @('vcpkg', 'tab', 'tab-completion', 'tab-expansion', 'tabexpansion')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
39
scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1
Normal file
39
scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1
Normal file
@ -0,0 +1,39 @@
|
||||
param()
|
||||
|
||||
if (Get-Module posh-vcpkg) { return }
|
||||
|
||||
if ($PSVersionTable.PSVersion.Major -lt 5) {
|
||||
Write-Warning ("posh-vcpkg does not support PowerShell versions before 5.0.")
|
||||
return
|
||||
}
|
||||
|
||||
if (Test-Path Function:\TabExpansion) {
|
||||
Rename-Item Function:\TabExpansion VcpkgTabExpansionBackup
|
||||
}
|
||||
|
||||
function TabExpansion($line, $lastWord) {
|
||||
$lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart()
|
||||
|
||||
switch -regex ($lastBlock) {
|
||||
"^(?<vcpkgexe>(\./|\.\\|)vcpkg(\.exe|)) (?<remaining>.*)$"
|
||||
{
|
||||
& $matches['vcpkgexe'] autocomplete $matches['remaining']
|
||||
return
|
||||
}
|
||||
|
||||
# Fall back on existing tab expansion
|
||||
default {
|
||||
if (Test-Path Function:\VcpkgTabExpansionBackup) {
|
||||
VcpkgTabExpansionBackup $line $lastWord
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$exportModuleMemberParams = @{
|
||||
Function = @(
|
||||
'TabExpansion'
|
||||
)
|
||||
}
|
||||
|
||||
Export-ModuleMember @exportModuleMemberParams
|
@ -1,96 +0,0 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
template<class CharType>
|
||||
struct BasicCStringView
|
||||
{
|
||||
constexpr BasicCStringView() : cstr(nullptr) {}
|
||||
constexpr BasicCStringView(const CharType* cstr) : cstr(cstr) {}
|
||||
constexpr BasicCStringView(const BasicCStringView&) = default;
|
||||
BasicCStringView(const std::basic_string<CharType>& str) : cstr(str.c_str()) {}
|
||||
|
||||
constexpr const CharType* c_str() const { return cstr; }
|
||||
|
||||
private:
|
||||
const CharType* cstr;
|
||||
};
|
||||
|
||||
namespace details
|
||||
{
|
||||
inline bool vcpkg_strcmp(const char* l, const char* r) { return strcmp(l, r) == 0; }
|
||||
inline bool vcpkg_strcmp(const wchar_t* l, const wchar_t* r) { return wcscmp(l, r) == 0; }
|
||||
}
|
||||
|
||||
template<class CharType>
|
||||
bool operator==(const BasicCStringView<CharType>& l, const BasicCStringView<CharType>& r)
|
||||
{
|
||||
return details::vcpkg_strcmp(l.c_str(), r.c_str());
|
||||
}
|
||||
|
||||
template<class CharType>
|
||||
bool operator==(const CharType* l, const BasicCStringView<CharType>& r)
|
||||
{
|
||||
return details::vcpkg_strcmp(l, r.c_str());
|
||||
}
|
||||
|
||||
template<class CharType>
|
||||
bool operator==(const BasicCStringView<CharType>& r, const CharType* l)
|
||||
{
|
||||
return details::vcpkg_strcmp(l, r.c_str());
|
||||
}
|
||||
|
||||
template<class CharType>
|
||||
bool operator==(const std::basic_string<CharType>& l, const BasicCStringView<CharType>& r)
|
||||
{
|
||||
return l == r.c_str();
|
||||
}
|
||||
|
||||
template<class CharType>
|
||||
bool operator==(const BasicCStringView<CharType>& r, const std::basic_string<CharType>& l)
|
||||
{
|
||||
return l == r.c_str();
|
||||
}
|
||||
|
||||
// notequals
|
||||
template<class CharType>
|
||||
bool operator!=(const BasicCStringView<CharType>& l, const BasicCStringView<CharType>& r)
|
||||
{
|
||||
return !details::vcpkg_strcmp(l.c_str(), r.c_str());
|
||||
}
|
||||
|
||||
template<class CharType>
|
||||
bool operator!=(const CharType* l, const BasicCStringView<CharType>& r)
|
||||
{
|
||||
return !details::vcpkg_strcmp(l, r.c_str());
|
||||
}
|
||||
|
||||
template<class CharType>
|
||||
bool operator!=(const BasicCStringView<CharType>& r, const CharType* l)
|
||||
{
|
||||
return !details::vcpkg_strcmp(l, r.c_str());
|
||||
}
|
||||
|
||||
template<class CharType>
|
||||
bool operator!=(const BasicCStringView<CharType>& r, const std::basic_string<CharType>& l)
|
||||
{
|
||||
return l != r.c_str();
|
||||
}
|
||||
|
||||
template<class CharType>
|
||||
bool operator!=(const std::basic_string<CharType>& l, const BasicCStringView<CharType>& r)
|
||||
{
|
||||
return l != r.c_str();
|
||||
}
|
||||
|
||||
using CStringView = BasicCStringView<char>;
|
||||
using CWStringView = BasicCStringView<wchar_t>;
|
||||
|
||||
inline const char* to_printf_arg(const CStringView string_view) { return string_view.c_str(); }
|
||||
|
||||
inline const wchar_t* to_wprintf_arg(const CWStringView string_view) { return string_view.c_str(); }
|
||||
|
||||
static_assert(sizeof(CStringView) == sizeof(void*), "CStringView must be a simple wrapper around char*");
|
||||
static_assert(sizeof(CWStringView) == sizeof(void*), "CWStringView must be a simple wrapper around wchar_t*");
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <initializer_list>
|
||||
#include <vector>
|
||||
|
||||
template<class T>
|
||||
struct Span
|
||||
{
|
||||
public:
|
||||
using element_type = T;
|
||||
using pointer = T*;
|
||||
using reference = T&;
|
||||
using iterator = T*;
|
||||
|
||||
constexpr Span() noexcept : m_ptr(nullptr), m_count(0) {}
|
||||
constexpr Span(std::nullptr_t) noexcept : Span() {}
|
||||
constexpr Span(T* ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {}
|
||||
constexpr Span(T* ptr_begin, T* ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {}
|
||||
constexpr Span(std::initializer_list<T> l) noexcept : m_ptr(l.begin()), m_count(l.size()) {}
|
||||
|
||||
template<size_t N>
|
||||
constexpr Span(T (&arr)[N]) noexcept : Span(arr, N)
|
||||
{
|
||||
}
|
||||
|
||||
Span(std::vector<T>& v) noexcept : Span(v.data(), v.size()) {}
|
||||
Span(const std::vector<std::remove_const_t<T>>& v) noexcept : Span(v.data(), v.size()) {}
|
||||
|
||||
constexpr iterator begin() const { return m_ptr; }
|
||||
constexpr iterator end() const { return m_ptr + m_count; }
|
||||
|
||||
constexpr reference operator[](size_t i) const { return m_ptr[i]; }
|
||||
constexpr size_t size() const { return m_count; }
|
||||
|
||||
private:
|
||||
pointer m_ptr;
|
||||
size_t m_count;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
Span<T> make_span(std::vector<T>& v)
|
||||
{
|
||||
return {v.data(), v.size()};
|
||||
}
|
||||
|
||||
template<class T>
|
||||
Span<const T> make_span(const std::vector<T>& v)
|
||||
{
|
||||
return {v.data(), v.size()};
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
namespace fs
|
||||
{
|
||||
namespace stdfs = std::experimental::filesystem;
|
||||
|
||||
using stdfs::path;
|
||||
using stdfs::copy_options;
|
||||
using stdfs::file_status;
|
||||
|
||||
inline bool is_regular_file(file_status s) { return stdfs::is_regular_file(s); }
|
||||
inline bool is_directory(file_status s) { return stdfs::is_directory(s); }
|
||||
inline bool status_known(file_status s) { return stdfs::status_known(s); }
|
||||
}
|
@ -1,10 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define NOMINMAX
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#pragma warning(suppress : 4768)
|
||||
#include <windows.h>
|
||||
|
||||
#pragma warning(suppress : 4768)
|
||||
#include <Shlobj.h>
|
||||
|
||||
#include <process.h>
|
||||
#include <shellapi.h>
|
||||
#include <winhttp.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
@ -15,7 +27,12 @@
|
||||
#include <cstdarg>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#if defined(_WIN32)
|
||||
#include <filesystem>
|
||||
#else
|
||||
#include <experimental/filesystem>
|
||||
#endif
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <iomanip>
|
||||
@ -24,22 +41,17 @@
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <process.h>
|
||||
#include <regex>
|
||||
#include <set>
|
||||
#include <shellapi.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4768)
|
||||
#include <Shlobj.h>
|
||||
#pragma warning(pop)
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <sys/timeb.h>
|
||||
#include <sys/types.h>
|
||||
#include <system_error>
|
||||
#include <thread>
|
||||
#include <time.h>
|
||||
#include <type_traits>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <winhttp.h>
|
||||
|
@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "LineInfo.h"
|
||||
#include "vcpkg_Strings.h"
|
||||
#include <vcpkg/base/cstringview.h>
|
||||
#include <vcpkg/base/lineinfo.h>
|
||||
#include <vcpkg/base/strings.h>
|
||||
|
||||
namespace vcpkg::Checks
|
||||
{
|
@ -3,7 +3,7 @@
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
|
||||
namespace vcpkg
|
||||
namespace vcpkg::Chrono
|
||||
{
|
||||
class ElapsedTime
|
||||
{
|
@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
#include "MachineType.h"
|
||||
#include "filesystem_fs.h"
|
||||
|
||||
#include <vcpkg/base/files.h>
|
||||
#include <vcpkg/base/machinetype.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace vcpkg::CoffFileReader
|
69
toolsrc/include/vcpkg/base/cstringview.h
Normal file
69
toolsrc/include/vcpkg/base/cstringview.h
Normal file
@ -0,0 +1,69 @@
|
||||
#pragma once
|
||||
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
struct CStringView
|
||||
{
|
||||
constexpr CStringView() : cstr(nullptr) {}
|
||||
constexpr CStringView(const char* cstr) : cstr(cstr) {}
|
||||
constexpr CStringView(const CStringView&) = default;
|
||||
CStringView(const std::string& str) : cstr(str.c_str()) {}
|
||||
|
||||
constexpr const char* c_str() const { return cstr; }
|
||||
|
||||
private:
|
||||
const char* cstr;
|
||||
};
|
||||
|
||||
struct CWStringView
|
||||
{
|
||||
constexpr CWStringView() : cstr(nullptr) {}
|
||||
constexpr CWStringView(const wchar_t* cstr) : cstr(cstr) {}
|
||||
constexpr CWStringView(const CWStringView&) = default;
|
||||
CWStringView(const std::wstring& str) : cstr(str.c_str()) {}
|
||||
|
||||
constexpr const wchar_t* c_str() const { return cstr; }
|
||||
|
||||
private:
|
||||
const wchar_t* cstr;
|
||||
};
|
||||
|
||||
namespace details
|
||||
{
|
||||
inline bool vcpkg_strcmp(const char* l, const char* r) { return strcmp(l, r) == 0; }
|
||||
}
|
||||
|
||||
inline bool operator==(const CStringView& l, const CStringView& r)
|
||||
{
|
||||
return details::vcpkg_strcmp(l.c_str(), r.c_str());
|
||||
}
|
||||
|
||||
inline bool operator==(const char* l, const CStringView& r) { return details::vcpkg_strcmp(l, r.c_str()); }
|
||||
|
||||
inline bool operator==(const CStringView& r, const char* l) { return details::vcpkg_strcmp(l, r.c_str()); }
|
||||
|
||||
inline bool operator==(const std::string& l, const CStringView& r) { return l == r.c_str(); }
|
||||
|
||||
inline bool operator==(const CStringView& r, const std::string& l) { return l == r.c_str(); }
|
||||
|
||||
// notequals
|
||||
inline bool operator!=(const CStringView& l, const CStringView& r)
|
||||
{
|
||||
return !details::vcpkg_strcmp(l.c_str(), r.c_str());
|
||||
}
|
||||
|
||||
inline bool operator!=(const char* l, const CStringView& r) { return !details::vcpkg_strcmp(l, r.c_str()); }
|
||||
|
||||
inline bool operator!=(const CStringView& r, const char* l) { return !details::vcpkg_strcmp(l, r.c_str()); }
|
||||
|
||||
inline bool operator!=(const CStringView& r, const std::string& l) { return l != r.c_str(); }
|
||||
|
||||
inline bool operator!=(const std::string& l, const CStringView& r) { return l != r.c_str(); }
|
||||
|
||||
inline const char* to_printf_arg(const CStringView string_view) { return string_view.c_str(); }
|
||||
|
||||
static_assert(sizeof(CStringView) == sizeof(void*), "CStringView must be a simple wrapper around char*");
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
#include "LineInfo.h"
|
||||
|
||||
#include <vcpkg/base/lineinfo.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace vcpkg::Enums
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "vcpkg_Checks.h"
|
||||
#include <vcpkg/base/checks.h>
|
||||
|
||||
#include <system_error>
|
||||
|
||||
namespace vcpkg
|
||||
@ -32,7 +33,7 @@ namespace vcpkg
|
||||
ErrorHolder() = default;
|
||||
ErrorHolder(const std::error_code& err) : m_err(err) {}
|
||||
|
||||
constexpr bool has_error() const { return bool(m_err); }
|
||||
bool has_error() const { return bool(m_err); }
|
||||
|
||||
const std::error_code& error() const { return m_err; }
|
||||
std::error_code& error() { return m_err; }
|
||||
@ -71,13 +72,13 @@ namespace vcpkg
|
||||
return std::move(this->m_t);
|
||||
}
|
||||
|
||||
const T& value_or_exit(const LineInfo& line_info) const &
|
||||
const T& value_or_exit(const LineInfo& line_info) const&
|
||||
{
|
||||
exit_if_error(line_info);
|
||||
return this->m_t;
|
||||
}
|
||||
|
||||
const S& error() const & { return this->m_s.error(); }
|
||||
const S& error() const& { return this->m_s.error(); }
|
||||
|
||||
S&& error() && { return std::move(this->m_s.error()); }
|
||||
|
@ -1,11 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "filesystem_fs.h"
|
||||
#include "vcpkg_expected.h"
|
||||
#include <vcpkg/base/expected.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <filesystem>
|
||||
#else
|
||||
#include <experimental/filesystem>
|
||||
#endif
|
||||
|
||||
namespace fs
|
||||
{
|
||||
namespace stdfs = std::experimental::filesystem;
|
||||
|
||||
using stdfs::copy_options;
|
||||
using stdfs::file_status;
|
||||
using stdfs::path;
|
||||
|
||||
inline bool is_regular_file(file_status s) { return stdfs::is_regular_file(s); }
|
||||
inline bool is_directory(file_status s) { return stdfs::is_directory(s); }
|
||||
inline bool status_known(file_status s) { return stdfs::status_known(s); }
|
||||
}
|
||||
|
||||
namespace vcpkg::Files
|
||||
{
|
||||
__interface Filesystem
|
||||
struct Filesystem
|
||||
{
|
||||
virtual Expected<std::string> read_contents(const fs::path& file_path) const = 0;
|
||||
virtual Expected<std::vector<std::string>> read_lines(const fs::path& file_path) const = 0;
|
||||
@ -26,8 +44,10 @@ namespace vcpkg::Files
|
||||
virtual bool create_directory(const fs::path& path, std::error_code& ec) = 0;
|
||||
virtual bool create_directories(const fs::path& path, std::error_code& ec) = 0;
|
||||
virtual void copy(const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts) = 0;
|
||||
virtual bool copy_file(
|
||||
const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts, std::error_code& ec) = 0;
|
||||
virtual bool copy_file(const fs::path& oldpath,
|
||||
const fs::path& newpath,
|
||||
fs::copy_options opts,
|
||||
std::error_code& ec) = 0;
|
||||
virtual fs::file_status status(const fs::path& path, std::error_code& ec) const = 0;
|
||||
};
|
||||
|
||||
@ -39,5 +59,5 @@ namespace vcpkg::Files
|
||||
|
||||
void print_paths(const std::vector<fs::path>& paths);
|
||||
|
||||
std::vector<fs::path> find_from_PATH(const std::wstring& name);
|
||||
std::vector<fs::path> find_from_PATH(const std::string& name);
|
||||
}
|
@ -3,6 +3,8 @@
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
#include <vcpkg/base/checks.h>
|
||||
|
||||
namespace vcpkg::Graphs
|
||||
{
|
||||
enum class ExplorationStatus
|
||||
@ -18,11 +20,11 @@ namespace vcpkg::Graphs
|
||||
};
|
||||
|
||||
template<class V, class U>
|
||||
__interface AdjacencyProvider
|
||||
struct AdjacencyProvider
|
||||
{
|
||||
std::vector<V> adjacency_list(const U& vertex) const;
|
||||
virtual std::vector<V> adjacency_list(const U& vertex) const = 0;
|
||||
|
||||
U load_vertex_data(const V& vertex) const;
|
||||
virtual U load_vertex_data(const V& vertex) const = 0;
|
||||
};
|
||||
|
||||
template<class V, class U>
|
@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace vcpkg
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "vcpkg_Checks.h"
|
||||
|
||||
#include <vcpkg/base/checks.h>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
@ -29,7 +30,7 @@ namespace vcpkg
|
||||
return std::move(this->m_t);
|
||||
}
|
||||
|
||||
const T& value_or_exit(const LineInfo& line_info) const &
|
||||
const T& value_or_exit(const LineInfo& line_info) const&
|
||||
{
|
||||
this->exit_if_null(line_info);
|
||||
return this->m_t;
|
||||
@ -40,7 +41,7 @@ namespace vcpkg
|
||||
constexpr bool has_value() const { return m_is_present; }
|
||||
|
||||
template<class U>
|
||||
T value_or(U&& default_value) const &
|
||||
T value_or(U&& default_value) const&
|
||||
{
|
||||
return bool(*this) ? this->m_t : static_cast<T>(std::forward<U>(default_value));
|
||||
}
|
60
toolsrc/include/vcpkg/base/span.h
Normal file
60
toolsrc/include/vcpkg/base/span.h
Normal file
@ -0,0 +1,60 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <initializer_list>
|
||||
#include <vector>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
template<class T>
|
||||
struct Span
|
||||
{
|
||||
public:
|
||||
using element_type = T;
|
||||
using pointer = T*;
|
||||
using reference = T&;
|
||||
using iterator = T*;
|
||||
|
||||
constexpr Span() noexcept : m_ptr(nullptr), m_count(0) {}
|
||||
constexpr Span(std::nullptr_t) noexcept : Span() {}
|
||||
constexpr Span(T* ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {}
|
||||
constexpr Span(T* ptr_begin, T* ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {}
|
||||
constexpr Span(std::initializer_list<T> l) noexcept : m_ptr(l.begin()), m_count(l.size()) {}
|
||||
|
||||
template<size_t N>
|
||||
constexpr Span(T (&arr)[N]) noexcept : Span(arr, N)
|
||||
{
|
||||
}
|
||||
|
||||
template<size_t N>
|
||||
constexpr Span(const std::array<std::remove_const_t<T>, N>& arr) noexcept : Span(arr.data(), arr.size())
|
||||
{
|
||||
}
|
||||
|
||||
Span(std::vector<T>& v) noexcept : Span(v.data(), v.size()) {}
|
||||
Span(const std::vector<std::remove_const_t<T>>& v) noexcept : Span(v.data(), v.size()) {}
|
||||
|
||||
constexpr iterator begin() const { return m_ptr; }
|
||||
constexpr iterator end() const { return m_ptr + m_count; }
|
||||
|
||||
constexpr reference operator[](size_t i) const { return m_ptr[i]; }
|
||||
constexpr size_t size() const { return m_count; }
|
||||
|
||||
private:
|
||||
pointer m_ptr;
|
||||
size_t m_count;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
Span<T> make_span(std::vector<T>& v)
|
||||
{
|
||||
return {v.data(), v.size()};
|
||||
}
|
||||
|
||||
template<class T>
|
||||
Span<const T> make_span(const std::vector<T>& v)
|
||||
{
|
||||
return {v.data(), v.size()};
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CStringView.h"
|
||||
#include <vcpkg/base/cstringview.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace vcpkg::Strings::details
|
||||
@ -15,30 +16,17 @@ namespace vcpkg::Strings::details
|
||||
|
||||
inline const char* to_printf_arg(const char* s) { return s; }
|
||||
|
||||
inline int to_printf_arg(const int s) { return s; }
|
||||
|
||||
inline long long to_printf_arg(const long long s) { return s; }
|
||||
|
||||
inline unsigned long to_printf_arg(const unsigned long s) { return s; }
|
||||
|
||||
inline size_t to_printf_arg(const size_t s) { return s; }
|
||||
|
||||
inline double to_printf_arg(const double s) { return s; }
|
||||
template<class T, class = std::enable_if_t<std::is_arithmetic<T>::value>>
|
||||
T to_printf_arg(T s)
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
std::string format_internal(const char* fmtstr, ...);
|
||||
|
||||
inline const wchar_t* to_wprintf_arg(const std::wstring& s) { return s.c_str(); }
|
||||
|
||||
inline const wchar_t* to_wprintf_arg(const wchar_t* s) { return s; }
|
||||
|
||||
std::wstring wformat_internal(const wchar_t* fmtstr, ...);
|
||||
}
|
||||
|
||||
namespace vcpkg::Strings
|
||||
{
|
||||
static constexpr const char* EMPTY = "";
|
||||
static constexpr const wchar_t* WEMPTY = L"";
|
||||
|
||||
template<class... Args>
|
||||
std::string format(const char* fmtstr, const Args&... args)
|
||||
{
|
||||
@ -46,39 +34,32 @@ namespace vcpkg::Strings
|
||||
return details::format_internal(fmtstr, to_printf_arg(to_printf_arg(args))...);
|
||||
}
|
||||
|
||||
template<class... Args>
|
||||
std::wstring wformat(const wchar_t* fmtstr, const Args&... args)
|
||||
{
|
||||
using vcpkg::Strings::details::to_wprintf_arg;
|
||||
return details::wformat_internal(fmtstr, to_wprintf_arg(to_wprintf_arg(args))...);
|
||||
}
|
||||
std::wstring to_utf16(const CStringView& s);
|
||||
|
||||
std::wstring to_utf16(const CStringView s);
|
||||
|
||||
std::string to_utf8(const CWStringView w);
|
||||
std::string to_utf8(const CWStringView& w);
|
||||
|
||||
std::string::const_iterator case_insensitive_ascii_find(const std::string& s, const std::string& pattern);
|
||||
|
||||
bool case_insensitive_ascii_contains(const std::string& s, const std::string& pattern);
|
||||
|
||||
int case_insensitive_ascii_compare(const CStringView left, const CStringView right);
|
||||
bool case_insensitive_ascii_equals(const CStringView left, const CStringView right);
|
||||
|
||||
std::string ascii_to_lowercase(const std::string& input);
|
||||
|
||||
bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern);
|
||||
|
||||
template<class Container, class Transformer, class CharType>
|
||||
std::basic_string<CharType> join(const CharType* delimiter, const Container& v, Transformer transformer)
|
||||
template<class Container, class Transformer>
|
||||
std::string join(const char* delimiter, const Container& v, Transformer transformer)
|
||||
{
|
||||
const auto begin = v.begin();
|
||||
const auto end = v.end();
|
||||
|
||||
if (begin == end)
|
||||
{
|
||||
return std::basic_string<CharType>();
|
||||
return std::string();
|
||||
}
|
||||
|
||||
std::basic_string<CharType> output;
|
||||
std::string output;
|
||||
output.append(transformer(*begin));
|
||||
for (auto it = std::next(begin); it != end; ++it)
|
||||
{
|
||||
@ -88,8 +69,8 @@ namespace vcpkg::Strings
|
||||
|
||||
return output;
|
||||
}
|
||||
template<class Container, class CharType>
|
||||
std::basic_string<CharType> join(const CharType* delimiter, const Container& v)
|
||||
template<class Container>
|
||||
std::string join(const char* delimiter, const Container& v)
|
||||
{
|
||||
using Element = decltype(*v.begin());
|
||||
return join(delimiter, v, [](const Element& x) -> const Element& { return x; });
|
@ -1,9 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "filesystem_fs.h"
|
||||
#include "vcpkg_Strings.h"
|
||||
#include "vcpkg_optional.h"
|
||||
#include <Windows.h>
|
||||
#include <vcpkg/base/files.h>
|
||||
#include <vcpkg/base/optional.h>
|
||||
#include <vcpkg/base/strings.h>
|
||||
|
||||
namespace vcpkg::System
|
||||
{
|
||||
@ -17,13 +16,13 @@ namespace vcpkg::System
|
||||
std::string output;
|
||||
};
|
||||
|
||||
int cmd_execute_clean(const CWStringView cmd_line);
|
||||
int cmd_execute_clean(const CStringView cmd_line);
|
||||
|
||||
int cmd_execute(const CWStringView cmd_line);
|
||||
int cmd_execute(const CStringView cmd_line);
|
||||
|
||||
ExitCodeAndOutput cmd_execute_and_capture_output(const CWStringView cmd_line);
|
||||
ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line);
|
||||
|
||||
std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args = Strings::WEMPTY);
|
||||
std::string create_powershell_script_cmd(const fs::path& script_path, const CStringView args = "");
|
||||
|
||||
enum class Color
|
||||
{
|
||||
@ -62,9 +61,9 @@ namespace vcpkg::System
|
||||
return System::println(c, Strings::format(messageTemplate, messageArg1, messageArgs...));
|
||||
}
|
||||
|
||||
Optional<std::wstring> get_environment_variable(const CWStringView varname) noexcept;
|
||||
Optional<std::string> get_environment_variable(const CStringView varname) noexcept;
|
||||
|
||||
Optional<std::wstring> get_registry_string(HKEY base, const CWStringView subkey, const CWStringView valuename);
|
||||
Optional<std::string> get_registry_string(void* base_hkey, const CStringView subkey, const CStringView valuename);
|
||||
|
||||
enum class CPUArchitecture
|
||||
{
|
||||
@ -74,7 +73,7 @@ namespace vcpkg::System
|
||||
ARM64,
|
||||
};
|
||||
|
||||
Optional<CPUArchitecture> to_cpu_architecture(CStringView arch);
|
||||
Optional<CPUArchitecture> to_cpu_architecture(const CStringView& arch);
|
||||
|
||||
CPUArchitecture get_host_processor();
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <utility>
|
||||
@ -7,6 +8,18 @@
|
||||
|
||||
namespace vcpkg::Util
|
||||
{
|
||||
template<class Container>
|
||||
using ElementT = std::remove_reference_t<decltype(*begin(std::declval<Container>()))>;
|
||||
|
||||
namespace Vectors
|
||||
{
|
||||
template<class Container, class T = ElementT<Container>>
|
||||
void concatenate(std::vector<T>* augend, const Container& addend)
|
||||
{
|
||||
augend->insert(augend->end(), addend.begin(), addend.end());
|
||||
}
|
||||
}
|
||||
|
||||
template<class Cont, class Func>
|
||||
using FmapOut = decltype(std::declval<Func>()(*begin(std::declval<Cont>())));
|
||||
|
||||
@ -56,20 +69,21 @@ namespace vcpkg::Util
|
||||
}
|
||||
|
||||
template<class Container, class V>
|
||||
auto find(const Container& cont, V&& v)
|
||||
auto find(Container&& cont, V&& v)
|
||||
{
|
||||
return std::find(cont.cbegin(), cont.cend(), v);
|
||||
using std::begin;
|
||||
using std::end;
|
||||
return std::find(begin(cont), end(cont), v);
|
||||
}
|
||||
|
||||
template<class Container, class Pred>
|
||||
auto find_if(const Container& cont, Pred pred)
|
||||
auto find_if(Container&& cont, Pred pred)
|
||||
{
|
||||
return std::find_if(cont.cbegin(), cont.cend(), pred);
|
||||
using std::begin;
|
||||
using std::end;
|
||||
return std::find_if(begin(cont), end(cont), pred);
|
||||
}
|
||||
|
||||
template<class Container>
|
||||
using ElementT = std::remove_reference_t<decltype(*begin(std::declval<Container>()))>;
|
||||
|
||||
template<class Container, class T = ElementT<Container>>
|
||||
std::vector<T*> element_pointers(Container&& cont)
|
||||
{
|
||||
@ -77,13 +91,15 @@ namespace vcpkg::Util
|
||||
}
|
||||
|
||||
template<class Container, class Pred>
|
||||
auto find_if_not(const Container& cont, Pred pred)
|
||||
auto find_if_not(Container&& cont, Pred pred)
|
||||
{
|
||||
return std::find_if_not(cont.cbegin(), cont.cend(), pred);
|
||||
using std::begin;
|
||||
using std::end;
|
||||
return std::find_if_not(begin(cont), end(cont), pred);
|
||||
}
|
||||
|
||||
template<class K, class V, class Container, class Func>
|
||||
void group_by(const Container& cont, std::map<K, std::vector<const V*>>* output, Func f)
|
||||
void group_by(const Container& cont, std::map<K, std::vector<const V*>>* output, Func&& f)
|
||||
{
|
||||
for (const V& element : cont)
|
||||
{
|
||||
@ -92,6 +108,12 @@ namespace vcpkg::Util
|
||||
}
|
||||
}
|
||||
|
||||
template<class AssocContainer, class K = std::decay_t<decltype(begin(std::declval<AssocContainer>())->first)>>
|
||||
std::vector<K> extract_keys(AssocContainer&& input_map)
|
||||
{
|
||||
return fmap(input_map, [](auto&& p) { return p.first; });
|
||||
}
|
||||
|
||||
struct MoveOnlyBase
|
||||
{
|
||||
MoveOnlyBase() = default;
|
||||
@ -141,4 +163,4 @@ namespace vcpkg::Util
|
||||
std::unique_lock<std::mutex> m_lock;
|
||||
T& m_ptr;
|
||||
};
|
||||
}
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "PackageSpec.h"
|
||||
#include "SourceParagraph.h"
|
||||
#include <vcpkg/packagespec.h>
|
||||
#include <vcpkg/sourceparagraph.h>
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
namespace vcpkg
|
@ -1,11 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "CStringView.h"
|
||||
#include "PackageSpec.h"
|
||||
#include "StatusParagraphs.h"
|
||||
#include "VcpkgPaths.h"
|
||||
#include "vcpkg_Files.h"
|
||||
#include "vcpkg_optional.h"
|
||||
#include <vcpkg/packagespec.h>
|
||||
#include <vcpkg/statusparagraphs.h>
|
||||
#include <vcpkg/triplet.h>
|
||||
#include <vcpkg/vcpkgcmdarguments.h>
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
||||
#include <vcpkg/base/cstringview.h>
|
||||
#include <vcpkg/base/files.h>
|
||||
#include <vcpkg/base/optional.h>
|
||||
|
||||
#include <array>
|
||||
#include <map>
|
||||
@ -13,6 +16,16 @@
|
||||
|
||||
namespace vcpkg::Build
|
||||
{
|
||||
namespace Command
|
||||
{
|
||||
void perform_and_exit(const FullPackageSpec& full_spec,
|
||||
const fs::path& port_dir,
|
||||
const std::unordered_set<std::string>& options,
|
||||
const VcpkgPaths& paths);
|
||||
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
|
||||
}
|
||||
|
||||
enum class UseHeadVersion
|
||||
{
|
||||
NO = 0,
|
||||
@ -83,7 +96,7 @@ namespace vcpkg::Build
|
||||
Optional<fs::path> visual_studio_path;
|
||||
};
|
||||
|
||||
std::wstring make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset);
|
||||
std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset);
|
||||
|
||||
struct ExtendedBuildResult
|
||||
{
|
135
toolsrc/include/vcpkg/commands.h
Normal file
135
toolsrc/include/vcpkg/commands.h
Normal file
@ -0,0 +1,135 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/build.h>
|
||||
#include <vcpkg/dependencies.h>
|
||||
#include <vcpkg/statusparagraphs.h>
|
||||
#include <vcpkg/vcpkgcmdarguments.h>
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace vcpkg::Commands
|
||||
{
|
||||
using CommandTypeA = void (*)(const VcpkgCmdArguments& args,
|
||||
const VcpkgPaths& paths,
|
||||
const Triplet& default_triplet);
|
||||
using CommandTypeB = void (*)(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
|
||||
using CommandTypeC = void (*)(const VcpkgCmdArguments& args);
|
||||
|
||||
namespace BuildExternal
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
|
||||
}
|
||||
|
||||
namespace CI
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
|
||||
}
|
||||
|
||||
namespace Env
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
|
||||
}
|
||||
|
||||
namespace Create
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
|
||||
}
|
||||
|
||||
namespace Edit
|
||||
{
|
||||
extern const CommandStructure COMMAND_STRUCTURE;
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
|
||||
}
|
||||
|
||||
namespace DependInfo
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
|
||||
}
|
||||
|
||||
namespace Search
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
|
||||
}
|
||||
|
||||
namespace List
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
|
||||
}
|
||||
|
||||
namespace Owns
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
|
||||
}
|
||||
|
||||
namespace Cache
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
|
||||
}
|
||||
|
||||
namespace Import
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
|
||||
}
|
||||
|
||||
namespace Integrate
|
||||
{
|
||||
extern const char* const INTEGRATE_COMMAND_HELPSTRING;
|
||||
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
|
||||
}
|
||||
|
||||
namespace PortsDiff
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
|
||||
}
|
||||
|
||||
namespace Autocomplete
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
|
||||
}
|
||||
|
||||
namespace Version
|
||||
{
|
||||
const std::string& version();
|
||||
void warn_if_vcpkg_version_mismatch(const VcpkgPaths& paths);
|
||||
void perform_and_exit(const VcpkgCmdArguments& args);
|
||||
}
|
||||
|
||||
namespace Contact
|
||||
{
|
||||
const std::string& email();
|
||||
void perform_and_exit(const VcpkgCmdArguments& args);
|
||||
}
|
||||
|
||||
namespace Hash
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
struct PackageNameAndFunction
|
||||
{
|
||||
std::string name;
|
||||
T function;
|
||||
};
|
||||
|
||||
Span<const PackageNameAndFunction<CommandTypeA>> get_available_commands_type_a();
|
||||
Span<const PackageNameAndFunction<CommandTypeB>> get_available_commands_type_b();
|
||||
Span<const PackageNameAndFunction<CommandTypeC>> get_available_commands_type_c();
|
||||
|
||||
template<typename T>
|
||||
T find(const std::string& command_name, const std::vector<PackageNameAndFunction<T>> available_commands)
|
||||
{
|
||||
for (const PackageNameAndFunction<T>& cmd : available_commands)
|
||||
{
|
||||
if (cmd.name == command_name)
|
||||
{
|
||||
return cmd.function;
|
||||
}
|
||||
}
|
||||
|
||||
// not found
|
||||
return nullptr;
|
||||
}
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
#pragma once
|
||||
#include "PackageSpec.h"
|
||||
#include "StatusParagraphs.h"
|
||||
#include "VcpkgPaths.h"
|
||||
#include "vcpkg_Graphs.h"
|
||||
#include "vcpkg_Util.h"
|
||||
#include "vcpkg_optional.h"
|
||||
|
||||
#include <vcpkg/base/graphs.h>
|
||||
#include <vcpkg/base/optional.h>
|
||||
#include <vcpkg/base/util.h>
|
||||
#include <vcpkg/packagespec.h>
|
||||
#include <vcpkg/statusparagraphs.h>
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace vcpkg::Dependencies
|
||||
@ -113,7 +115,10 @@ namespace vcpkg::Dependencies
|
||||
RequestType request_type;
|
||||
};
|
||||
|
||||
__interface PortFileProvider { virtual const SourceControlFile& get_control_file(const std::string& spec) const; };
|
||||
struct PortFileProvider
|
||||
{
|
||||
virtual const SourceControlFile& get_control_file(const std::string& spec) const = 0;
|
||||
};
|
||||
|
||||
struct MapPortFile : Util::ResourceBase, PortFileProvider
|
||||
{
|
10
toolsrc/include/vcpkg/export.h
Normal file
10
toolsrc/include/vcpkg/export.h
Normal file
@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
||||
namespace vcpkg::Export
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
|
||||
|
||||
void export_integration_files(const fs::path& raw_exported_dir_path, const VcpkgPaths& paths);
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "VcpkgPaths.h"
|
||||
#include "vcpkg_Dependencies.h"
|
||||
#include "vcpkg_Files.h"
|
||||
#include <vcpkg/dependencies.h>
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
||||
#include <vcpkg/base/files.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace vcpkg::Commands::Export::IFW
|
||||
namespace vcpkg::Export::IFW
|
||||
{
|
||||
struct Options
|
||||
{
|
@ -1,15 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <vcpkg/base/chrono.h>
|
||||
#include <vcpkg/base/util.h>
|
||||
|
||||
#include "vcpkg_Chrono.h"
|
||||
#include "vcpkg_Util.h"
|
||||
#include <atomic>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
struct GlobalState
|
||||
{
|
||||
static Util::LockGuarded<ElapsedTime> timer;
|
||||
static Util::LockGuarded<Chrono::ElapsedTime> timer;
|
||||
static std::atomic<bool> debugging;
|
||||
static std::atomic<bool> feature_packages;
|
||||
|
19
toolsrc/include/vcpkg/help.h
Normal file
19
toolsrc/include/vcpkg/help.h
Normal file
@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/vcpkgcmdarguments.h>
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace vcpkg::Help
|
||||
{
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths);
|
||||
|
||||
void help_topic_valid_triplet(const VcpkgPaths& paths);
|
||||
|
||||
void print_usage();
|
||||
|
||||
void print_example(const std::string& command_and_arguments);
|
||||
|
||||
std::string create_example_string(const std::string& command_and_arguments);
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "PackageSpec.h"
|
||||
|
||||
#include <vcpkg/packagespec.h>
|
||||
|
||||
namespace vcpkg::Input
|
||||
{
|
71
toolsrc/include/vcpkg/install.h
Normal file
71
toolsrc/include/vcpkg/install.h
Normal file
@ -0,0 +1,71 @@
|
||||
#pragma once
|
||||
|
||||
#include <vcpkg/build.h>
|
||||
#include <vcpkg/dependencies.h>
|
||||
#include <vcpkg/vcpkgcmdarguments.h>
|
||||
#include <vcpkg/vcpkgpaths.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace vcpkg::Install
|
||||
{
|
||||
enum class KeepGoing
|
||||
{
|
||||
NO = 0,
|
||||
YES
|
||||
};
|
||||
|
||||
inline KeepGoing to_keep_going(const bool value) { return value ? KeepGoing::YES : KeepGoing::NO; }
|
||||
|
||||
enum class PrintSummary
|
||||
{
|
||||
NO = 0,
|
||||
YES
|
||||
};
|
||||
|
||||
inline PrintSummary to_print_summary(const bool value) { return value ? PrintSummary::YES : PrintSummary::NO; }
|
||||
|
||||
struct InstallDir
|
||||
{
|
||||
static InstallDir from_destination_root(const fs::path& destination_root,
|
||||
const std::string& destination_subdirectory,
|
||||
const fs::path& listfile);
|
||||
|
||||
private:
|
||||
fs::path m_destination;
|
||||
std::string m_destination_subdirectory;
|
||||
fs::path m_listfile;
|
||||
|
||||
public:
|
||||
const fs::path& destination() const;
|
||||
const std::string& destination_subdirectory() const;
|
||||
const fs::path& listfile() const;
|
||||
};
|
||||
|
||||
Build::BuildResult perform_install_plan_action(const VcpkgPaths& paths,
|
||||
const Dependencies::InstallPlanAction& action,
|
||||
const Build::BuildPackageOptions& install_plan_options,
|
||||
StatusParagraphs& status_db);
|
||||
|
||||
enum class InstallResult
|
||||
{
|
||||
FILE_CONFLICTS,
|
||||
SUCCESS,
|
||||
};
|
||||
|
||||
void install_files_and_write_listfile(Files::Filesystem& fs, const fs::path& source_dir, const InstallDir& dirs);
|
||||
InstallResult install_package(const VcpkgPaths& paths,
|
||||
const BinaryControlFile& binary_paragraph,
|
||||
StatusParagraphs* status_db);
|
||||
|
||||
void perform_and_exit_ex(const std::vector<Dependencies::AnyAction>& action_plan,
|
||||
const Build::BuildPackageOptions& install_plan_options,
|
||||
const KeepGoing keep_going,
|
||||
const PrintSummary print_summary,
|
||||
const VcpkgPaths& paths,
|
||||
StatusParagraphs& status_db);
|
||||
|
||||
extern const CommandStructure COMMAND_STRUCTURE;
|
||||
|
||||
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vcpkg/base/util.h>
|
||||
|
||||
#include "vcpkg_Util.h"
|
||||
#include <string>
|
||||
|
||||
namespace vcpkg::Metrics
|
||||
{
|
||||
@ -15,7 +15,6 @@ namespace vcpkg::Metrics
|
||||
|
||||
void track_metric(const std::string& name, double value);
|
||||
void track_property(const std::string& name, const std::string& value);
|
||||
void track_property(const std::string& name, const std::wstring& value);
|
||||
|
||||
void upload(const std::string& payload);
|
||||
void flush();
|
||||
@ -23,6 +22,6 @@ namespace vcpkg::Metrics
|
||||
|
||||
extern Util::LockGuarded<Metrics> g_metrics;
|
||||
|
||||
std::wstring get_SQM_user();
|
||||
std::string get_SQM_user();
|
||||
bool get_compiled_metrics_enabled();
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "PackageSpecParseResult.h"
|
||||
#include "Triplet.h"
|
||||
#include "vcpkg_expected.h"
|
||||
#include <vcpkg/base/expected.h>
|
||||
#include <vcpkg/packagespecparseresult.h>
|
||||
#include <vcpkg/triplet.h>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
@ -76,20 +76,23 @@ namespace vcpkg
|
||||
bool operator!=(const PackageSpec& left, const PackageSpec& right);
|
||||
}
|
||||
|
||||
template<>
|
||||
struct std::hash<vcpkg::PackageSpec>
|
||||
namespace std
|
||||
{
|
||||
size_t operator()(const vcpkg::PackageSpec& value) const
|
||||
template<>
|
||||
struct hash<vcpkg::PackageSpec>
|
||||
{
|
||||
size_t hash = 17;
|
||||
hash = hash * 31 + std::hash<std::string>()(value.name());
|
||||
hash = hash * 31 + std::hash<vcpkg::Triplet>()(value.triplet());
|
||||
return hash;
|
||||
}
|
||||
};
|
||||
size_t operator()(const vcpkg::PackageSpec& value) const
|
||||
{
|
||||
size_t hash = 17;
|
||||
hash = hash * 31 + std::hash<std::string>()(value.name());
|
||||
hash = hash * 31 + std::hash<vcpkg::Triplet>()(value.triplet());
|
||||
return hash;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct std::equal_to<vcpkg::PackageSpec>
|
||||
{
|
||||
bool operator()(const vcpkg::PackageSpec& left, const vcpkg::PackageSpec& right) const { return left == right; }
|
||||
};
|
||||
template<>
|
||||
struct equal_to<vcpkg::PackageSpec>
|
||||
{
|
||||
bool operator()(const vcpkg::PackageSpec& left, const vcpkg::PackageSpec& right) const { return left == right; }
|
||||
};
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "vcpkg_expected.h"
|
||||
#include <vcpkg/base/cstringview.h>
|
||||
#include <vcpkg/base/expected.h>
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
@ -19,7 +20,7 @@ namespace vcpkg
|
||||
ErrorHolder() : m_err(PackageSpecParseResult::SUCCESS) {}
|
||||
ErrorHolder(PackageSpecParseResult err) : m_err(err) {}
|
||||
|
||||
constexpr bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; }
|
||||
bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; }
|
||||
|
||||
const PackageSpecParseResult& error() const { return m_err; }
|
||||
PackageSpecParseResult& error() { return m_err; }
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user