[many ports] Improve behavior on Linux and general cleanup

This commit is contained in:
Robert Schumacher 2018-03-11 23:41:51 -07:00
parent ece289b9a6
commit 9f9778ccff
65 changed files with 681 additions and 258 deletions

View File

@ -1,4 +1,4 @@
Source: avro-c
Version: 1.8.2
Version: 1.8.2-1
Description: Apache Avro is a data serialization system
Build-Depends: jansson, liblzma, zlib

View File

@ -16,9 +16,12 @@ vcpkg_apply_patches(
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/lang/c
PREFER_NINJA
OPTIONS
-DCMAKE_DISABLE_FIND_PACKAGE_Snappy=ON
)
vcpkg_install_cmake(DISABLE_PARALLEL)
vcpkg_install_cmake()
vcpkg_copy_pdbs()

View File

@ -5,12 +5,14 @@ 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)
else()
add_compile_options(-std=c++11)
endif()
find_package(JPEG REQUIRED)
find_package(PNG REQUIRED)
include_directories(".")
include_directories("." ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS})
add_library(butteraugli_lib butteraugli/butteraugli.cc)
@ -23,8 +25,8 @@ 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})
find_library(TURBO turbojpeg)
target_link_libraries(butteraugli butteraugli_lib ${JPEG_LIBRARIES} ${TURBO} ${PNG_LIBRARIES})
install (
TARGETS butteraugli

View File

@ -46,6 +46,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
endif()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE.txt
file(INSTALL ${SOURCE_PATH}/LICENSE.TXT
DESTINATION ${CURRENT_PACKAGES_DIR}/share/capstone
RENAME copyright)

View File

@ -1,3 +1,3 @@
Source: console-bridge
Version: 0.3.2-2
Version: 0.3.2-3
Description: a ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages.

View File

@ -1,31 +0,0 @@
Software License Agreement (BSD License)
Copyright (c) 2008, Willow Garage, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the Willow Garage nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

View File

@ -6,7 +6,12 @@ vcpkg_from_github(
REF 0.3.2
SHA512 41fa5340d7ba79c887ef73eb4fda7b438ed91febd224934ae4658697e4c9e43357207e1b3e191ecce3c97cb9a87b0556372832735a268261bc798cc7683aa207
HEAD_REF master
)
)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/static-macro.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
@ -16,9 +21,23 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake")
file(RENAME ${CURRENT_PACKAGES_DIR}/share/console-bridge ${CURRENT_PACKAGES_DIR}/share/console_bridge)
if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake)
vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake" TARGET_PATH share/console_bridge)
else()
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/console_bridge/cmake" TARGET_PATH share/console_bridge)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/console-bridge RENAME copyright)
file(READ ${SOURCE_PATH}/src/console.cpp _contents)
string(SUBSTRING "${_contents}" 0 2000 license)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/console-bridge)
file(WRITE ${CURRENT_PACKAGES_DIR}/share/console-bridge/copyright "${license}")
file(READ ${CURRENT_PACKAGES_DIR}/include/console_bridge/exportdecl.h _contents)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC" "if 1" _contents "${_contents}")
else()
string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC" "if 0" _contents "${_contents}")
endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/console_bridge/exportdecl.h "${_contents}")

View File

@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 604b2ab..e98b51c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,6 +37,10 @@ if(NOT DEFINED BUILD_SHARED_LIBS)
option(BUILD_SHARED_LIBS "Build dynamically-linked binaries" ON)
endif()
+if(NOT BUILD_SHARED_LIBS)
+ add_definitions(-DCONSOLE_BRIDGE_STATIC)
+endif()
+
add_library(${PROJECT_NAME} src/console.cpp)
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION
${CONSOLE_BRIDGE_MAJOR_VERSION}.${CONSOLE_BRIDGE_MINOR_VERSION})

View File

@ -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)
#
include(vcpkg_common_functions)
set(VERSION 1.14.0)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}/cppunit-${VERSION})

View File

@ -1,5 +1,5 @@
Source: curl
Version: 7.58.0-4
Version: 7.58.0-5
Build-Depends: zlib
Description: A library for transferring data with URLs
Default-Features: ssl

View File

@ -95,6 +95,12 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/curl)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/curl)
elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/curl)
vcpkg_fixup_cmake_targets(CONFIG_PATH share/curl)
endif()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

View File

@ -1,3 +1,8 @@
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
return()
endif()
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH

View File

@ -24,6 +24,7 @@ vcpkg_install_cmake()
# Rename exported target files into something vcpkg_fixup_cmake_targets expects
if(NOT VCPKG_USE_HEAD_VERSION)
if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake
${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionTargets-debug.cmake)
file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends-release.cmake
@ -44,9 +45,12 @@ if(NOT VCPKG_USE_HEAD_VERSION)
file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake "${CONFIG_FILE}")
vcpkg_fixup_cmake_targets(CONFIG_PATH CMake)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
else()
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion)
endif()
endif()
vcpkg_copy_pdbs()

View File

@ -25,12 +25,8 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "share/exiv2/cmake")
vcpkg_copy_pdbs()
# Clean
file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
file(REMOVE ${EXE})
file(REMOVE ${DEBUG_EXE})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${EXE} ${DEBUG_EXE})
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)

View File

@ -34,7 +34,9 @@ file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/sh
vcpkg_copy_pdbs()
# CMake's FindExpat currently doesn't look for expatd.lib
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/expat.lib)
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/expat.lib)
endif()
file(READ ${CURRENT_PACKAGES_DIR}/include/expat_external.h EXPAT_EXTERNAL_H)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")

View File

@ -1,4 +1,4 @@
Source: freetype
Version: 2.8.1-1
Version: 2.8.1-3
Build-Depends: zlib, bzip2, libpng
Description: A library to render fonts.

View File

@ -53,9 +53,12 @@ file(COPY
${SOURCE_PATH}/docs/LICENSE.TXT
${SOURCE_PATH}/docs/FTL.TXT
${SOURCE_PATH}/docs/GPLv2.TXT
${CMAKE_CURRENT_LIST_DIR}/usage
DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype
)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/freetype/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/freetype/copyright)
vcpkg_copy_pdbs()
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype)
endif()

View File

@ -0,0 +1,10 @@
_find_package(${ARGS})
find_package(ZLIB)
find_package(PNG)
find_package(BZip2)
if(TARGET Freetype::Freetype)
set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES BZip2::BZip2 PNG::PNG ZLIB::ZLIB)
endif()
if(FREETYPE_LIBRARIES)
list(APPEND FREETYPE_LIBRARIES ${BZIP2_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
endif()

View File

@ -1,10 +1,7 @@
# Common Ambient Variables:
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
# PORT is the current port name (zlib, etc)
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
#
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
return()
endif()
#Based on https://github.com/winlibs/gettext

View File

@ -30,6 +30,10 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gflags)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)

View File

@ -1,3 +1,3 @@
Source: jansson
Version: 2.11
Version: 2.11-2
Description: Jansson is a C library for encoding, decoding and manipulating JSON data

View File

@ -38,10 +38,12 @@ vcpkg_configure_cmake(
-DJANSSON_WITHOUT_TESTS=ON
-DJANSSON_BUILD_SHARED_LIBS=${JANSSON_BUILD_SHARED_LIBS}
-DUSE_WINDOWS_CRYPTOAPI=${USE_WINDOWS_CRYPTOAPI}
-DJANSSON_INSTALL_CMAKE_DIR:STRING=share/jansson
)
vcpkg_install_cmake(DISABLE_PARALLEL)
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/jansson)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jansson RENAME copyright)

View File

@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c432ba2..c67598f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -267,7 +267,9 @@ message("JAS_HAVE_LIBJPEG: ${JAS_HAVE_LIBJPEG}")
# Check for the OpenGL and GLUT libraries.
################################################################################
+if(JAS_ENABLE_OPENGL)
find_package(OpenGL ${JAS_REQUIRED})
+endif()
message("JAS_ENABLE_OPENGL: ${JAS_ENABLE_OPENGL}")
message("OpenGL library found: ${OPENGL_FOUND}")
if (JAS_ENABLE_OPENGL AND OPENGL_FOUND)

View File

@ -11,6 +11,7 @@ vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/jasper-fix-uwp.patch
${CMAKE_CURRENT_LIST_DIR}/opengl-not-required.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)

View File

@ -1,4 +1,4 @@
Source: leptonica
Version: 1.74.4-2
Version: 1.74.4-3
Description: An open source library containing software that is broadly useful for image processing and image analysis applications
Build-Depends: libjpeg-turbo, zlib, libpng, tiff, giflib

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e891aee..9f12295 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -125,7 +125,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_TARGET_ARCHITECTURE STREQUAL "x86_64")
list(APPEND LIBCDS_PUBLIC_CXX_FLAGS "-mcx16")
- set(LIB_SUFFIX "64")
+ set(LIB_SUFFIX "64" CACHE STRING "")
# GCC-7: 128-bit atomics support is implemented via libatomic on amd64
# see https://gcc.gnu.org/ml/gcc/2017-01/msg00167.html

View File

@ -10,7 +10,9 @@ vcpkg_from_github(
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake-install.patch
PATCHES
${CMAKE_CURRENT_LIST_DIR}/cmake-install.patch
${CMAKE_CURRENT_LIST_DIR}/lib-suffix-option.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DISABLE_INSTALL_STATIC)
@ -24,6 +26,7 @@ vcpkg_configure_cmake(
-DENABLE_STRESS_TEST=OFF
-DDISABLE_INSTALL_STATIC=${DISABLE_INSTALL_STATIC}
-DDISABLE_INSTALL_SHARED=${DISABLE_INSTALL_SHARED}
"-DLIB_SUFFIX="
)
vcpkg_install_cmake()

View File

@ -30,18 +30,29 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
add_definitions(-DLIBDIR -D_CRT_SECURE_NO_WARNINGS)
add_library(libcharset libcharset/lib/localcharset.c)
target_include_directories(libcharset PUBLIC $<INSTALL_INTERFACE:include>)
add_library(libiconv lib/iconv.c)
target_link_libraries(libiconv libcharset)
target_link_libraries(libiconv PRIVATE libcharset)
target_include_directories(libiconv PUBLIC $<INSTALL_INTERFACE:include>)
install(TARGETS libcharset libiconv
install(TARGETS libcharset libiconv EXPORT unofficial-iconv-targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install(FILES
if(NOT DISABLE_INSTALL_HEADERS)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/iconv.h
${CMAKE_CURRENT_BINARY_DIR}/localcharset.h
DESTINATION include
)
endif()
install(
EXPORT unofficial-iconv-targets
FILE unofficial-iconv-config.cmake
NAMESPACE unofficial::iconv::
DESTINATION share/unofficial-iconv
)

View File

@ -1,3 +1,3 @@
Source: libiconv
Version: 1.15-1
Version: 1.15-2
Description: GNU Unicode text conversion

View File

@ -1,3 +1,10 @@
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/libiconv)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-iconv-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libiconv)
return()
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libiconv-1.15)
vcpkg_download_distfile(ARCHIVE
@ -20,14 +27,15 @@ vcpkg_apply_patches(
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-iconv TARGET_PATH share/unofficial-iconv)
vcpkg_copy_pdbs()
# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libiconv)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libiconv/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/libiconv/copyright)
# clean out the debug include
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

View File

@ -0,0 +1,2 @@
add_library(unofficial::vcpkg::libcharset UNKNOWN IMPORTED)
add_library(unofficial::vcpkg::libiconv UNKNOWN IMPORTED)

View File

@ -2,9 +2,7 @@ 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)
find_package(unofficial-iconv REQUIRED)
set(CMAKE_DEBUG_POSTFIX "d")
@ -94,8 +92,8 @@ set(GL_SRC gl/rawmemchr.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})
target_include_directories(libidn2 PRIVATE . ./unistring ./gl)
target_link_libraries(libidn2 PRIVATE unofficial::iconv::libiconv unofficial::iconv::libcharset)
install(TARGETS libidn2
RUNTIME DESTINATION bin

View File

@ -35,6 +35,7 @@ simple_copy_template_header(${SOURCE_PATH}/unistring alloca)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()

View File

@ -0,0 +1,26 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c29e604..6e467be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,10 +29,6 @@ pad_number(VERSION_MINOR 3)
pad_number(VERSION_REVISION 3)
set(LIBJPEG_TURBO_VERSION_NUMBER ${VERSION_MAJOR}${VERSION_MINOR}${VERSION_REVISION})
-if(NOT WIN32)
- message(FATAL_ERROR "Platform not supported by this build system. Use autotools instead.")
-endif()
-
string(TIMESTAMP BUILD "%Y%m%d")
# This does nothing except when using MinGW. CMAKE_BUILD_TYPE has no meaning
@@ -166,8 +162,10 @@ endif()
if(64BIT)
message(STATUS "64-bit build")
+ add_compile_options(-DSIZEOF_SIZE_T=8)
else()
message(STATUS "32-bit build")
+ add_compile_options(-DSIZEOF_SIZE_T=4)
endif()
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)

View File

@ -10,9 +10,10 @@ vcpkg_from_github(
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-options-for-exes-docs-headers.patch"
"${CMAKE_CURRENT_LIST_DIR}/linux-cmake.patch"
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(LIBJPEGTURBO_SIMD -DWITH_SIMD=OFF)
else()
set(LIBJPEGTURBO_SIMD -DWITH_SIMD=ON)
@ -41,7 +42,7 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
# Rename libraries for static builds
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND EXISTS "${CURRENT_PACKAGES_DIR}/lib/jpeg-static.lib")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/lib/jpeg.lib")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/turbojpeg-static.lib" "${CURRENT_PACKAGES_DIR}/lib/turbojpeg.lib")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg.lib")

View File

@ -7,7 +7,59 @@ if(BUILD_SHARED_LIBS)
add_definitions(-DDLL_EXPORT)
endif()
include_directories(windows)
if(NOT MSVC)
add_definitions(-DHAVE_VISIBILITY=1)
endif()
if(WIN32)
include_directories(windows)
else()
include_directories(${CMAKE_CURRENT_BINARY_DIR})
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h
"""
#define TUKLIB_SYMBOL_PREFIX lzma_
#define ASSUME_RAM 128
#define HAVE_CHECK_CRC32 1
#define HAVE_CHECK_CRC64 1
#define HAVE_CHECK_SHA256 1
#define HAVE_DECODERS 1
#define HAVE_DECODER_ARM 1
#define HAVE_DECODER_ARMTHUMB 1
#define HAVE_DECODER_DELTA 1
#define HAVE_DECODER_IA64 1
#define HAVE_DECODER_LZMA1 1
#define HAVE_DECODER_LZMA2 1
#define HAVE_DECODER_POWERPC 1
#define HAVE_DECODER_SPARC 1
#define HAVE_DECODER_X86 1
#define HAVE_ENCODERS 1
#define HAVE_ENCODER_ARM 1
#define HAVE_ENCODER_ARMTHUMB 1
#define HAVE_ENCODER_DELTA 1
#define HAVE_ENCODER_IA64 1
#define HAVE_ENCODER_LZMA1 1
#define HAVE_ENCODER_LZMA2 1
#define HAVE_ENCODER_POWERPC 1
#define HAVE_ENCODER_SPARC 1
#define HAVE_ENCODER_X86 1
#define HAVE_INTTYPES_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MF_BT2 1
#define HAVE_MF_BT3 1
#define HAVE_MF_BT4 1
#define HAVE_MF_HC3 1
#define HAVE_MF_HC4 1
#define HAVE_STDBOOL_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_VISIBILITY 1
#define MYTHREAD_POSIX 1
#define PACKAGE_NAME \"XZ Utils\"
#define PACKAGE_URL \"http://tukaani.org/xz/\"
#define SIZEOF_SIZE_T (sizeof(size_t))
""")
endif()
include_directories(src/liblzma/common)
include_directories(src/common)
include_directories(src/liblzma/api)

View File

@ -1,4 +1,4 @@
Source: libpng
Version: 1.6.34-2
Version: 1.6.34-3
Build-Depends: zlib
Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files.

View File

@ -12,6 +12,7 @@ vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch
${CMAKE_CURRENT_LIST_DIR}/skip-install-symlink.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
@ -32,13 +33,14 @@ vcpkg_configure_cmake(
-DSKIP_INSTALL_PROGRAMS=ON
-DSKIP_INSTALL_EXECUTABLES=ON
-DSKIP_INSTALL_FILES=ON
-DSKIP_INSTALL_SYMLINK=ON
OPTIONS_DEBUG
-DSKIP_INSTALL_HEADERS=ON
)
vcpkg_install_cmake()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND EXISTS ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib)
endif()

View File

@ -0,0 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48c6fa2..589e5f9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -868,7 +868,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR})
- if(PNG_SHARED)
+ if(PNG_SHARED AND NOT SKIP_INSTALL_SYMLINK)
# Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin
if(CYGWIN OR MINGW)
CREATE_SYMLINK(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png)
@@ -881,7 +881,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
endif(NOT WIN32)
endif(PNG_SHARED)
- if(PNG_STATIC)
+ if(PNG_STATIC AND NOT SKIP_INSTALL_SYMLINK)
if(NOT WIN32 OR CYGWIN OR MINGW)
CREATE_SYMLINK( libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static)
install(FILES $<TARGET_LINKER_FILE_DIR:png_static>/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@ -1,7 +1,7 @@
include(vcpkg_common_functions)
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
message(FATAL_ERROR "Error: UWP builds are currently not supported.")
if (VCPKG_CMAKE_SYSTEM_NAME)
message(FATAL_ERROR "Error: only Windows Desktop builds are currently supported.")
endif()
set(LIBUSB_VERSION 1.2.6.0)

View File

@ -1,3 +1,3 @@
Source: libusb
Version: 1.0.21-fc99620
Description: A library for USB device access from Windows userspace.
Description: a cross-platform library to access USB devices

View File

@ -5,8 +5,10 @@ option(INSTALL_HEADERS "Install public header files" ON)
find_package(ZLIB REQUIRED)
find_package(LibLZMA REQUIRED)
find_library(ICONV NAMES libiconv)
find_library(ICONV_CHARSET NAMES libcharset)
if(WIN32)
find_library(ICONV NAMES libiconv)
find_library(ICONV_CHARSET NAMES libcharset)
endif()
set(SOURCES
buf.c
@ -79,17 +81,24 @@ target_include_directories(libxml2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} win32/vc1
target_link_libraries(libxml2 PRIVATE
ZLIB::ZLIB
${LIBLZMA_LIBRARIES}
)
if(WIN32)
target_link_libraries(libxml2 PRIVATE
${ICONV}
${ICONV_CHARSET}
wsock32.lib
ws2_32.lib
)
)
target_compile_definitions(libxml2 PRIVATE
-DHAVE_WIN32_THREADS
)
endif()
target_compile_definitions(libxml2 PRIVATE
-D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE
-D_REENTRANT
-DNOLIBTOOL
-DHAVE_WIN32_THREADS
-DHAVE_ZLIB_H
-DHAVE_LZMA_H
)

View File

@ -1,4 +1,4 @@
Source: libxml2
Version: 2.9.4-2
Version: 2.9.4-4
Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform)
Build-Depends: zlib, libiconv, liblzma

View File

@ -1,11 +1,3 @@
# Common Ambient Variables:
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
# PORT is the current port name (zlib, etc)
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
#
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxml2-2.9.4)
vcpkg_download_distfile(ARCHIVE
@ -30,3 +22,7 @@ file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxm
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libxml2/COPYING ${CURRENT_PACKAGES_DIR}/share/libxml2/copyright)
vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxml2)
endif()

View File

@ -0,0 +1,11 @@
_find_package(${ARGS})
if(LibXml2_FOUND AND (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore"))
find_package(LibLZMA)
list(APPEND LIBXML2_LIBRARIES
${LIBLZMA_LIBRARIES}
debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libiconv.lib
optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libiconv.lib
debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib
optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib
ws2_32)
endif()

View File

@ -0,0 +1,128 @@
cmake_minimum_required(VERSION 3.9)
project(openssl C)
if(NOT SOURCE_PATH)
message(FATAL_ERROR "Requires SOURCE_PATH")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
set(PLATFORM android)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
set(PLATFORM linux-generic64)
else()
set(PLATFORM linux-generic32)
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(PLATFORM darwin64-x86_64-cc)
else()
message(FATAL_ERROR "Unknown platform")
endif()
get_filename_component(COMPILER_ROOT "${CMAKE_C_COMPILER}" DIRECTORY)
message("CMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
message("COMPILER_ROOT=${COMPILER_ROOT}")
message("CMAKE_SYSROOT=${CMAKE_SYSROOT}")
message("CMAKE_C_FLAGS=${CMAKE_C_FLAGS}")
message("CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}")
message("CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}")
message("CMAKE_INCLUDE_SYSTEM_FLAG_C=${CMAKE_INCLUDE_SYSTEM_FLAG_C}")
set(CFLAGS "${CMAKE_C_FLAGS}")
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}")
endif()
if(CMAKE_C_COMPILER_TARGET)
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET} ${CMAKE_C_COMPILER_TARGET}")
endif()
if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN)
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} ${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}")
endif()
if(CMAKE_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT)
set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}")
endif()
file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT};$ENV{PATH}")
set(ENV{ANDROID_DEV} "${CMAKE_SYSROOT}/usr")
set(ENV{CC} "${CMAKE_C_COMPILER}")
message("ENV{ANDROID_DEV}=$ENV{ANDROID_DEV}")
get_filename_component(SOURCE_PATH_NAME "${SOURCE_PATH}" NAME)
set(BUILDDIR "${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_PATH_NAME}")
if(NOT EXISTS "${BUILDDIR}")
file(COPY ${SOURCE_PATH} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endif()
get_filename_component(MSYS_BIN_DIR "${MAKE}" DIRECTORY)
file(READ "${BUILDDIR}/Configure" _contents)
string(REPLACE "-mandroid" "" _contents "${_contents}")
file(WRITE "${BUILDDIR}/Configure" "${_contents}")
if(BUILD_SHARED_LIBS)
set(SHARED shared)
else()
set(SHARED no-shared)
endif()
if(CMAKE_HOST_WIN32)
set(ENV_COMMAND set)
set(PATH_VAR ";%PATH%")
else()
set(ENV_COMMAND export)
set(PATH_VAR ":$ENV{PATH}")
endif()
add_custom_command(
OUTPUT "${BUILDDIR}/Makefile"
COMMAND ${ENV_COMMAND} CC=${CMAKE_C_COMPILER}
COMMAND ${ENV_COMMAND} AR=${CMAKE_AR}
COMMAND ${ENV_COMMAND} LD=${CMAKE_LINKER}
COMMAND ${ENV_COMMAND} RANLIB=${CMAKE_RANLIB}
COMMAND ${ENV_COMMAND} MAKE=${MAKE}
COMMAND ${ENV_COMMAND} MAKEDEPPROG=${CMAKE_C_COMPILER}
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
COMMAND "${PERL}" Configure
${SHARED}
enable-static-engine
no-ssl2
no-krb5
no-idea
no-bf
no-cast
no-seed
no-md2
${PLATFORM}
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--openssldir=${CMAKE_INSTALL_PREFIX}"
${CFLAGS}
COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake"
VERBATIM
WORKING_DIRECTORY "${BUILDDIR}"
)
add_custom_target(depend
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
COMMAND "${MAKE}" links # depend MAKEDEPPROG=${CMAKE_C_COMPILER}
VERBATIM
WORKING_DIRECTORY "${BUILDDIR}"
DEPENDS "${BUILDDIR}/Makefile"
)
add_custom_target(build_libs ALL
COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h"
COMMAND "${MAKE}" build_libs
VERBATIM
WORKING_DIRECTORY "${BUILDDIR}"
DEPENDS depend
BYPRODUCTS "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a"
)
install(
FILES "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a"
DESTINATION lib
)

View File

@ -0,0 +1,30 @@
if(CMAKE_HOST_WIN32)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES make)
set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
set(MAKE ${MSYS_ROOT}/usr/bin/make.exe)
else()
find_program(MAKE make)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR}
PREFER_NINJA
OPTIONS
-DSOURCE_PATH=${MASTER_COPY_SOURCE_PATH}
-DPERL=${PERL}
-DMAKE=${MAKE}
OPTIONS_RELEASE
-DINSTALL_HEADERS=ON
)
vcpkg_install_cmake()
file(GLOB HEADERS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/include/openssl/*.h)
set(RESOLVED_HEADERS)
foreach(HEADER ${HEADERS})
get_filename_component(X "${HEADER}" REALPATH)
list(APPEND RESOLVED_HEADERS "${X}")
endforeach()
file(INSTALL ${RESOLVED_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/openssl)
file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright)

View File

@ -7,13 +7,16 @@ include(vcpkg_common_functions)
set(OPENSSL_VERSION 1.0.2n)
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION})
vcpkg_find_acquire_program(PERL)
vcpkg_find_acquire_program(NASM)
find_program(NMAKE nmake)
if(CMAKE_HOST_WIN32)
vcpkg_find_acquire_program(PERL)
vcpkg_find_acquire_program(NASM)
else()
find_program(PERL perl)
find_program(NASM nasm)
endif()
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
vcpkg_find_acquire_program(JOM)
set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH};${PERL_EXE_PATH}")
vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE
@ -31,6 +34,13 @@ vcpkg_apply_patches(
${CMAKE_CURRENT_LIST_DIR}/RemoveNonASCIIChar.patch
)
if(VCPKG_CMAKE_SYSTEM_NAME)
include(${CMAKE_CURRENT_LIST_DIR}/portfile-nonwindows.cmake)
return()
endif()
vcpkg_find_acquire_program(JOM)
set(CONFIGURE_COMMAND ${PERL} Configure
enable-static-engine
enable-capieng
@ -85,7 +95,7 @@ execute_process(
ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log
)
vcpkg_execute_required_process(
COMMAND ${NMAKE} -f ${OPENSSL_MAKEFILE} install
COMMAND ${JOM} -j 1 -f ${OPENSSL_MAKEFILE} install
WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
LOGNAME build-${TARGET_TRIPLET}-rel-1)
@ -118,7 +128,7 @@ execute_process(
ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log
)
vcpkg_execute_required_process(
COMMAND ${NMAKE} -f ${OPENSSL_MAKEFILE} install
COMMAND ${JOM} -j 1 -f ${OPENSSL_MAKEFILE} install
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
LOGNAME build-${TARGET_TRIPLET}-dbg-1)

View File

@ -0,0 +1,7 @@
file(GLOB_RECURSE MAKEFILES ${DIR}/*/Makefile)
foreach(MAKEFILE ${MAKEFILES})
message("removing deps from ${MAKEFILE}")
file(READ "${MAKEFILE}" _contents)
string(REGEX REPLACE "\n# DO NOT DELETE THIS LINE.*" "" _contents "${_contents}")
file(WRITE "${MAKEFILE}" "${_contents}")
endforeach()

View File

@ -1,4 +1,64 @@
cmake_minimum_required(VERSION 3.0)
project(pixman VERSION 0.32.0 LANGUAGES C CXX)
project(pixman VERSION 0.32.0 LANGUAGES C)
add_subdirectory(pixman)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(CMAKE_DEBUG_POSTFIX "d")
include_directories(".")
file(GLOB SOURCES
"pixman.c"
"pixman-access.c"
"pixman-access-accessors.c"
"pixman-bits-image.c"
"pixman-combine32.c"
"pixman-combine-float.c"
"pixman-conical-gradient.c"
"pixman-filter.c"
"pixman-x86.c"
"pixman-mips.c"
"pixman-arm.c"
"pixman-ppc.c"
"pixman-edge.c"
"pixman-edge-accessors.c"
"pixman-fast-path.c"
"pixman-glyph.c"
"pixman-general.c"
"pixman-gradient-walker.c"
"pixman-image.c"
"pixman-implementation.c"
"pixman-linear-gradient.c"
"pixman-matrix.c"
"pixman-noop.c"
"pixman-radial-gradient.c"
"pixman-region16.c"
"pixman-region32.c"
"pixman-solid-fill.c"
"pixman-timer.c"
"pixman-trap.c"
"pixman-utils.c"
"pixman-sse2.c"
)
add_library(pixman-1 ${SOURCES})
# pixman requires the three PACKAGE* definitions in order to compile. The USE_SSE2 definition lets it use SSE2 instructions for speed. Every target machine should have SSE2 these days.
target_compile_definitions(pixman-1
PUBLIC
PACKAGE="pixman-1"
PACKAGE_VERSION="0.34.0"
PACKAGE_BUGREPORT=""
PRIVATE
USE_SSE2
)
# pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files
if(MSVC)
target_compile_options(pixman-1 PRIVATE "/wd4244" "/wd4146" "/wd4996") # PUBLIC "/D_CRT_SECURE_NO_WARNINGS"
endif()
install(TARGETS pixman-1
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

View File

@ -1,53 +0,0 @@
# Add include directories
include_directories(".")
FILE(GLOB SOURCES
"pixman.c"
"pixman-access.c"
"pixman-access-accessors.c"
"pixman-bits-image.c"
"pixman-combine32.c"
"pixman-combine-float.c"
"pixman-conical-gradient.c"
"pixman-filter.c"
"pixman-x86.c"
"pixman-mips.c"
"pixman-arm.c"
"pixman-ppc.c"
"pixman-edge.c"
"pixman-edge-accessors.c"
"pixman-fast-path.c"
"pixman-glyph.c"
"pixman-general.c"
"pixman-gradient-walker.c"
"pixman-image.c"
"pixman-implementation.c"
"pixman-linear-gradient.c"
"pixman-matrix.c"
"pixman-noop.c"
"pixman-radial-gradient.c"
"pixman-region16.c"
"pixman-region32.c"
"pixman-solid-fill.c"
"pixman-timer.c"
"pixman-trap.c"
"pixman-utils.c"
"pixman-sse2.c"
)
set(CMAKE_DEBUG_POSTFIX "d")
add_library(pixman-1 ${SOURCES})
# pixman requires the three PACKAGE* definitions in order to compile. The USE_SSE2 definition lets it use SSE2 instructions for speed. Every target machine should have SSE2 these days.
target_compile_definitions(pixman-1 PUBLIC PACKAGE="pixman-1" PUBLIC PACKAGE_VERSION="0.34.0" PUBLIC PACKAGE_BUGREPORT="" PUBLIC USE_SSE2)
# pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files
target_compile_options(pixman-1 PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4996") # PUBLIC "/D_CRT_SECURE_NO_WARNINGS"
# The LIBRARY DESTINATION here is lib rather than bin because pixman must always be compiled as a static library since it has no exports.
install(TARGETS pixman-1
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

View File

@ -1,11 +1,3 @@
# Common Ambient Variables:
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
# PORT is the current port name (zlib, etc)
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
#
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pixman-0.34.0)
@ -17,29 +9,26 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_pixman.txt DESTINATION ${SOURCE_PATH}/pixman)
file(RENAME ${SOURCE_PATH}/pixman/CMakeLists_pixman.txt ${SOURCE_PATH}/pixman/CMakeLists.txt)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/pixman)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
SOURCE_PATH ${SOURCE_PATH}/pixman
PREFER_NINJA
)
vcpkg_install_cmake()
# Copy the appropriate header files.
file(COPY
"${SOURCE_PATH}/pixman/pixman.h"
"${SOURCE_PATH}/pixman/pixman-accessor.h"
"${SOURCE_PATH}/pixman/pixman-combine32.h"
"${SOURCE_PATH}/pixman/pixman-compiler.h"
"${SOURCE_PATH}/pixman/pixman-edge-imp.h"
"${SOURCE_PATH}/pixman/pixman-inlines.h"
"${SOURCE_PATH}/pixman/pixman-private.h"
"${SOURCE_PATH}/pixman/pixman-version.h"
DESTINATION
${CURRENT_PACKAGES_DIR}/include
"${SOURCE_PATH}/pixman/pixman.h"
"${SOURCE_PATH}/pixman/pixman-accessor.h"
"${SOURCE_PATH}/pixman/pixman-combine32.h"
"${SOURCE_PATH}/pixman/pixman-compiler.h"
"${SOURCE_PATH}/pixman/pixman-edge-imp.h"
"${SOURCE_PATH}/pixman/pixman-inlines.h"
"${SOURCE_PATH}/pixman/pixman-private.h"
"${SOURCE_PATH}/pixman/pixman-version.h"
DESTINATION ${CURRENT_PACKAGES_DIR}/include
)
# Handle copyright

View File

@ -1,5 +1,5 @@
Source: protobuf
Version: 3.5.1
Version: 3.5.1-1
Description: Protocol Buffers - Google's data interchange format
Feature: zlib

View File

@ -0,0 +1,25 @@
diff --git a/cmake/libprotoc.cmake b/cmake/libprotoc.cmake
index 107c1c5..233bcf6 100644
--- a/cmake/libprotoc.cmake
+++ b/cmake/libprotoc.cmake
@@ -73,7 +73,7 @@ set(libprotoc_files
${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_message_field.cc
${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc
${protobuf_source_dir}/src/google/protobuf/compiler/js/js_generator.cc
- ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
+ ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
@@ -210,9 +210,9 @@ set(js_well_known_types_sources
)
add_executable(js_embed ${protobuf_source_dir}/src/google/protobuf/compiler/js/embed.cc)
add_custom_command(
- OUTPUT ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc
DEPENDS js_embed ${js_well_known_types_sources}
- COMMAND js_embed ${js_well_known_types_sources} > ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
+ COMMAND "$<TARGET_FILE:js_embed>" ${js_well_known_types_sources} > ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc
)
add_library(libprotoc ${protobuf_SHARED_OR_STATIC}

View File

@ -8,14 +8,7 @@ vcpkg_download_distfile(ARCHIVE_FILE
FILENAME "protobuf-cpp-${PROTOBUF_VERSION}.tar.gz"
SHA512 195ccb210229e0a1080dcdb0a1d87b2e421ad55f6b036c56db3183bd50a942c75b4cc84e6af8a10ad88022a247781a06f609a145a461dfbb8f04051b7dd714b3
)
vcpkg_download_distfile(TOOL_ARCHIVE_FILE
URLS "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-win32.zip"
FILENAME "protoc-${PROTOC_VERSION}-win32.zip"
SHA512 27b1b82e92d82c35158362435a29f590961b91f68cda21bffe46e52271340ea4587c4e3177668809af0d053b61e6efa69f0f62156ea11393cd9e6eb4474a3049
)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION})
set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
@ -25,19 +18,29 @@ vcpkg_apply_patches(
PATCHES
"${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch"
"${CMAKE_CURRENT_LIST_DIR}/export-ParseGeneratorParameter.patch"
"${CMAKE_CURRENT_LIST_DIR}/js-embed.patch"
)
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32)
vcpkg_download_distfile(TOOL_ARCHIVE_FILE
URLS "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-win32.zip"
FILENAME "protoc-${PROTOC_VERSION}-win32.zip"
SHA512 27b1b82e92d82c35158362435a29f590961b91f68cda21bffe46e52271340ea4587c4e3177668809af0d053b61e6efa69f0f62156ea11393cd9e6eb4474a3049
)
vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${TOOL_PATH})
endif()
vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${TOOL_PATH})
# Disable the protobuf compiler when targeting UWP
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME)
set(protobuf_BUILD_COMPILER OFF)
else()
set(protobuf_BUILD_COMPILER ON)
endif()
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(protobuf_BUILD_SHARED_LIBS ON)
else()
set(protobuf_BUILD_SHARED_LIBS OFF)
@ -57,6 +60,7 @@ endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/cmake
PREFER_NINJA
OPTIONS
-Dprotobuf_BUILD_SHARED_LIBS=${protobuf_BUILD_SHARED_LIBS}
-Dprotobuf_MSVC_STATIC_RUNTIME=${protobuf_MSVC_STATIC_RUNTIME}
@ -92,7 +96,7 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-debug.cmake "
protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/share)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin)
protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin)
else()
@ -107,5 +111,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
endif()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/protobuf RENAME copyright)
file(INSTALL ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
file(INSTALL ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
endif()
vcpkg_copy_pdbs()

View File

@ -1,6 +1,10 @@
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "${PORT} does not currently support UWP")
endif()
if(VCPKG_CMAKE_SYSTEM_NAME)
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
return()
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pthreads-w32-2-9-1-release)

View File

@ -1,3 +1,3 @@
Source: sdl2
Version: 2.0.8
Version: 2.0.8-1
Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.

View File

@ -32,11 +32,32 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake")
vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake")
elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/SDL2")
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/SDL2")
elseif(EXISTS "${CURRENT_PACKAGES_DIR}/SDL2.framework/Resources")
vcpkg_fixup_cmake_targets(CONFIG_PATH "SDL2.framework/Resources")
endif()
vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake")
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
${CURRENT_PACKAGES_DIR}/bin/sdl2-config
${CURRENT_PACKAGES_DIR}/debug/bin/sdl2-config
${CURRENT_PACKAGES_DIR}/SDL2.framework
${CURRENT_PACKAGES_DIR}/debug/SDL2.framework
)
if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
file(GLOB BINS ${CURRENT_PACKAGES_DIR}/debug/bin/* ${CURRENT_PACKAGES_DIR}/bin/*)
if(NOT BINS)
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/bin
${CURRENT_PACKAGES_DIR}/debug/bin
)
endif()
if(NOT VCPKG_CMAKE_SYSTEM_NAME)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDL2main.lib)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDL2maind.lib)

View File

@ -10,7 +10,7 @@ endif()
add_library(sqlite3 sqlite3.c)
target_compile_definitions(sqlite3 PRIVATE
$<$<CONFIG:Debug>:-DSQLITE_DEBUG>
$<$<CONFIG:Debug>:SQLITE_DEBUG>
${API}
-DSQLITE_ENABLE_RTREE
-DSQLITE_ENABLE_UNLOCK_NOTIFY

View File

@ -26,11 +26,9 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(RENAME ${CURRENT_PACKAGES_DIR}/share/szip/data/COPYING ${CURRENT_PACKAGES_DIR}/share/szip/copyright)
vcpkg_fixup_cmake_targets(CONFIG_PATH share/szip)
file(READ ${CURRENT_PACKAGES_DIR}/debug/share/szip/szip-targets-debug.cmake SZIP_TARGETS_DEBUG_MODULE)
string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" SZIP_TARGETS_DEBUG_MODULE "${SZIP_TARGETS_DEBUG_MODULE}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/szip/szip-targets-debug.cmake "${SZIP_TARGETS_DEBUG_MODULE}")
file(RENAME ${CURRENT_PACKAGES_DIR}/share/szip/data/COPYING ${CURRENT_PACKAGES_DIR}/share/szip/copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

View File

@ -44,4 +44,4 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/telnetpp/telnetpp-config-debug.cmake "$
vcpkg_copy_pdbs()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp RENAME COPYRIGHT)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp RENAME copyright)

View File

@ -1,3 +1,3 @@
Source: tinyxml2
Version: 6.0.0
Version: 6.0.0-2
Description: A simple, small, efficient, C++ XML parser

View File

@ -29,6 +29,9 @@ vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
# Handle copyright
file(COPY ${SOURCE_PATH}/readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml2)
file(COPY
${SOURCE_PATH}/readme.md
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml2
)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinyxml2/readme.md ${CURRENT_PACKAGES_DIR}/share/tinyxml2/copyright)

View File

@ -0,0 +1,5 @@
_find_package(${ARGS})
if(TARGET tinyxml2_static AND NOT TARGET tinyxml2)
_add_library(tinyxml2 INTERFACE IMPORTED)
set_target_properties(tinyxml2 PROPERTIES INTERFACE_LINK_LIBRARIES "tinyxml2_static")
endif()

View File

@ -1,11 +1,3 @@
# Common Ambient Variables:
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
# PORT is the current port name (zlib, etc)
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
#
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
set(VCPKG_LIBRARY_LINKAGE static)
@ -13,6 +5,9 @@ endif()
if (VCPKG_CRT_LINKAGE STREQUAL static)
message(FATAL_ERROR "UVAtlas does not currently support static crt linkage")
endif()
if(VCPKG_CMAKE_SYSTEM_NAME)
message(FATAL_ERROR "UVAtlas only supports Windows Desktop")
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/UVAtlas-sept2016)
@ -23,7 +18,7 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
IF (TRIPLET_SYSTEM_ARCH MATCHES "x86")
IF(TRIPLET_SYSTEM_ARCH MATCHES "x86")
SET(BUILD_ARCH "Win32")
ELSE()
SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})