mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-24 11:37:12 +01:00
Merge branch 'master' of https://github.com/Microsoft/vcpkg into qca
This commit is contained in:
commit
9e61116321
26
CHANGELOG.md
26
CHANGELOG.md
@ -1,3 +1,29 @@
|
||||
vcpkg (0.0.61)
|
||||
--------------
|
||||
* Add ports:
|
||||
- cairo 1.14.6
|
||||
- clockutils 1.1.1
|
||||
- directxtk oct2016-1
|
||||
- directxtk12 oct2016
|
||||
- glslang 1c573fbcfba6b3d631008b1babc838501ca925d3
|
||||
- libodb-pgsql 2.4.0
|
||||
- pixman 0.34.0
|
||||
- proj 4.9.3
|
||||
- zstd 1.1.1
|
||||
* Update ports:
|
||||
- chakracore 1.3.0 -> 1.3.1
|
||||
- curl 7.51.0 -> 7.51.0-1
|
||||
- dxut 11.14 -> 11.14-2
|
||||
- fmt 3.0.1 -> 3.0.1-1
|
||||
- freetype 2.6.3-1 -> 2.6.3-2
|
||||
- rxcpp 2.3.0 -> 3.0.0
|
||||
- think-cell-range 1d785d9 -> e2d3018
|
||||
- tiff 4.0.6 -> 4.0.6-1
|
||||
* Fixes and improvements in existing portfiles and the `vcpkg` tool itself
|
||||
|
||||
-- vcpkg team <vcpkg@microsoft.com> MON, 28 Nov 2016 18:30:00 -0800
|
||||
|
||||
|
||||
vcpkg (0.0.60)
|
||||
--------------
|
||||
* Add ports:
|
||||
|
3
ports/cairo/CMakeLists.txt
Normal file
3
ports/cairo/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(cairo VERSION 1.14.6 LANGUAGES C CXX)
|
||||
add_subdirectory(src)
|
250
ports/cairo/CMakeLists_cairo.txt
Normal file
250
ports/cairo/CMakeLists_cairo.txt
Normal file
@ -0,0 +1,250 @@
|
||||
set(CURRENT_INSTALLED_DIR ${CMAKE_PREFIX_PATH})
|
||||
|
||||
# Add include directories
|
||||
include_directories("." "./win32" "${CURRENT_INSTALLED_DIR}/include")
|
||||
|
||||
file(GLOB SOURCES
|
||||
"cairo-analysis-surface.c"
|
||||
"cairo-arc.c"
|
||||
"cairo-array.c"
|
||||
"cairo-atomic.c"
|
||||
"cairo-base64-stream.c"
|
||||
"cairo-base85-stream.c"
|
||||
"cairo-bentley-ottmann.c"
|
||||
"cairo-bentley-ottmann-rectangular.c"
|
||||
"cairo-bentley-ottmann-rectilinear.c"
|
||||
"cairo-botor-scan-converter.c"
|
||||
"cairo-boxes.c"
|
||||
"cairo-boxes-intersect.c"
|
||||
"cairo.c"
|
||||
"cairo-cache.c"
|
||||
"cairo-clip.c"
|
||||
"cairo-clip-boxes.c"
|
||||
"cairo-clip-polygon.c"
|
||||
"cairo-clip-region.c"
|
||||
"cairo-clip-surface.c"
|
||||
"cairo-color.c"
|
||||
"cairo-composite-rectangles.c"
|
||||
"cairo-compositor.c"
|
||||
"cairo-contour.c"
|
||||
"cairo-damage.c"
|
||||
"cairo-debug.c"
|
||||
"cairo-default-context.c"
|
||||
"cairo-device.c"
|
||||
"cairo-error.c"
|
||||
"cairo-fallback-compositor.c"
|
||||
"cairo-fixed.c"
|
||||
"cairo-font-face.c"
|
||||
"cairo-font-face-twin.c"
|
||||
"cairo-font-face-twin-data.c"
|
||||
"cairo-font-options.c"
|
||||
"cairo-freelist.c"
|
||||
"cairo-freed-pool.c"
|
||||
"cairo-gstate.c"
|
||||
"cairo-hash.c"
|
||||
"cairo-hull.c"
|
||||
"cairo-image-compositor.c"
|
||||
"cairo-image-info.c"
|
||||
"cairo-image-source.c"
|
||||
"cairo-image-surface.c"
|
||||
"cairo-line.c"
|
||||
"cairo-lzw.c"
|
||||
"cairo-matrix.c"
|
||||
"cairo-mask-compositor.c"
|
||||
"cairo-mesh-pattern-rasterizer.c"
|
||||
"cairo-mempool.c"
|
||||
"cairo-misc.c"
|
||||
"cairo-mono-scan-converter.c"
|
||||
"cairo-mutex.c"
|
||||
"cairo-no-compositor.c"
|
||||
"cairo-observer.c"
|
||||
"cairo-output-stream.c"
|
||||
"cairo-paginated-surface.c"
|
||||
"cairo-path-bounds.c"
|
||||
"cairo-path.c"
|
||||
"cairo-path-fill.c"
|
||||
"cairo-path-fixed.c"
|
||||
"cairo-path-in-fill.c"
|
||||
"cairo-path-stroke.c"
|
||||
"cairo-path-stroke-boxes.c"
|
||||
"cairo-path-stroke-polygon.c"
|
||||
"cairo-path-stroke-traps.c"
|
||||
"cairo-path-stroke-tristrip.c"
|
||||
"cairo-pattern.c"
|
||||
"cairo-pen.c"
|
||||
"cairo-polygon.c"
|
||||
"cairo-polygon-intersect.c"
|
||||
"cairo-polygon-reduce.c"
|
||||
"cairo-raster-source-pattern.c"
|
||||
"cairo-recording-surface.c"
|
||||
"cairo-rectangle.c"
|
||||
"cairo-rectangular-scan-converter.c"
|
||||
"cairo-region.c"
|
||||
"cairo-rtree.c"
|
||||
"cairo-scaled-font.c"
|
||||
"cairo-shape-mask-compositor.c"
|
||||
"cairo-slope.c"
|
||||
"cairo-spans.c"
|
||||
"cairo-spans-compositor.c"
|
||||
"cairo-spline.c"
|
||||
"cairo-stroke-dash.c"
|
||||
"cairo-stroke-style.c"
|
||||
"cairo-surface.c"
|
||||
"cairo-surface-clipper.c"
|
||||
"cairo-surface-fallback.c"
|
||||
"cairo-surface-observer.c"
|
||||
"cairo-surface-offset.c"
|
||||
"cairo-surface-snapshot.c"
|
||||
"cairo-surface-subsurface.c"
|
||||
"cairo-surface-wrapper.c"
|
||||
"cairo-time.c"
|
||||
"cairo-tor-scan-converter.c"
|
||||
"cairo-tor22-scan-converter.c"
|
||||
"cairo-clip-tor-scan-converter.c"
|
||||
"cairo-toy-font-face.c"
|
||||
"cairo-traps.c"
|
||||
"cairo-tristrip.c"
|
||||
"cairo-traps-compositor.c"
|
||||
"cairo-unicode.c"
|
||||
"cairo-user-font.c"
|
||||
"cairo-version.c"
|
||||
"cairo-wideint.c"
|
||||
# win32
|
||||
"win32/cairo-win32-debug.c"
|
||||
"win32/cairo-win32-device.c"
|
||||
"win32/cairo-win32-gdi-compositor.c"
|
||||
"win32/cairo-win32-system.c"
|
||||
"win32/cairo-win32-surface.c"
|
||||
"win32/cairo-win32-display-surface.c"
|
||||
"win32/cairo-win32-printing-surface.c"
|
||||
"win32/cairo-win32-font.c"
|
||||
# generic font support
|
||||
"cairo-cff-subset.c"
|
||||
"cairo-scaled-font-subsets.c"
|
||||
"cairo-truetype-subset.c"
|
||||
"cairo-type1-fallback.c"
|
||||
"cairo-type1-glyph-names.c"
|
||||
"cairo-type1-subset.c"
|
||||
"cairo-type3-glyph-surface.c"
|
||||
# pdf
|
||||
"cairo-pdf-operators.c"
|
||||
"cairo-pdf-shading.c"
|
||||
"cairo-pdf-surface.c"
|
||||
# png
|
||||
"cairo-png.c"
|
||||
# ps surface
|
||||
"cairo-ps-surface.c"
|
||||
# deflate source
|
||||
"cairo-deflate-stream.c"
|
||||
# svg surface
|
||||
"cairo-svg-surface.c"
|
||||
# script surface
|
||||
"cairo-script-surface.c"
|
||||
)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
|
||||
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
||||
# Make the zlib library available
|
||||
find_library(ZLIB_DEBUG_IMPLIB NAMES zlibd)
|
||||
if (ZLIB_DEBUG_IMPLIB STREQUAL ZLIB_DEBUG_IMPLIB-NOTFOUND)
|
||||
message(FATAL_ERROR "The zlibd.lib import library could not be found. Check to ensure that zlib is properly installed.")
|
||||
endif()
|
||||
add_library(zlib UNKNOWN IMPORTED)
|
||||
set_property(TARGET zlib PROPERTY IMPORTED_LOCATION "${ZLIB_DEBUG_IMPLIB}")
|
||||
|
||||
# Make the libpng library available
|
||||
find_library(LIBPNG_DEBUG_IMPLIB NAMES libpng16d)
|
||||
if (LIBPNG_DEBUG_IMPLIB STREQUAL LIBPNG_DEBUG_IMPLIB-NOTFOUND)
|
||||
message(FATAL_ERROR "The libpng16d.lib import library could not be found. Check to ensure that libpng is properly installed.")
|
||||
endif()
|
||||
add_library(libpng UNKNOWN IMPORTED)
|
||||
set_property(TARGET libpng PROPERTY IMPORTED_LOCATION "${LIBPNG_DEBUG_IMPLIB}")
|
||||
|
||||
# Make the pixman library available
|
||||
find_library(PIXMAN_DEBUG_IMPLIB NAMES pixman-1d)
|
||||
if (PIXMAN_DEBUG_IMPLIB STREQUAL PIXMAN_DEBUG_IMPLIB-NOTFOUND)
|
||||
message(FATAL_ERROR "The pixman-1d.lib import library could not be found. Check to ensure that pixman is properly installed.")
|
||||
endif()
|
||||
add_library(pixman UNKNOWN IMPORTED)
|
||||
set_property(TARGET pixman PROPERTY IMPORTED_LOCATION "${PIXMAN_DEBUG_IMPLIB}")
|
||||
|
||||
elseif (${CMAKE_BUILD_TYPE} STREQUAL "Release")
|
||||
# Make the zlib library available
|
||||
find_library(ZLIB_RELEASE_IMPLIB NAMES zlib)
|
||||
if (ZLIB_RELEASE_IMPLIB STREQUAL ZLIB_RELEASE_IMPLIB-NOTFOUND)
|
||||
message(FATAL_ERROR "The zlib.lib import library could not be found. Check to ensure that zlib is properly installed.")
|
||||
endif()
|
||||
add_library(zlib UNKNOWN IMPORTED)
|
||||
set_property(TARGET zlib PROPERTY IMPORTED_LOCATION "${ZLIB_RELEASE_IMPLIB}")
|
||||
|
||||
# Make the libpng library available
|
||||
find_library(LIBPNG_RELEASE_IMPLIB NAMES libpng16)
|
||||
if (LIBPNG_RELEASE_IMPLIB STREQUAL LIBPNG_RELEASE_IMPLIB-NOTFOUND)
|
||||
message(FATAL_ERROR "The libpng16.lib import library could not be found. Check to ensure that libpng is properly installed.")
|
||||
endif()
|
||||
add_library(libpng UNKNOWN IMPORTED)
|
||||
set_property(TARGET libpng PROPERTY IMPORTED_LOCATION "${LIBPNG_RELEASE_IMPLIB}")
|
||||
|
||||
# Make the pixman library available
|
||||
find_library(PIXMAN_RELEASE_IMPLIB NAMES pixman-1)
|
||||
if (PIXMAN_RELEASE_IMPLIB STREQUAL PIXMAN_RELEASE_IMPLIB-NOTFOUND)
|
||||
message(FATAL_ERROR "The pixman-1.lib import library could not be found. Check to ensure that pixman is properly installed.")
|
||||
endif()
|
||||
add_library(pixman UNKNOWN IMPORTED)
|
||||
set_property(TARGET pixman PROPERTY IMPORTED_LOCATION "${PIXMAN_RELEASE_IMPLIB}")
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "Unexpected value '${CMAKE_BUILD_TYPE}' for CMAKE_BUILD_TYPE.")
|
||||
endif()
|
||||
|
||||
# Make the gdi32 library available
|
||||
find_library(GDI32_LIBRARY NAMES gdi32)
|
||||
if (GDI32_LIBRARY STREQUAL GDI32_LIBRARY-NOTFOUND)
|
||||
message(FATAL_ERROR "The gdi32.lib import library could not be found. Check to ensure that the Windows SDK is installed.")
|
||||
endif()
|
||||
add_library(gdi32 UNKNOWN IMPORTED)
|
||||
set_property(TARGET gdi32 PROPERTY IMPORTED_LOCATION "${GDI32_LIBRARY}")
|
||||
|
||||
# Make the msimg32 library available
|
||||
find_library(MSIMG32_LIBRARY NAMES msimg32)
|
||||
if (MSIMG32_LIBRARY STREQUAL MSIMG32_LIBRARY-NOTFOUND)
|
||||
message(FATAL_ERROR "The msimg32.lib import library could not be found. Check to ensure that the Windows SDK is installed.")
|
||||
endif()
|
||||
add_library(msimg32 UNKNOWN IMPORTED)
|
||||
set_property(TARGET msimg32 PROPERTY IMPORTED_LOCATION "${MSIMG32_LIBRARY}")
|
||||
|
||||
# Make the user32 library available
|
||||
find_library(USER32_LIBRARY NAMES user32)
|
||||
if (USER32_LIBRARY STREQUAL USER32_LIBRARY-NOTFOUND)
|
||||
message(FATAL_ERROR "The user32.lib import library could not be found. Check to ensure that the Windows SDK is installed.")
|
||||
endif()
|
||||
add_library(user32 UNKNOWN IMPORTED)
|
||||
set_property(TARGET user32 PROPERTY IMPORTED_LOCATION "${USER32_LIBRARY}")
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
add_library(cairo ${SOURCES})
|
||||
# cairo produces a lot of warnings which are disabled here because they otherwise fill up the log files
|
||||
target_compile_options(cairo PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4312" PUBLIC "/wd4267" PUBLIC "/wd4996" PUBLIC "/wd4311" PUBLIC "/wd4334" PUBLIC "/wd4101")
|
||||
target_link_libraries(cairo gdi32 msimg32 user32 zlib libpng pixman)
|
||||
|
||||
install(TARGETS cairo
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION bin
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
add_library(cairo-static ${SOURCES})
|
||||
target_compile_options(cairo-static PUBLIC "/DCAIRO_WIN32_STATIC_BUILD=1")
|
||||
# cairo produces a lot of warnings which are disabled here because they otherwise fill up the log files
|
||||
target_compile_options(cairo-static PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4312" PUBLIC "/wd4267" PUBLIC "/wd4996" PUBLIC "/wd4311" PUBLIC "/wd4334" PUBLIC "/wd4101")
|
||||
target_link_libraries(cairo-static gdi32 msimg32 user32 zlib libpng pixman)
|
||||
|
||||
install(TARGETS cairo-static
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "VCPKG_LIBRARY_LINKAGE is not defined or has an unexpected value")
|
||||
endif()
|
4
ports/cairo/CONTROL
Normal file
4
ports/cairo/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: cairo
|
||||
Version: 1.14.6
|
||||
Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
|
||||
Build-Depends: zlib, libpng, pixman
|
27
ports/cairo/cairo-features.h
Normal file
27
ports/cairo/cairo-features.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef CAIRO_FEATURES_H
|
||||
#define CAIRO_FEATURES_H
|
||||
/* Chosen from the various possible defines in "../build/Makefile.win32.features.h""
|
||||
guided by "../build/Makefile.win32.features". Modify at your own risk.
|
||||
*/
|
||||
|
||||
/* Always for Win32 */
|
||||
#define CAIRO_HAS_WIN32_SURFACE 1
|
||||
#define CAIRO_HAS_WIN32_FONT 1
|
||||
|
||||
/* Require libpng */
|
||||
#define CAIRO_HAS_PNG_FUNCTIONS 1
|
||||
#define CAIRO_HAS_PS_SURFACE 1
|
||||
#define CAIRO_HAS_PDF_SURFACE 1
|
||||
|
||||
// Likely available
|
||||
#define CAIRO_HAS_SCRIPT_SURFACE 1
|
||||
#define CAIRO_HAS_SVG_SURFACE 1
|
||||
|
||||
/* Always available */
|
||||
#define CAIRO_HAS_IMAGE_SURFACE 1
|
||||
#define CAIRO_HAS_MIME_SURFACE 1
|
||||
#define CAIRO_HAS_RECORDING_SURFACE 1
|
||||
#define CAIRO_HAS_OBSERVER_SURFACE 1
|
||||
#define CAIRO_HAS_USER_FONT 1
|
||||
|
||||
#endif
|
54
ports/cairo/portfile.cmake
Normal file
54
ports/cairo/portfile.cmake
Normal file
@ -0,0 +1,54 @@
|
||||
# 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/cairo-1.14.6)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://www.cairographics.org/releases/cairo-1.14.6.tar.xz"
|
||||
FILENAME "cairo-1.14.6.tar.xz"
|
||||
SHA512 e2aa17a33b95b68d407b53ac321cca15b0c148eb49b8639c75b2af1e75e7b417a2168ea978dabb8581b341f0f45dc042d3b1a56b01ab525b1984015f0865316b
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_cairo.txt DESTINATION ${SOURCE_PATH}/src)
|
||||
file(RENAME ${SOURCE_PATH}/src/CMakeLists_cairo.txt ${SOURCE_PATH}/src/CMakeLists.txt)
|
||||
file(COPY ${CURRENT_PORT_DIR}/cairo-features.h DESTINATION ${SOURCE_PATH}/src)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
)
|
||||
elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
# Copy the appropriate header files.
|
||||
file(COPY
|
||||
"${SOURCE_PATH}/src/cairo.h"
|
||||
"${SOURCE_PATH}/src/cairo-deprecated.h"
|
||||
"${SOURCE_PATH}/src/cairo-features.h"
|
||||
"${SOURCE_PATH}/src/cairo-pdf.h"
|
||||
"${SOURCE_PATH}/src/cairo-ps.h"
|
||||
"${SOURCE_PATH}/src/cairo-script.h"
|
||||
"${SOURCE_PATH}/src/cairo-svg.h"
|
||||
"${SOURCE_PATH}/cairo-version.h"
|
||||
"${SOURCE_PATH}/src/cairo-win32.h"
|
||||
DESTINATION
|
||||
${CURRENT_PACKAGES_DIR}/include
|
||||
)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cairo)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/cairo/COPYING ${CURRENT_PACKAGES_DIR}/share/cairo/copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
@ -1,3 +1,3 @@
|
||||
Source: chakracore
|
||||
Version: 1.3.0
|
||||
Version: 1.3.1
|
||||
Description: Core part of the Chakra Javascript engine
|
@ -4,11 +4,11 @@
|
||||
endif()
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ChakraCore-1.3.0)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ChakraCore-1.3.1)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URLS "https://github.com/Microsoft/ChakraCore/archive/v1.3.0.tar.gz"
|
||||
FILENAME "ChakraCore-1.3.0.tar.gz"
|
||||
SHA512 d00757e25f5c62bfc29721bd8f715df8dbaf0ac14c1dbdb0735227535cb4f2a209ec3957f24bb6a7e2bced540475bbf3e54712a930fb517fdfd5adb4d56cea07
|
||||
URLS "https://github.com/Microsoft/ChakraCore/archive/v1.3.1.tar.gz"
|
||||
FILENAME "ChakraCore-1.3.1.tar.gz"
|
||||
SHA512 52216a03333e44bce235917cfae5ccd6a756056678d9b81c63ec272d9ce5c6afabc673e7910dd3da54fda7927ea62ede980a4371dbb08f6ce4907121c27dbc53
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
|
3
ports/clockutils/CONTROL
Normal file
3
ports/clockutils/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: clockutils
|
||||
Version: 1.1.1
|
||||
Description: A lightweight c++ library for commonly needed tasks. Optimized for simplicity and speed.
|
37
ports/clockutils/portfile.cmake
Normal file
37
ports/clockutils/portfile.cmake
Normal file
@ -0,0 +1,37 @@
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/clockUtils-1.1.1)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/ClockworkOrigins/clockUtils/archive/1.1.1.tar.gz"
|
||||
FILENAME "clockUtils-1.1.1.tar.gz"
|
||||
SHA512 6b0c57862baf04c0c5529549ba13983e53445172d9a272571aa20968ba6dba15f1cf480096ca100d450218fef090805366d0564c77a4aa4721a4fe694a0481c9
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
||||
SET(SHARED_FLAG ON)
|
||||
else()
|
||||
SET(SHARED_FLAG OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DWITH_LIBRARY_ARGPARSER=ON
|
||||
-DWITH_LIBRARY_COMPRESSION=ON
|
||||
-DWITH_LIBRARY_CONTAINER=ON
|
||||
-DWITH_LIBRARY_INIPARSER=ON
|
||||
-DWITH_LIBRARY_SOCKETS=ON
|
||||
-DWITH_TESTING=OFF
|
||||
-DCLOCKUTILS_BUILD_SHARED=${SHARED_FLAG}
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/clockUtils)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/clockUtils/LICENSE ${CURRENT_PACKAGES_DIR}/share/clockUtils/copyright)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE)
|
||||
|
||||
vcpkg_copy_pdbs()
|
@ -1,3 +1,4 @@
|
||||
Source: curl
|
||||
Version: 7.51.0
|
||||
Version: 7.51.0-1
|
||||
Build-Depends: zlib, openssl
|
||||
Description: A library for transferring data with URLs
|
@ -1,7 +1,3 @@
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
message(STATUS "Warning: Static building not supported yet. Building dynamic.")
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
endif()
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/curl-curl-7_51_0)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
@ -11,12 +7,19 @@ vcpkg_download_distfile(ARCHIVE_FILE
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
||||
SET(CURL_STATICLIB OFF)
|
||||
else()
|
||||
SET(CURL_STATICLIB ON)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DBUILD_TESTING=OFF
|
||||
-DBUILD_CURL_EXE=OFF
|
||||
-DENABLE_MANUAL=OFF
|
||||
-DCURL_STATICLIB=${CURL_STATICLIB}
|
||||
OPTIONS_DEBUG
|
||||
-DENABLE_DEBUG=ON
|
||||
)
|
||||
@ -25,4 +28,9 @@ vcpkg_install_cmake()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
3
ports/directxtk/CONTROL
Normal file
3
ports/directxtk/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: directxtk
|
||||
Version: oct2016-1
|
||||
Description: A collection of helper classes for writing DirectX 11.x code in C++.
|
51
ports/directxtk/portfile.cmake
Normal file
51
ports/directxtk/portfile.cmake
Normal file
@ -0,0 +1,51 @@
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/DirectXTK-oct2016)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/Microsoft/DirectXTK/archive/oct2016.tar.gz"
|
||||
FILENAME "oct2016.tar.gz"
|
||||
SHA512 b44ee28518ca65d38a3c915881ef79533b48b07d3738b616f1935d7c00a26d5e48b2292cde6acc34e933f85ba2a6362c585c60b2bbc704745d43cef53769a112
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
IF (TRIPLET_SYSTEM_ARCH MATCHES "x86")
|
||||
SET(BUILD_ARCH "Win32")
|
||||
ELSE()
|
||||
SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})
|
||||
ENDIF()
|
||||
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${SOURCE_PATH}/DirectXTK_Desktop_2015_Win10.sln
|
||||
PLATFORM ${BUILD_ARCH}
|
||||
)
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Bin/Desktop_2015_Win10/${BUILD_ARCH}/Release/DirectXTK.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Bin/Desktop_2015_Win10/${BUILD_ARCH}/Debug/DirectXTK.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
|
||||
set(DXTK_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/directxtk)
|
||||
file(MAKE_DIRECTORY ${DXTK_TOOL_PATH})
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/MakeSpriteFont/bin/Release/MakeSpriteFont.exe
|
||||
DESTINATION ${DXTK_TOOL_PATH})
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/XWBTool/Bin/Desktop_2015/${BUILD_ARCH}/Release/XWBTool.exe
|
||||
DESTINATION ${DXTK_TOOL_PATH})
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Inc/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK
|
||||
)
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/directxtk RENAME copyright)
|
3
ports/directxtk12/CONTROL
Normal file
3
ports/directxtk12/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: directxtk12
|
||||
Version: oct2016
|
||||
Description: A collection of helper classes for writing DirectX 12 code in C++.
|
38
ports/directxtk12/portfile.cmake
Normal file
38
ports/directxtk12/portfile.cmake
Normal file
@ -0,0 +1,38 @@
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/DirectXTK12-oct2016)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/Microsoft/DirectXTK12/archive/oct2016.tar.gz"
|
||||
FILENAME "DirectXTK12-oct2016.tar.gz"
|
||||
SHA512 f33af80dc018c1fda117eeef66bd08046b48572806d879651187cbed9d5ceb402b1798ecc0e1089b54ddb879e5355b45f2b67e3be99fbe270c5216a945a9924b
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${SOURCE_PATH}/DirectXTK_Desktop_2015_Win10.sln
|
||||
)
|
||||
|
||||
IF (TRIPLET_SYSTEM_ARCH MATCHES "x86")
|
||||
SET(BUILD_ARCH "Win32")
|
||||
ELSE()
|
||||
SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})
|
||||
ENDIF()
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Bin/Desktop_2015_Win10/${BUILD_ARCH}/Release/DirectXTK12.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Bin/Desktop_2015_Win10/${BUILD_ARCH}/Debug/DirectXTK12.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Inc/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK12
|
||||
)
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/directxtk12 RENAME copyright)
|
@ -1,3 +1,3 @@
|
||||
Source: dxut
|
||||
Version: 11.14
|
||||
Version: 11.14-2
|
||||
Description: A "GLUT"-like framework for Direct3D 11.x Win32 desktop applications
|
@ -1,834 +0,0 @@
|
||||
diff --git a/Core/DDSTextureLoader.h b/Core/DDSTextureLoader.h
|
||||
index 122df9f..8af6c62 100644
|
||||
--- a/Core/DDSTextureLoader.h
|
||||
+++ b/Core/DDSTextureLoader.h
|
||||
@@ -23,6 +23,11 @@
|
||||
#include <d3d11_1.h>
|
||||
#include <stdint.h>
|
||||
|
||||
+#ifdef DXUT_EXPORT
|
||||
+ #define DXUT_API __declspec(dllexport)
|
||||
+#else
|
||||
+ #define DXUT_API __declspec(dllimport)
|
||||
+#endif
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
@@ -34,9 +39,9 @@ namespace DirectX
|
||||
DDS_ALPHA_MODE_OPAQUE = 3,
|
||||
DDS_ALPHA_MODE_CUSTOM = 4,
|
||||
};
|
||||
-
|
||||
+
|
||||
// Standard version
|
||||
- HRESULT CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
|
||||
+ HRESULT DXUT_API CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
|
||||
_In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
|
||||
_In_ size_t ddsDataSize,
|
||||
_Outptr_opt_ ID3D11Resource** texture,
|
||||
@@ -45,7 +50,7 @@ namespace DirectX
|
||||
_Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr
|
||||
);
|
||||
|
||||
- HRESULT CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
|
||||
+ HRESULT DXUT_API CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
|
||||
_In_z_ const wchar_t* szFileName,
|
||||
_Outptr_opt_ ID3D11Resource** texture,
|
||||
_Outptr_opt_ ID3D11ShaderResourceView** textureView,
|
||||
@@ -54,7 +59,7 @@ namespace DirectX
|
||||
);
|
||||
|
||||
// Standard version with optional auto-gen mipmap support
|
||||
- HRESULT CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
|
||||
+ HRESULT DXUT_API CreateDDSTextureFromMemory( _In_ ID3D11Device* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContext* d3dContext,
|
||||
_In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
|
||||
_In_ size_t ddsDataSize,
|
||||
@@ -64,7 +69,7 @@ namespace DirectX
|
||||
_Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr
|
||||
);
|
||||
|
||||
- HRESULT CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
|
||||
+ HRESULT DXUT_API CreateDDSTextureFromFile( _In_ ID3D11Device* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContext* d3dContext,
|
||||
_In_z_ const wchar_t* szFileName,
|
||||
_Outptr_opt_ ID3D11Resource** texture,
|
||||
@@ -74,7 +79,7 @@ namespace DirectX
|
||||
);
|
||||
|
||||
// Extended version
|
||||
- HRESULT CreateDDSTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
|
||||
+ HRESULT DXUT_API CreateDDSTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
|
||||
_In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
|
||||
_In_ size_t ddsDataSize,
|
||||
_In_ size_t maxsize,
|
||||
@@ -88,7 +93,7 @@ namespace DirectX
|
||||
_Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr
|
||||
);
|
||||
|
||||
- HRESULT CreateDDSTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
|
||||
+ HRESULT DXUT_API CreateDDSTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
|
||||
_In_z_ const wchar_t* szFileName,
|
||||
_In_ size_t maxsize,
|
||||
_In_ D3D11_USAGE usage,
|
||||
@@ -102,7 +107,7 @@ namespace DirectX
|
||||
);
|
||||
|
||||
// Extended version with optional auto-gen mipmap support
|
||||
- HRESULT CreateDDSTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
|
||||
+ HRESULT DXUT_API CreateDDSTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContext* d3dContext,
|
||||
_In_reads_bytes_(ddsDataSize) const uint8_t* ddsData,
|
||||
_In_ size_t ddsDataSize,
|
||||
@@ -117,7 +122,7 @@ namespace DirectX
|
||||
_Out_opt_ DDS_ALPHA_MODE* alphaMode = nullptr
|
||||
);
|
||||
|
||||
- HRESULT CreateDDSTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
|
||||
+ HRESULT DXUT_API CreateDDSTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContext* d3dContext,
|
||||
_In_z_ const wchar_t* szFileName,
|
||||
_In_ size_t maxsize,
|
||||
diff --git a/Core/DXUT.h b/Core/DXUT.h
|
||||
index fc6247e..a0e06fa 100644
|
||||
--- a/Core/DXUT.h
|
||||
+++ b/Core/DXUT.h
|
||||
@@ -12,6 +12,12 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
#pragma once
|
||||
|
||||
+#ifdef DXUT_EXPORT
|
||||
+ #define DXUT_API __declspec(dllexport)
|
||||
+#else
|
||||
+ #define DXUT_API __declspec(dllimport)
|
||||
+#endif
|
||||
+
|
||||
#ifndef UNICODE
|
||||
#error "DXUT requires a Unicode build."
|
||||
#endif
|
||||
@@ -207,68 +213,68 @@ typedef void (CALLBACK *LPDXUTCALLBACKD3D11SWAPCHAINRELEASING)( _In_opt_ void
|
||||
typedef void (CALLBACK *LPDXUTCALLBACKD3D11DEVICEDESTROYED)( _In_opt_ void* pUserContext );
|
||||
|
||||
// General callbacks
|
||||
-void WINAPI DXUTSetCallbackFrameMove( _In_ LPDXUTCALLBACKFRAMEMOVE pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
-void WINAPI DXUTSetCallbackKeyboard( _In_ LPDXUTCALLBACKKEYBOARD pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
-void WINAPI DXUTSetCallbackMouse( _In_ LPDXUTCALLBACKMOUSE pCallback, bool bIncludeMouseMove = false, _In_opt_ void* pUserContext = nullptr );
|
||||
-void WINAPI DXUTSetCallbackMsgProc( _In_ LPDXUTCALLBACKMSGPROC pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
-void WINAPI DXUTSetCallbackDeviceChanging( _In_ LPDXUTCALLBACKMODIFYDEVICESETTINGS pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
-void WINAPI DXUTSetCallbackDeviceRemoved( _In_ LPDXUTCALLBACKDEVICEREMOVED pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
+void DXUT_API WINAPI DXUTSetCallbackFrameMove( _In_ LPDXUTCALLBACKFRAMEMOVE pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
+void DXUT_API WINAPI DXUTSetCallbackKeyboard( _In_ LPDXUTCALLBACKKEYBOARD pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
+void DXUT_API WINAPI DXUTSetCallbackMouse( _In_ LPDXUTCALLBACKMOUSE pCallback, bool bIncludeMouseMove = false, _In_opt_ void* pUserContext = nullptr );
|
||||
+void DXUT_API WINAPI DXUTSetCallbackMsgProc( _In_ LPDXUTCALLBACKMSGPROC pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
+void DXUT_API WINAPI DXUTSetCallbackDeviceChanging( _In_ LPDXUTCALLBACKMODIFYDEVICESETTINGS pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
+void DXUT_API WINAPI DXUTSetCallbackDeviceRemoved( _In_ LPDXUTCALLBACKDEVICEREMOVED pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
|
||||
// Direct3D 11 callbacks
|
||||
-void WINAPI DXUTSetCallbackD3D11DeviceAcceptable( _In_ LPDXUTCALLBACKISD3D11DEVICEACCEPTABLE pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
-void WINAPI DXUTSetCallbackD3D11DeviceCreated( _In_ LPDXUTCALLBACKD3D11DEVICECREATED pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
-void WINAPI DXUTSetCallbackD3D11SwapChainResized( _In_ LPDXUTCALLBACKD3D11SWAPCHAINRESIZED pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
-void WINAPI DXUTSetCallbackD3D11FrameRender( _In_ LPDXUTCALLBACKD3D11FRAMERENDER pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
-void WINAPI DXUTSetCallbackD3D11SwapChainReleasing( _In_ LPDXUTCALLBACKD3D11SWAPCHAINRELEASING pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
-void WINAPI DXUTSetCallbackD3D11DeviceDestroyed( _In_ LPDXUTCALLBACKD3D11DEVICEDESTROYED pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
+void DXUT_API WINAPI DXUTSetCallbackD3D11DeviceAcceptable( _In_ LPDXUTCALLBACKISD3D11DEVICEACCEPTABLE pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
+void DXUT_API WINAPI DXUTSetCallbackD3D11DeviceCreated( _In_ LPDXUTCALLBACKD3D11DEVICECREATED pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
+void DXUT_API WINAPI DXUTSetCallbackD3D11SwapChainResized( _In_ LPDXUTCALLBACKD3D11SWAPCHAINRESIZED pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
+void DXUT_API WINAPI DXUTSetCallbackD3D11FrameRender( _In_ LPDXUTCALLBACKD3D11FRAMERENDER pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
+void DXUT_API WINAPI DXUTSetCallbackD3D11SwapChainReleasing( _In_ LPDXUTCALLBACKD3D11SWAPCHAINRELEASING pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
+void DXUT_API WINAPI DXUTSetCallbackD3D11DeviceDestroyed( _In_ LPDXUTCALLBACKD3D11DEVICEDESTROYED pCallback, _In_opt_ void* pUserContext = nullptr );
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
-HRESULT WINAPI DXUTInit( _In_ bool bParseCommandLine = true,
|
||||
+HRESULT DXUT_API WINAPI DXUTInit( _In_ bool bParseCommandLine = true,
|
||||
_In_ bool bShowMsgBoxOnError = true,
|
||||
_In_opt_ WCHAR* strExtraCommandLineParams = nullptr,
|
||||
_In_ bool bThreadSafeDXUT = false );
|
||||
|
||||
// Choose either DXUTCreateWindow or DXUTSetWindow. If using DXUTSetWindow, consider using DXUTStaticWndProc
|
||||
-HRESULT WINAPI DXUTCreateWindow( _In_z_ const WCHAR* strWindowTitle = L"Direct3D Window",
|
||||
+HRESULT DXUT_API WINAPI DXUTCreateWindow( _In_z_ const WCHAR* strWindowTitle = L"Direct3D Window",
|
||||
_In_opt_ HINSTANCE hInstance = nullptr, _In_opt_ HICON hIcon = nullptr, _In_opt_ HMENU hMenu = nullptr,
|
||||
_In_ int x = CW_USEDEFAULT, _In_ int y = CW_USEDEFAULT );
|
||||
-HRESULT WINAPI DXUTSetWindow( _In_ HWND hWndFocus, _In_ HWND hWndDeviceFullScreen, _In_ HWND hWndDeviceWindowed, _In_ bool bHandleMessages = true );
|
||||
-LRESULT CALLBACK DXUTStaticWndProc( _In_ HWND hWnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam );
|
||||
+HRESULT DXUT_API WINAPI DXUTSetWindow( _In_ HWND hWndFocus, _In_ HWND hWndDeviceFullScreen, _In_ HWND hWndDeviceWindowed, _In_ bool bHandleMessages = true );
|
||||
+LRESULT DXUT_API CALLBACK DXUTStaticWndProc( _In_ HWND hWnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam );
|
||||
|
||||
// Choose either DXUTCreateDevice or DXUTCreateD3DDeviceFromSettings
|
||||
|
||||
-HRESULT WINAPI DXUTCreateDevice(_In_ D3D_FEATURE_LEVEL reqFL, _In_ bool bWindowed= true, _In_ int nSuggestedWidth =0,_In_ int nSuggestedHeight =0 );
|
||||
-HRESULT WINAPI DXUTCreateDeviceFromSettings( _In_ DXUTDeviceSettings* pDeviceSettings, _In_ bool bClipWindowToSingleAdapter = true );
|
||||
+HRESULT DXUT_API WINAPI DXUTCreateDevice(_In_ D3D_FEATURE_LEVEL reqFL, _In_ bool bWindowed= true, _In_ int nSuggestedWidth =0,_In_ int nSuggestedHeight =0 );
|
||||
+HRESULT DXUT_API WINAPI DXUTCreateDeviceFromSettings( _In_ DXUTDeviceSettings* pDeviceSettings, _In_ bool bClipWindowToSingleAdapter = true );
|
||||
|
||||
// Choose either DXUTMainLoop or implement your own main loop
|
||||
-HRESULT WINAPI DXUTMainLoop( _In_opt_ HACCEL hAccel = nullptr );
|
||||
+HRESULT DXUT_API WINAPI DXUTMainLoop( _In_opt_ HACCEL hAccel = nullptr );
|
||||
|
||||
// If not using DXUTMainLoop consider using DXUTRender3DEnvironment
|
||||
-void WINAPI DXUTRender3DEnvironment();
|
||||
+void DXUT_API WINAPI DXUTRender3DEnvironment();
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Common Tasks
|
||||
//--------------------------------------------------------------------------------------
|
||||
-HRESULT WINAPI DXUTToggleFullScreen();
|
||||
-HRESULT WINAPI DXUTToggleREF();
|
||||
-HRESULT WINAPI DXUTToggleWARP();
|
||||
-void WINAPI DXUTPause( _In_ bool bPauseTime, _In_ bool bPauseRendering );
|
||||
-void WINAPI DXUTSetConstantFrameTime( _In_ bool bConstantFrameTime, _In_ float fTimePerFrame = 0.0333f );
|
||||
-void WINAPI DXUTSetCursorSettings( _In_ bool bShowCursorWhenFullScreen = false, _In_ bool bClipCursorWhenFullScreen = false );
|
||||
-void WINAPI DXUTSetHotkeyHandling( _In_ bool bAltEnterToToggleFullscreen = true, _In_ bool bEscapeToQuit = true, _In_ bool bPauseToToggleTimePause = true );
|
||||
-void WINAPI DXUTSetMultimonSettings( _In_ bool bAutoChangeAdapter = true );
|
||||
-void WINAPI DXUTSetShortcutKeySettings( _In_ bool bAllowWhenFullscreen = false, _In_ bool bAllowWhenWindowed = true ); // Controls the Windows key, and accessibility shortcut keys
|
||||
-void WINAPI DXUTSetWindowSettings( _In_ bool bCallDefWindowProc = true );
|
||||
-HRESULT WINAPI DXUTSetTimer( _In_ LPDXUTCALLBACKTIMER pCallbackTimer, _In_ float fTimeoutInSecs = 1.0f, _Out_opt_ UINT* pnIDEvent = nullptr, _In_opt_ void* pCallbackUserContext = nullptr );
|
||||
-HRESULT WINAPI DXUTKillTimer( _In_ UINT nIDEvent );
|
||||
-void WINAPI DXUTResetFrameworkState();
|
||||
-void WINAPI DXUTShutdown( _In_ int nExitCode = 0 );
|
||||
-void WINAPI DXUTSetIsInGammaCorrectMode( _In_ bool bGammaCorrect );
|
||||
-bool WINAPI DXUTGetMSAASwapChainCreated();
|
||||
+HRESULT DXUT_API WINAPI DXUTToggleFullScreen();
|
||||
+HRESULT DXUT_API WINAPI DXUTToggleREF();
|
||||
+HRESULT DXUT_API WINAPI DXUTToggleWARP();
|
||||
+void DXUT_API WINAPI DXUTPause( _In_ bool bPauseTime, _In_ bool bPauseRendering );
|
||||
+void DXUT_API WINAPI DXUTSetConstantFrameTime( _In_ bool bConstantFrameTime, _In_ float fTimePerFrame = 0.0333f );
|
||||
+void DXUT_API WINAPI DXUTSetCursorSettings( _In_ bool bShowCursorWhenFullScreen = false, _In_ bool bClipCursorWhenFullScreen = false );
|
||||
+void DXUT_API WINAPI DXUTSetHotkeyHandling( _In_ bool bAltEnterToToggleFullscreen = true, _In_ bool bEscapeToQuit = true, _In_ bool bPauseToToggleTimePause = true );
|
||||
+void DXUT_API WINAPI DXUTSetMultimonSettings( _In_ bool bAutoChangeAdapter = true );
|
||||
+void DXUT_API WINAPI DXUTSetShortcutKeySettings( _In_ bool bAllowWhenFullscreen = false, _In_ bool bAllowWhenWindowed = true ); // Controls the Windows key, and accessibility shortcut keys
|
||||
+void DXUT_API WINAPI DXUTSetWindowSettings( _In_ bool bCallDefWindowProc = true );
|
||||
+HRESULT DXUT_API WINAPI DXUTSetTimer( _In_ LPDXUTCALLBACKTIMER pCallbackTimer, _In_ float fTimeoutInSecs = 1.0f, _Out_opt_ UINT* pnIDEvent = nullptr, _In_opt_ void* pCallbackUserContext = nullptr );
|
||||
+HRESULT DXUT_API WINAPI DXUTKillTimer( _In_ UINT nIDEvent );
|
||||
+void DXUT_API WINAPI DXUTResetFrameworkState();
|
||||
+void DXUT_API WINAPI DXUTShutdown( _In_ int nExitCode = 0 );
|
||||
+void DXUT_API WINAPI DXUTSetIsInGammaCorrectMode( _In_ bool bGammaCorrect );
|
||||
+bool DXUT_API WINAPI DXUTGetMSAASwapChainCreated();
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
@@ -276,63 +282,63 @@ bool WINAPI DXUTGetMSAASwapChainCreated();
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Direct3D 11.x (These do not addref unlike typical Get* APIs)
|
||||
-IDXGIFactory1* WINAPI DXUTGetDXGIFactory();
|
||||
-IDXGISwapChain* WINAPI DXUTGetDXGISwapChain();
|
||||
-const DXGI_SURFACE_DESC* WINAPI DXUTGetDXGIBackBufferSurfaceDesc();
|
||||
-HRESULT WINAPI DXUTSetupD3D11Views( _In_ ID3D11DeviceContext* pd3dDeviceContext ); // Supports immediate or deferred context
|
||||
-D3D_FEATURE_LEVEL WINAPI DXUTGetD3D11DeviceFeatureLevel(); // Returns the D3D11 devices current feature level
|
||||
-ID3D11RenderTargetView* WINAPI DXUTGetD3D11RenderTargetView();
|
||||
-ID3D11DepthStencilView* WINAPI DXUTGetD3D11DepthStencilView();
|
||||
+DXUT_API IDXGIFactory1* WINAPI DXUTGetDXGIFactory();
|
||||
+DXUT_API IDXGISwapChain* WINAPI DXUTGetDXGISwapChain();
|
||||
+DXUT_API const DXGI_SURFACE_DESC* WINAPI DXUTGetDXGIBackBufferSurfaceDesc();
|
||||
+DXUT_API HRESULT WINAPI DXUTSetupD3D11Views(_In_ ID3D11DeviceContext* pd3dDeviceContext); // Supports immediate or deferred context
|
||||
+DXUT_API D3D_FEATURE_LEVEL WINAPI DXUTGetD3D11DeviceFeatureLevel(); // Returns the D3D11 devices current feature level
|
||||
+DXUT_API ID3D11RenderTargetView* WINAPI DXUTGetD3D11RenderTargetView();
|
||||
+DXUT_API ID3D11DepthStencilView* WINAPI DXUTGetD3D11DepthStencilView();
|
||||
|
||||
-ID3D11Device* WINAPI DXUTGetD3D11Device();
|
||||
-ID3D11DeviceContext* WINAPI DXUTGetD3D11DeviceContext();
|
||||
+DXUT_API ID3D11Device* WINAPI DXUTGetD3D11Device();
|
||||
+DXUT_API ID3D11DeviceContext* WINAPI DXUTGetD3D11DeviceContext();
|
||||
|
||||
-ID3D11Device1* WINAPI DXUTGetD3D11Device1();
|
||||
-ID3D11DeviceContext1* WINAPI DXUTGetD3D11DeviceContext1();
|
||||
+DXUT_API ID3D11Device1* WINAPI DXUTGetD3D11Device1();
|
||||
+DXUT_API ID3D11DeviceContext1* WINAPI DXUTGetD3D11DeviceContext1();
|
||||
|
||||
#ifdef USE_DIRECT3D11_2
|
||||
-ID3D11Device2* WINAPI DXUTGetD3D11Device2();
|
||||
-ID3D11DeviceContext2* WINAPI DXUTGetD3D11DeviceContext2();
|
||||
+DXUT_API ID3D11Device2* WINAPI DXUTGetD3D11Device2();
|
||||
+DXUT_API ID3D11DeviceContext2* WINAPI DXUTGetD3D11DeviceContext2();
|
||||
#endif
|
||||
|
||||
#ifdef USE_DIRECT3D11_3
|
||||
-ID3D11Device3* WINAPI DXUTGetD3D11Device3();
|
||||
-ID3D11DeviceContext3* WINAPI DXUTGetD3D11DeviceContext3();
|
||||
+DXUT_API ID3D11Device3* WINAPI DXUTGetD3D11Device3();
|
||||
+DXUT_API ID3D11DeviceContext3* WINAPI DXUTGetD3D11DeviceContext3();
|
||||
#endif
|
||||
|
||||
// General
|
||||
-DXUTDeviceSettings WINAPI DXUTGetDeviceSettings();
|
||||
-HINSTANCE WINAPI DXUTGetHINSTANCE();
|
||||
-HWND WINAPI DXUTGetHWND();
|
||||
-HWND WINAPI DXUTGetHWNDFocus();
|
||||
-HWND WINAPI DXUTGetHWNDDeviceFullScreen();
|
||||
-HWND WINAPI DXUTGetHWNDDeviceWindowed();
|
||||
-RECT WINAPI DXUTGetWindowClientRect();
|
||||
-LONG WINAPI DXUTGetWindowWidth();
|
||||
-LONG WINAPI DXUTGetWindowHeight();
|
||||
-RECT WINAPI DXUTGetWindowClientRectAtModeChange(); // Useful for returning to windowed mode with the same resolution as before toggle to full screen mode
|
||||
-RECT WINAPI DXUTGetFullsceenClientRectAtModeChange(); // Useful for returning to full screen mode with the same resolution as before toggle to windowed mode
|
||||
-double WINAPI DXUTGetTime();
|
||||
-float WINAPI DXUTGetElapsedTime();
|
||||
-bool WINAPI DXUTIsWindowed();
|
||||
-bool WINAPI DXUTIsInGammaCorrectMode();
|
||||
-float WINAPI DXUTGetFPS();
|
||||
-LPCWSTR WINAPI DXUTGetWindowTitle();
|
||||
-LPCWSTR WINAPI DXUTGetFrameStats( _In_ bool bIncludeFPS = false );
|
||||
-LPCWSTR WINAPI DXUTGetDeviceStats();
|
||||
-
|
||||
-bool WINAPI DXUTIsVsyncEnabled();
|
||||
-bool WINAPI DXUTIsRenderingPaused();
|
||||
-bool WINAPI DXUTIsTimePaused();
|
||||
-bool WINAPI DXUTIsActive();
|
||||
-int WINAPI DXUTGetExitCode();
|
||||
-bool WINAPI DXUTGetShowMsgBoxOnError();
|
||||
-bool WINAPI DXUTGetAutomation(); // Returns true if -automation parameter is used to launch the app
|
||||
-bool WINAPI DXUTIsKeyDown( _In_ BYTE vKey ); // Pass a virtual-key code, ex. VK_F1, 'A', VK_RETURN, VK_LSHIFT, etc
|
||||
-bool WINAPI DXUTWasKeyPressed( _In_ BYTE vKey ); // Like DXUTIsKeyDown() but return true only if the key was just pressed
|
||||
-bool WINAPI DXUTIsMouseButtonDown( _In_ BYTE vButton ); // Pass a virtual-key code: VK_LBUTTON, VK_RBUTTON, VK_MBUTTON, VK_XBUTTON1, VK_XBUTTON2
|
||||
-HRESULT WINAPI DXUTCreateState(); // Optional method to create DXUT's memory. If its not called by the application it will be automatically called when needed
|
||||
-void WINAPI DXUTDestroyState(); // Optional method to destroy DXUT's memory. If its not called by the application it will be automatically called after the application exits WinMain
|
||||
+DXUTDeviceSettings DXUT_API WINAPI DXUTGetDeviceSettings();
|
||||
+HINSTANCE DXUT_API WINAPI DXUTGetHINSTANCE();
|
||||
+HWND DXUT_API WINAPI DXUTGetHWND();
|
||||
+HWND DXUT_API WINAPI DXUTGetHWNDFocus();
|
||||
+HWND DXUT_API WINAPI DXUTGetHWNDDeviceFullScreen();
|
||||
+HWND DXUT_API WINAPI DXUTGetHWNDDeviceWindowed();
|
||||
+RECT DXUT_API WINAPI DXUTGetWindowClientRect();
|
||||
+LONG DXUT_API WINAPI DXUTGetWindowWidth();
|
||||
+LONG DXUT_API WINAPI DXUTGetWindowHeight();
|
||||
+RECT DXUT_API WINAPI DXUTGetWindowClientRectAtModeChange(); // Useful for returning to windowed mode with the same resolution as before toggle to full screen mode
|
||||
+RECT DXUT_API WINAPI DXUTGetFullsceenClientRectAtModeChange(); // Useful for returning to full screen mode with the same resolution as before toggle to windowed mode
|
||||
+double DXUT_API WINAPI DXUTGetTime();
|
||||
+float DXUT_API WINAPI DXUTGetElapsedTime();
|
||||
+bool DXUT_API WINAPI DXUTIsWindowed();
|
||||
+bool DXUT_API WINAPI DXUTIsInGammaCorrectMode();
|
||||
+float DXUT_API WINAPI DXUTGetFPS();
|
||||
+LPCWSTR DXUT_API WINAPI DXUTGetWindowTitle();
|
||||
+LPCWSTR DXUT_API WINAPI DXUTGetFrameStats( _In_ bool bIncludeFPS = false );
|
||||
+LPCWSTR DXUT_API WINAPI DXUTGetDeviceStats();
|
||||
+
|
||||
+bool DXUT_API WINAPI DXUTIsVsyncEnabled();
|
||||
+bool DXUT_API WINAPI DXUTIsRenderingPaused();
|
||||
+bool DXUT_API WINAPI DXUTIsTimePaused();
|
||||
+bool DXUT_API WINAPI DXUTIsActive();
|
||||
+int DXUT_API WINAPI DXUTGetExitCode();
|
||||
+bool DXUT_API WINAPI DXUTGetShowMsgBoxOnError();
|
||||
+bool DXUT_API WINAPI DXUTGetAutomation(); // Returns true if -automation parameter is used to launch the app
|
||||
+bool DXUT_API WINAPI DXUTIsKeyDown( _In_ BYTE vKey ); // Pass a virtual-key code, ex. VK_F1, 'A', VK_RETURN, VK_LSHIFT, etc
|
||||
+bool DXUT_API WINAPI DXUTWasKeyPressed( _In_ BYTE vKey ); // Like DXUTIsKeyDown() but return true only if the key was just pressed
|
||||
+bool DXUT_API WINAPI DXUTIsMouseButtonDown( _In_ BYTE vButton ); // Pass a virtual-key code: VK_LBUTTON, VK_RBUTTON, VK_MBUTTON, VK_XBUTTON1, VK_XBUTTON2
|
||||
+HRESULT DXUT_API WINAPI DXUTCreateState(); // Optional method to create DXUT's memory. If its not called by the application it will be automatically called when needed
|
||||
+void DXUT_API WINAPI DXUTDestroyState(); // Optional method to destroy DXUT's memory. If its not called by the application it will be automatically called after the application exits WinMain
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// DXUT core layer includes
|
||||
diff --git a/Core/DXUTDevice11.h b/Core/DXUTDevice11.h
|
||||
index 1e38a63..e607463 100644
|
||||
--- a/Core/DXUTDevice11.h
|
||||
+++ b/Core/DXUTDevice11.h
|
||||
@@ -14,12 +14,14 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
#pragma once
|
||||
|
||||
-void DXUTApplyDefaultDeviceSettings(DXUTDeviceSettings *modifySettings);
|
||||
+#pragma warning(disable: 4251)
|
||||
+
|
||||
+DXUT_API void DXUTApplyDefaultDeviceSettings(DXUTDeviceSettings *modifySettings);
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Functions to get bit depth from formats
|
||||
//--------------------------------------------------------------------------------------
|
||||
-HRESULT WINAPI DXUTGetD3D11AdapterDisplayMode( _In_ UINT AdapterOrdinal, _In_ UINT Output, _Out_ DXGI_MODE_DESC* pModeDesc );
|
||||
+DXUT_API HRESULT WINAPI DXUTGetD3D11AdapterDisplayMode( _In_ UINT AdapterOrdinal, _In_ UINT Output, _Out_ DXGI_MODE_DESC* pModeDesc );
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +30,7 @@ HRESULT WINAPI DXUTGetD3D11AdapterDisplayMode( _In_ UINT AdapterOrdinal, _In_ UI
|
||||
// Optional memory create/destory functions. If not call, these will be called automatically
|
||||
//--------------------------------------------------------------------------------------
|
||||
HRESULT WINAPI DXUTCreateD3D11Enumeration();
|
||||
-void WINAPI DXUTDestroyD3D11Enumeration();
|
||||
+DXUT_API void WINAPI DXUTDestroyD3D11Enumeration();
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +48,7 @@ struct CD3D11EnumDeviceSettingsCombo;
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Enumerates available Direct3D11 adapters, devices, modes, etc.
|
||||
//--------------------------------------------------------------------------------------
|
||||
-class CD3D11Enumeration
|
||||
+class DXUT_API CD3D11Enumeration
|
||||
{
|
||||
public:
|
||||
// These should be called before Enumerate().
|
||||
@@ -106,7 +108,7 @@ private:
|
||||
void ClearAdapterInfoList();
|
||||
};
|
||||
|
||||
-CD3D11Enumeration* WINAPI DXUTGetD3D11Enumeration(_In_ bool bForceEnumerate = false, _In_ bool EnumerateAllAdapterFormats = true, _In_ D3D_FEATURE_LEVEL forceFL = ((D3D_FEATURE_LEVEL )0) );
|
||||
+DXUT_API CD3D11Enumeration* WINAPI DXUTGetD3D11Enumeration(_In_ bool bForceEnumerate = false, _In_ bool EnumerateAllAdapterFormats = true, _In_ D3D_FEATURE_LEVEL forceFL = ((D3D_FEATURE_LEVEL )0) );
|
||||
|
||||
|
||||
#define DXGI_MAX_DEVICE_IDENTIFIER_STRING 128
|
||||
@@ -115,7 +117,7 @@ CD3D11Enumeration* WINAPI DXUTGetD3D11Enumeration(_In_ bool bForceEnumerate = fa
|
||||
// A class describing an adapter which contains a unique adapter ordinal
|
||||
// that is installed on the system
|
||||
//--------------------------------------------------------------------------------------
|
||||
-class CD3D11EnumAdapterInfo
|
||||
+class DXUT_API CD3D11EnumAdapterInfo
|
||||
{
|
||||
const CD3D11EnumAdapterInfo &operator = ( const CD3D11EnumAdapterInfo &rhs );
|
||||
|
||||
@@ -144,7 +146,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
-class CD3D11EnumOutputInfo
|
||||
+class DXUT_API CD3D11EnumOutputInfo
|
||||
{
|
||||
const CD3D11EnumOutputInfo &operator = ( const CD3D11EnumOutputInfo &rhs );
|
||||
|
||||
@@ -167,7 +169,7 @@ public:
|
||||
//--------------------------------------------------------------------------------------
|
||||
// A class describing a Direct3D11 device that contains a unique supported driver type
|
||||
//--------------------------------------------------------------------------------------
|
||||
-class CD3D11EnumDeviceInfo
|
||||
+class DXUT_API CD3D11EnumDeviceInfo
|
||||
{
|
||||
const CD3D11EnumDeviceInfo& operator =( const CD3D11EnumDeviceInfo& rhs );
|
||||
|
||||
@@ -187,7 +189,7 @@ public:
|
||||
// adapter format, back buffer format, and windowed that is compatible with a
|
||||
// particular Direct3D device and the app.
|
||||
//--------------------------------------------------------------------------------------
|
||||
-struct CD3D11EnumDeviceSettingsCombo
|
||||
+struct DXUT_API CD3D11EnumDeviceSettingsCombo
|
||||
{
|
||||
UINT AdapterOrdinal;
|
||||
D3D_DRIVER_TYPE DeviceType;
|
||||
@@ -203,7 +205,7 @@ struct CD3D11EnumDeviceSettingsCombo
|
||||
CD3D11EnumOutputInfo* pOutputInfo;
|
||||
};
|
||||
|
||||
-float DXUTRankD3D11DeviceCombo( _In_ CD3D11EnumDeviceSettingsCombo* pDeviceSettingsCombo,
|
||||
+float DXUT_API DXUTRankD3D11DeviceCombo( _In_ CD3D11EnumDeviceSettingsCombo* pDeviceSettingsCombo,
|
||||
_In_ DXUTD3D11DeviceSettings* pOptimalDeviceSettings,
|
||||
_Out_ int &bestModeIndex,
|
||||
_Out_ int &bestMSAAIndex
|
||||
diff --git a/Core/DXUT_2015.vcxproj b/Core/DXUT_2015.vcxproj
|
||||
index 6d6c522..62b0708 100644
|
||||
--- a/Core/DXUT_2015.vcxproj
|
||||
+++ b/Core/DXUT_2015.vcxproj
|
||||
@@ -34,35 +34,35 @@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
- <ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|X64'" Label="Configuration">
|
||||
- <ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
- <ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|X64'" Label="Configuration">
|
||||
- <ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|Win32'" Label="Configuration">
|
||||
- <ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|X64'" Label="Configuration">
|
||||
- <ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
@@ -147,7 +147,7 @@
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
|
||||
- <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>DXUT_EXPORT;WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
@@ -156,7 +156,7 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
|
||||
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<LargeAddressAware>true</LargeAddressAware>
|
||||
@@ -188,7 +188,7 @@
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
|
||||
- <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>DXUT_EXPORT;WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
@@ -196,7 +196,7 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
|
||||
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<LargeAddressAware>true</LargeAddressAware>
|
||||
@@ -230,14 +230,14 @@
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
|
||||
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>DXUT_EXPORT;WIN32;NDEBUG;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>DXUT.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
|
||||
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
@@ -272,14 +272,14 @@
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
|
||||
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>DXUT_EXPORT;WIN32;NDEBUG;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>DXUT.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
|
||||
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
@@ -315,14 +315,14 @@
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
|
||||
- <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>DXUT_EXPORT;WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>DXUT.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
|
||||
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
@@ -357,14 +357,14 @@
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
|
||||
- <PreprocessorDefinitions>WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <PreprocessorDefinitions>DXUT_EXPORT;WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>DXUT.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
|
||||
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
diff --git a/Core/DXUTmisc.h b/Core/DXUTmisc.h
|
||||
index 9706ccc..74ab666 100644
|
||||
--- a/Core/DXUTmisc.h
|
||||
+++ b/Core/DXUTmisc.h
|
||||
@@ -62,23 +62,23 @@ struct DXUT_GAMEPAD
|
||||
bool bLastRightTrigger;
|
||||
};
|
||||
|
||||
-HRESULT DXUTGetGamepadState( _In_ DWORD dwPort, _In_ DXUT_GAMEPAD* pGamePad, _In_ bool bThumbstickDeadZone = true,
|
||||
+HRESULT DXUT_API DXUTGetGamepadState( _In_ DWORD dwPort, _In_ DXUT_GAMEPAD* pGamePad, _In_ bool bThumbstickDeadZone = true,
|
||||
_In_ bool bSnapThumbstickToCardinals = true );
|
||||
-HRESULT DXUTStopRumbleOnAllControllers();
|
||||
-void DXUTEnableXInput( _In_ bool bEnable );
|
||||
+HRESULT DXUT_API DXUTStopRumbleOnAllControllers();
|
||||
+void DXUT_API DXUTEnableXInput( _In_ bool bEnable );
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Takes a screen shot of a 32bit D3D11 back buffer and saves the images to a BMP or DDS file
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
-HRESULT DXUTSnapD3D11Screenshot( _In_z_ LPCWSTR szFileName, _In_ bool usedds = true );
|
||||
+HRESULT DXUT_API DXUTSnapD3D11Screenshot( _In_z_ LPCWSTR szFileName, _In_ bool usedds = true );
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Performs timer operations
|
||||
// Use DXUTGetGlobalTimer() to get the global instance
|
||||
//--------------------------------------------------------------------------------------
|
||||
-class CDXUTTimer
|
||||
+class DXUT_API CDXUTTimer
|
||||
{
|
||||
public:
|
||||
CDXUTTimer();
|
||||
@@ -109,24 +109,24 @@ protected:
|
||||
LONGLONG m_llBaseTime;
|
||||
};
|
||||
|
||||
-CDXUTTimer* WINAPI DXUTGetGlobalTimer();
|
||||
+DXUT_API CDXUTTimer* WINAPI DXUTGetGlobalTimer();
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Returns the string for the given DXGI_FORMAT.
|
||||
// bWithPrefix determines whether the string should include the "DXGI_FORMAT_"
|
||||
//--------------------------------------------------------------------------------------
|
||||
-LPCWSTR WINAPI DXUTDXGIFormatToString( _In_ DXGI_FORMAT format, _In_ bool bWithPrefix );
|
||||
+DXUT_API LPCWSTR WINAPI DXUTDXGIFormatToString( _In_ DXGI_FORMAT format, _In_ bool bWithPrefix );
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Debug printing support
|
||||
// See dxerr.h for more debug printing support
|
||||
//--------------------------------------------------------------------------------------
|
||||
-void WINAPI DXUTOutputDebugStringW( _In_z_ LPCWSTR strMsg, ... );
|
||||
-void WINAPI DXUTOutputDebugStringA( _In_z_ LPCSTR strMsg, ... );
|
||||
-HRESULT WINAPI DXUTTrace( _In_z_ const CHAR* strFile, _In_ DWORD dwLine, _In_ HRESULT hr, _In_z_ const WCHAR* strMsg, _In_ bool bPopMsgBox );
|
||||
-const WCHAR* WINAPI DXUTTraceWindowsMessage( _In_ UINT uMsg );
|
||||
+DXUT_API void WINAPI DXUTOutputDebugStringW( _In_z_ LPCWSTR strMsg, ... );
|
||||
+DXUT_API void WINAPI DXUTOutputDebugStringA( _In_z_ LPCSTR strMsg, ... );
|
||||
+DXUT_API HRESULT WINAPI DXUTTrace( _In_z_ const CHAR* strFile, _In_ DWORD dwLine, _In_ HRESULT hr, _In_z_ const WCHAR* strMsg, _In_ bool bPopMsgBox );
|
||||
+DXUT_API const WCHAR* WINAPI DXUTTraceWindowsMessage( _In_ UINT uMsg );
|
||||
|
||||
#ifdef UNICODE
|
||||
#define DXUTOutputDebugString DXUTOutputDebugStringW
|
||||
@@ -152,17 +152,17 @@ const WCHAR* WINAPI DXUTTraceWindowsMessage( _In_ UINT uMsg );
|
||||
// failure if APIs are not present.
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
-int WINAPI DXUT_Dynamic_D3DPERF_BeginEvent( _In_ DWORD col, _In_z_ LPCWSTR wszName );
|
||||
-int WINAPI DXUT_Dynamic_D3DPERF_EndEvent( void );
|
||||
-void WINAPI DXUT_Dynamic_D3DPERF_SetMarker( _In_ DWORD col, _In_z_ LPCWSTR wszName );
|
||||
-void WINAPI DXUT_Dynamic_D3DPERF_SetRegion( _In_ DWORD col, _In_z_ LPCWSTR wszName );
|
||||
-BOOL WINAPI DXUT_Dynamic_D3DPERF_QueryRepeatFrame( void );
|
||||
-void WINAPI DXUT_Dynamic_D3DPERF_SetOptions( _In_ DWORD dwOptions );
|
||||
-DWORD WINAPI DXUT_Dynamic_D3DPERF_GetStatus();
|
||||
-HRESULT WINAPI DXUT_Dynamic_CreateDXGIFactory1( _In_ REFIID rInterface, _Out_ void** ppOut );
|
||||
-HRESULT WINAPI DXUT_Dynamic_DXGIGetDebugInterface( _In_ REFIID rInterface, _Out_ void** ppOut );
|
||||
-
|
||||
-HRESULT WINAPI DXUT_Dynamic_D3D11CreateDevice( _In_opt_ IDXGIAdapter* pAdapter,
|
||||
+DXUT_API int WINAPI DXUT_Dynamic_D3DPERF_BeginEvent( _In_ DWORD col, _In_z_ LPCWSTR wszName );
|
||||
+DXUT_API int WINAPI DXUT_Dynamic_D3DPERF_EndEvent( void );
|
||||
+DXUT_API void WINAPI DXUT_Dynamic_D3DPERF_SetMarker( _In_ DWORD col, _In_z_ LPCWSTR wszName );
|
||||
+DXUT_API void WINAPI DXUT_Dynamic_D3DPERF_SetRegion( _In_ DWORD col, _In_z_ LPCWSTR wszName );
|
||||
+DXUT_API BOOL WINAPI DXUT_Dynamic_D3DPERF_QueryRepeatFrame( void );
|
||||
+DXUT_API void WINAPI DXUT_Dynamic_D3DPERF_SetOptions( _In_ DWORD dwOptions );
|
||||
+DXUT_API DWORD WINAPI DXUT_Dynamic_D3DPERF_GetStatus();
|
||||
+DXUT_API HRESULT WINAPI DXUT_Dynamic_CreateDXGIFactory1( _In_ REFIID rInterface, _Out_ void** ppOut );
|
||||
+DXUT_API HRESULT WINAPI DXUT_Dynamic_DXGIGetDebugInterface( _In_ REFIID rInterface, _Out_ void** ppOut );
|
||||
+
|
||||
+DXUT_API HRESULT WINAPI DXUT_Dynamic_D3D11CreateDevice( _In_opt_ IDXGIAdapter* pAdapter,
|
||||
_In_ D3D_DRIVER_TYPE DriverType,
|
||||
_In_opt_ HMODULE Software,
|
||||
_In_ UINT32 Flags,
|
||||
@@ -173,7 +173,7 @@ HRESULT WINAPI DXUT_Dynamic_D3D11CreateDevice( _In_opt_ IDXGIAdapter* pAdapter,
|
||||
_Out_opt_ D3D_FEATURE_LEVEL* pFeatureLevel,
|
||||
_Out_opt_ ID3D11DeviceContext** ppImmediateContext );
|
||||
|
||||
-bool DXUT_EnsureD3D11APIs();
|
||||
+DXUT_API bool DXUT_EnsureD3D11APIs();
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
@@ -285,14 +285,14 @@ typedef MONITORINFOEXW MONITORINFOEX;
|
||||
typedef LPMONITORINFOEXW LPMONITORINFOEX;
|
||||
#endif
|
||||
|
||||
-HMONITOR WINAPI DXUTMonitorFromWindow( _In_ HWND hWnd, _In_ DWORD dwFlags );
|
||||
-HMONITOR WINAPI DXUTMonitorFromRect( _In_ LPCRECT lprcScreenCoords, _In_ DWORD dwFlags );
|
||||
-BOOL WINAPI DXUTGetMonitorInfo( _In_ HMONITOR hMonitor, _Out_ LPMONITORINFO lpMonitorInfo );
|
||||
-void WINAPI DXUTGetDesktopResolution( _In_ UINT AdapterOrdinal, _Out_ UINT* pWidth, _Out_ UINT* pHeight );
|
||||
+DXUT_API HMONITOR WINAPI DXUTMonitorFromWindow( _In_ HWND hWnd, _In_ DWORD dwFlags );
|
||||
+DXUT_API HMONITOR WINAPI DXUTMonitorFromRect( _In_ LPCRECT lprcScreenCoords, _In_ DWORD dwFlags );
|
||||
+DXUT_API BOOL WINAPI DXUTGetMonitorInfo( _In_ HMONITOR hMonitor, _Out_ LPMONITORINFO lpMonitorInfo );
|
||||
+DXUT_API void WINAPI DXUTGetDesktopResolution( _In_ UINT AdapterOrdinal, _Out_ UINT* pWidth, _Out_ UINT* pHeight );
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Helper functions to create SRGB formats from typeless formats and vice versa
|
||||
//--------------------------------------------------------------------------------------
|
||||
-DXGI_FORMAT MAKE_SRGB( _In_ DXGI_FORMAT format );
|
||||
-DXGI_FORMAT MAKE_TYPELESS( _In_ DXGI_FORMAT format );
|
||||
+DXUT_API DXGI_FORMAT MAKE_SRGB( _In_ DXGI_FORMAT format );
|
||||
+DXUT_API DXGI_FORMAT MAKE_TYPELESS( _In_ DXGI_FORMAT format );
|
||||
diff --git a/Core/ScreenGrab.h b/Core/ScreenGrab.h
|
||||
index d643073..cf4eba6 100644
|
||||
--- a/Core/ScreenGrab.h
|
||||
+++ b/Core/ScreenGrab.h
|
||||
@@ -27,14 +27,20 @@
|
||||
#include <stdint.h>
|
||||
#include <functional>
|
||||
|
||||
+#ifdef DXUT_EXPORT
|
||||
+ #define DXUT_API __declspec(dllexport)
|
||||
+#else
|
||||
+ #define DXUT_API __declspec(dllimport)
|
||||
+#endif
|
||||
+
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
- HRESULT SaveDDSTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
||||
+ DXUT_API HRESULT SaveDDSTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
||||
_In_ ID3D11Resource* pSource,
|
||||
_In_z_ LPCWSTR fileName );
|
||||
|
||||
- HRESULT SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
||||
+ DXUT_API HRESULT SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext,
|
||||
_In_ ID3D11Resource* pSource,
|
||||
_In_ REFGUID guidContainerFormat,
|
||||
_In_z_ LPCWSTR fileName,
|
||||
diff --git a/Core/WICTextureLoader.h b/Core/WICTextureLoader.h
|
||||
index 2b0340c..f2edacf 100644
|
||||
--- a/Core/WICTextureLoader.h
|
||||
+++ b/Core/WICTextureLoader.h
|
||||
@@ -30,11 +30,17 @@
|
||||
#include <d3d11_1.h>
|
||||
#include <stdint.h>
|
||||
|
||||
+#ifdef DXUT_EXPORT
|
||||
+ #define DXUT_API __declspec(dllexport)
|
||||
+#else
|
||||
+ #define DXUT_API __declspec(dllimport)
|
||||
+#endif
|
||||
+
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
// Standard version
|
||||
- HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
|
||||
+ DXUT_API HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
|
||||
_In_reads_bytes_(wicDataSize) const uint8_t* wicData,
|
||||
_In_ size_t wicDataSize,
|
||||
_Out_opt_ ID3D11Resource** texture,
|
||||
@@ -42,7 +48,7 @@ namespace DirectX
|
||||
_In_ size_t maxsize = 0
|
||||
);
|
||||
|
||||
- HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
|
||||
+ DXUT_API HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
|
||||
_In_z_ const wchar_t* szFileName,
|
||||
_Out_opt_ ID3D11Resource** texture,
|
||||
_Out_opt_ ID3D11ShaderResourceView** textureView,
|
||||
@@ -50,7 +56,7 @@ namespace DirectX
|
||||
);
|
||||
|
||||
// Standard version with optional auto-gen mipmap support
|
||||
- HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
|
||||
+ DXUT_API HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContext* d3dContext,
|
||||
_In_reads_bytes_(wicDataSize) const uint8_t* wicData,
|
||||
_In_ size_t wicDataSize,
|
||||
@@ -59,7 +65,7 @@ namespace DirectX
|
||||
_In_ size_t maxsize = 0
|
||||
);
|
||||
|
||||
- HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
|
||||
+ DXUT_API HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContext* d3dContext,
|
||||
_In_z_ const wchar_t* szFileName,
|
||||
_Out_opt_ ID3D11Resource** texture,
|
||||
@@ -68,7 +74,7 @@ namespace DirectX
|
||||
);
|
||||
|
||||
// Extended version
|
||||
- HRESULT CreateWICTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
|
||||
+ DXUT_API HRESULT CreateWICTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
|
||||
_In_reads_bytes_(wicDataSize) const uint8_t* wicData,
|
||||
_In_ size_t wicDataSize,
|
||||
_In_ size_t maxsize,
|
||||
@@ -81,7 +87,7 @@ namespace DirectX
|
||||
_Out_opt_ ID3D11ShaderResourceView** textureView
|
||||
);
|
||||
|
||||
- HRESULT CreateWICTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
|
||||
+ DXUT_API HRESULT CreateWICTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
|
||||
_In_z_ const wchar_t* szFileName,
|
||||
_In_ size_t maxsize,
|
||||
_In_ D3D11_USAGE usage,
|
||||
@@ -94,7 +100,7 @@ namespace DirectX
|
||||
);
|
||||
|
||||
// Extended version with optional auto-gen mipmap support
|
||||
- HRESULT CreateWICTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
|
||||
+ DXUT_API HRESULT CreateWICTextureFromMemoryEx( _In_ ID3D11Device* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContext* d3dContext,
|
||||
_In_reads_bytes_(wicDataSize) const uint8_t* wicData,
|
||||
_In_ size_t wicDataSize,
|
||||
@@ -108,7 +114,7 @@ namespace DirectX
|
||||
_Out_opt_ ID3D11ShaderResourceView** textureView
|
||||
);
|
||||
|
||||
- HRESULT CreateWICTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
|
||||
+ DXUT_API HRESULT CreateWICTextureFromFileEx( _In_ ID3D11Device* d3dDevice,
|
||||
_In_opt_ ID3D11DeviceContext* d3dContext,
|
||||
_In_z_ const wchar_t* szFileName,
|
||||
_In_ size_t maxsize,
|
||||
diff --git a/Core/dxerr.h b/Core/dxerr.h
|
||||
index 39e348d..9616dea 100644
|
||||
--- a/Core/dxerr.h
|
||||
+++ b/Core/dxerr.h
|
||||
@@ -25,7 +25,7 @@ extern "C" {
|
||||
//--------------------------------------------------------------------------------------
|
||||
// DXGetErrorString
|
||||
//--------------------------------------------------------------------------------------
|
||||
-const WCHAR* WINAPI DXGetErrorStringW( _In_ HRESULT hr );
|
||||
+DXUT_API const WCHAR* WINAPI DXGetErrorStringW( _In_ HRESULT hr );
|
||||
|
||||
#define DXGetErrorString DXGetErrorStringW
|
||||
|
||||
@@ -33,7 +33,7 @@ const WCHAR* WINAPI DXGetErrorStringW( _In_ HRESULT hr );
|
||||
// DXGetErrorDescription has to be modified to return a copy in a buffer rather than
|
||||
// the original static string.
|
||||
//--------------------------------------------------------------------------------------
|
||||
-void WINAPI DXGetErrorDescriptionW( _In_ HRESULT hr, _Out_cap_(count) WCHAR* desc, _In_ size_t count );
|
||||
+void DXUT_API WINAPI DXGetErrorDescriptionW( _In_ HRESULT hr, _Out_cap_(count) WCHAR* desc, _In_ size_t count );
|
||||
|
||||
#define DXGetErrorDescription DXGetErrorDescriptionW
|
||||
|
||||
@@ -52,7 +52,7 @@ void WINAPI DXGetErrorDescriptionW( _In_ HRESULT hr, _Out_cap_(count) WCHAR* des
|
||||
//
|
||||
// Return: The hr that was passed in.
|
||||
//--------------------------------------------------------------------------------------
|
||||
-HRESULT WINAPI DXTraceW( _In_z_ const WCHAR* strFile, _In_ DWORD dwLine, _In_ HRESULT hr, _In_opt_ const WCHAR* strMsg, _In_ bool bPopMsgBox );
|
||||
+HRESULT DXUT_API WINAPI DXTraceW( _In_z_ const WCHAR* strFile, _In_ DWORD dwLine, _In_ HRESULT hr, _In_opt_ const WCHAR* strMsg, _In_ bool bPopMsgBox );
|
||||
|
||||
#define DXTrace DXTraceW
|
||||
|
@ -1,6 +1,6 @@
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
message(STATUS "Warning: Static building not supported yet. Building dynamic.")
|
||||
set(VCPKG_LIBRARY_LINKAGE dynamic)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/DXUT-sept2016)
|
||||
@ -11,46 +11,34 @@ vcpkg_download_distfile(ARCHIVE_FILE
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/dll.patch
|
||||
)
|
||||
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${SOURCE_PATH}/Core/DXUT_2015.vcxproj
|
||||
)
|
||||
|
||||
IF (TRIPLET_SYSTEM_ARCH MATCHES "x86")
|
||||
SET(BUILD_ARCH "Win32")
|
||||
ELSE()
|
||||
SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})
|
||||
ENDIF()
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Core/DDSTextureLoader.h
|
||||
${SOURCE_PATH}/Core/DXErr.h
|
||||
${SOURCE_PATH}/Core/DXUT.h
|
||||
${SOURCE_PATH}/Core/DXUTDevice11.h
|
||||
${SOURCE_PATH}/Core/DXUTmisc.h
|
||||
${SOURCE_PATH}/Core/Screengrab.h
|
||||
${SOURCE_PATH}/Core/WICTextureLoader.h
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
||||
vcpkg_build_msbuild(
|
||||
PROJECT_PATH ${SOURCE_PATH}/DXUT_2015.sln
|
||||
PLATFORM ${BUILD_ARCH}
|
||||
)
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Core/Bin/Desktop_2015/${BUILD_ARCH}/Release/DXUT.dll
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
${SOURCE_PATH}/Core/
|
||||
${SOURCE_PATH}/Optional/
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
)
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/include/Bin)
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Core/Bin/Desktop_2015/${BUILD_ARCH}/Release/DXUT.lib
|
||||
${SOURCE_PATH}/Optional/Bin/Desktop_2015/${BUILD_ARCH}/Release/DXUTOpt.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Core/Bin/Desktop_2015/${BUILD_ARCH}/Debug/DXUT.dll
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Core/Bin/Desktop_2015/${BUILD_ARCH}/Debug/DXUT.lib
|
||||
${SOURCE_PATH}/Optional/Bin/Desktop_2015/${BUILD_ARCH}/Debug/DXUTOpt.lib
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
@ -1,3 +1,4 @@
|
||||
Source: freetype
|
||||
Version: 2.6.3-1
|
||||
Version: 2.6.3-2
|
||||
Build-Depends: zlib
|
||||
Description: A library to render fonts.
|
86
ports/glslang/0001-Fix-export-symbol-for-Windows.patch
Normal file
86
ports/glslang/0001-Fix-export-symbol-for-Windows.patch
Normal file
@ -0,0 +1,86 @@
|
||||
From 1ccadd2cb6db3ce5a00635f65db21e561eb7f705 Mon Sep 17 00:00:00 2001
|
||||
From: vlj <vljn.ovi@gmail.com>
|
||||
Date: Fri, 25 Nov 2016 17:12:35 +0100
|
||||
Subject: [PATCH] Fix export symbol for Windows.
|
||||
|
||||
---
|
||||
StandAlone/CMakeLists.txt | 1 +
|
||||
StandAlone/ResourceLimits.cpp | 3 +++
|
||||
StandAlone/ResourceLimits.h | 10 ++++++++++
|
||||
3 files changed, 14 insertions(+)
|
||||
|
||||
diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt
|
||||
index 231ba27..3aff02e 100644
|
||||
--- a/StandAlone/CMakeLists.txt
|
||||
+++ b/StandAlone/CMakeLists.txt
|
||||
@@ -2,6 +2,7 @@ add_library(glslang-default-resource-limits
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp
|
||||
)
|
||||
set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang)
|
||||
+set_property(TARGET glslang-default-resource-limits PROPERTY COMPILE_DEFINITIONS DLLEXPORT)
|
||||
|
||||
target_include_directories(glslang-default-resource-limits
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
diff --git a/StandAlone/ResourceLimits.cpp b/StandAlone/ResourceLimits.cpp
|
||||
index e22ec80..634d9c9 100644
|
||||
--- a/StandAlone/ResourceLimits.cpp
|
||||
+++ b/StandAlone/ResourceLimits.cpp
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
namespace glslang {
|
||||
|
||||
+DLL_EXPORT
|
||||
const TBuiltInResource DefaultTBuiltInResource = {
|
||||
/* .MaxLights = */ 32,
|
||||
/* .MaxClipPlanes = */ 6,
|
||||
@@ -137,6 +138,7 @@ const TBuiltInResource DefaultTBuiltInResource = {
|
||||
/* .generalConstantMatrixVectorIndexing = */ 1,
|
||||
}};
|
||||
|
||||
+DLL_EXPORT
|
||||
std::string GetDefaultTBuiltInResourceString()
|
||||
{
|
||||
std::ostringstream ostream;
|
||||
@@ -239,6 +241,7 @@ std::string GetDefaultTBuiltInResourceString()
|
||||
return ostream.str();
|
||||
}
|
||||
|
||||
+DLL_EXPORT
|
||||
void DecodeResourceLimits(TBuiltInResource* resources, char* config)
|
||||
{
|
||||
static const char* delims = " \t\n\r";
|
||||
diff --git a/StandAlone/ResourceLimits.h b/StandAlone/ResourceLimits.h
|
||||
index 9c3eb3e..932a59f 100644
|
||||
--- a/StandAlone/ResourceLimits.h
|
||||
+++ b/StandAlone/ResourceLimits.h
|
||||
@@ -39,17 +39,27 @@
|
||||
|
||||
#include "glslang/Include/ResourceLimits.h"
|
||||
|
||||
+#ifdef DLLEXPORT
|
||||
+#define DLL_EXPORT __declspec(dllexport)
|
||||
+#else
|
||||
+#define DLL_EXPORT __declspec(dllimport)
|
||||
+#endif
|
||||
+
|
||||
namespace glslang {
|
||||
|
||||
// These are the default resources for TBuiltInResources, used for both
|
||||
// - parsing this string for the case where the user didn't supply one,
|
||||
// - dumping out a template for user construction of a config file.
|
||||
+
|
||||
+DLL_EXPORT
|
||||
extern const TBuiltInResource DefaultTBuiltInResource;
|
||||
|
||||
// Returns the DefaultTBuiltInResource as a human-readable string.
|
||||
+DLL_EXPORT
|
||||
std::string GetDefaultTBuiltInResourceString();
|
||||
|
||||
// Decodes the resource limits from |config| to |resources|.
|
||||
+DLL_EXPORT
|
||||
void DecodeResourceLimits(TBuiltInResource* resources, char* config);
|
||||
|
||||
} // end namespace glslang
|
||||
--
|
||||
2.10.2.windows.1
|
||||
|
3
ports/glslang/CONTROL
Normal file
3
ports/glslang/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: glslang
|
||||
Version: 1c573fbcfba6b3d631008b1babc838501ca925d3
|
||||
Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator
|
35
ports/glslang/copyright
Normal file
35
ports/glslang/copyright
Normal file
@ -0,0 +1,35 @@
|
||||
//
|
||||
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||
//Copyright (C) 2012-2013 LunarG, 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 3Dlabs Inc. Ltd. 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 HOLDERS 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.
|
||||
//
|
68
ports/glslang/portfile.cmake
Normal file
68
ports/glslang/portfile.cmake
Normal file
@ -0,0 +1,68 @@
|
||||
# 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)
|
||||
find_program(GIT git)
|
||||
|
||||
set(GIT_URL "https://github.com/KhronosGroup/glslang.git")
|
||||
set(GIT_REF "1c573fbcfba6b3d631008b1babc838501ca925d3")
|
||||
|
||||
if(NOT EXISTS "${DOWNLOADS}/glslang.git")
|
||||
message(STATUS "Cloning")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/glslang.git
|
||||
WORKING_DIRECTORY ${DOWNLOADS}
|
||||
LOGNAME clone
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
|
||||
message(STATUS "Adding worktree and patching")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REF}
|
||||
WORKING_DIRECTORY ${DOWNLOADS}/glslang.git
|
||||
LOGNAME worktree
|
||||
)
|
||||
message(STATUS "Patching")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${GIT} apply ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-export-symbol-for-Windows.patch --ignore-whitespace --whitespace=fix
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src
|
||||
LOGNAME patch
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src"
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(COPY "${CURRENT_BUILDTREES_DIR}/src/glslang/Public/ShaderLang.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include/glslang)
|
||||
file(COPY "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe" DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/glslangValidator.exe")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/glslangValidator.exe")
|
||||
file(COPY "${CURRENT_PACKAGES_DIR}/bin/spirv-remap.exe" DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/spirv-remap.exe")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/spirv-remap.exe")
|
||||
|
||||
file(GLOB BIN_DIR "${CURRENT_PACKAGES_DIR}/bin/*")
|
||||
list(LENGTH BIN_DIR BIN_DIR_SIZE)
|
||||
if(${BIN_DIR_SIZE} EQUAL 0)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
||||
endif()
|
||||
file(GLOB DEBUG_BIN_DIR "${CURRENT_PACKAGES_DIR}/debug/bin/*")
|
||||
list(LENGTH DEBUG_BIN_DIR DEBUG_BIN_DIR_SIZE)
|
||||
if(${DEBUG_BIN_DIR_SIZE} EQUAL 0)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/glslang)
|
@ -16,38 +16,10 @@ if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-src)
|
||||
)
|
||||
endif()
|
||||
|
||||
find_program(PYTHON2
|
||||
NAMES python2 python
|
||||
PATHS C:/python27 ENV PYTHON
|
||||
)
|
||||
if(NOT PYTHON2 MATCHES "NOTFOUND")
|
||||
execute_process(
|
||||
COMMAND ${PYTHON2} --version
|
||||
OUTPUT_VARIABLE PYTHON_VER_CHECK_OUT
|
||||
ERROR_VARIABLE PYTHON_VER_CHECK_ERR
|
||||
)
|
||||
set(PYTHON_VER_CHECK "${PYTHON_VER_CHECK_OUT}${PYTHON_VER_CHECK_ERR}")
|
||||
debug_message("PYTHON_VER_CHECK=${PYTHON_VER_CHECK}")
|
||||
if(NOT PYTHON_VER_CHECK MATCHES "Python 2.7")
|
||||
set(PYTHON2 PYTHON2-NOTFOUND)
|
||||
find_program(PYTHON2
|
||||
NAMES python2 python
|
||||
PATHS C:/python27 ENV PYTHON
|
||||
NO_SYSTEM_ENVIRONMENT_PATH
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
vcpkg_find_acquire_program(PYTHON2)
|
||||
|
||||
if(PYTHON2 MATCHES "NOTFOUND")
|
||||
message(FATAL_ERROR "libuv uses the GYP build system, which requires Python 2.7.\n"
|
||||
"Python 2.7 was not found in the path or by searching inside C:\\Python27.\n"
|
||||
"There is no portable redistributable for Python 2.7, so you will need to install the MSI located at:\n"
|
||||
" https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(ENV{GYP_MSVS_VERSION} 2015)
|
||||
set(ENV{PYTHON} ${PYTHON2})
|
||||
set(ENV{GYP_MSVS_VERSION} 2015)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(LIBUV_LINKAGE shared)
|
||||
|
4
ports/pixman/CMakeLists.txt
Normal file
4
ports/pixman/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(pixman VERSION 0.32.0 LANGUAGES C CXX)
|
||||
|
||||
add_subdirectory(pixman)
|
53
ports/pixman/CMakeLists_pixman.txt
Normal file
53
ports/pixman/CMakeLists_pixman.txt
Normal file
@ -0,0 +1,53 @@
|
||||
# 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
|
||||
)
|
3
ports/pixman/CONTROL
Normal file
3
ports/pixman/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: pixman
|
||||
Version: 0.34.0
|
||||
Description: Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization.
|
52
ports/pixman/portfile.cmake
Normal file
52
ports/pixman/portfile.cmake
Normal file
@ -0,0 +1,52 @@
|
||||
# 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. Building static.") # pixman does not export any symbols.
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
endif()
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pixman-0.34.0)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://www.cairographics.org/releases/pixman-0.34.0.tar.gz"
|
||||
FILENAME "pixman-0.34.0.tar.gz"
|
||||
SHA512 81caca5b71582b53aaac473bc37145bd66ba9acebb4773fa8cdb51f4ed7fbcb6954790d8633aad85b2826dd276bcce725e26e37997a517760e9edd72e2669a6d
|
||||
)
|
||||
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)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pixman)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/pixman/COPYING ${CURRENT_PACKAGES_DIR}/share/pixman/copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
@ -0,0 +1,26 @@
|
||||
From ca8bb14234091ab7b1ada2b9e5abb04f40d459cb Mon Sep 17 00:00:00 2001
|
||||
From: Manuel Massing <Manuel Massing m.massing@warped-space.de>
|
||||
Date: Tue, 22 Nov 2016 12:00:39 +0100
|
||||
Subject: [PATCH 1/3] CMake: add detection of recent visual studio versions
|
||||
|
||||
---
|
||||
cmake/Proj4SystemInfo.cmake | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/cmake/Proj4SystemInfo.cmake b/cmake/Proj4SystemInfo.cmake
|
||||
index 294a50b..c7fb6bf 100644
|
||||
--- a/cmake/Proj4SystemInfo.cmake
|
||||
+++ b/cmake/Proj4SystemInfo.cmake
|
||||
@@ -50,6 +50,9 @@ if(WIN32)
|
||||
if(MSVC_VERSION EQUAL 1800)
|
||||
set(PROJ_COMPILER_NAME "msvc-12.0") #Visual Studio 2013
|
||||
endif()
|
||||
+ if(MSVC_VERSION EQUAL 1900)
|
||||
+ set(PROJ_COMPILER_NAME "msvc-14.0") #Visual Studio 2015
|
||||
+ endif()
|
||||
endif(MSVC)
|
||||
|
||||
if(MINGW)
|
||||
--
|
||||
2.9.2.windows.1
|
||||
|
@ -0,0 +1,52 @@
|
||||
From 1265d13f29259be05535241e9bcbfcf16857dc06 Mon Sep 17 00:00:00 2001
|
||||
From: Manuel Massing <Manuel Massing m.massing@warped-space.de>
|
||||
Date: Tue, 22 Nov 2016 12:04:10 +0100
|
||||
Subject: [PATCH 2/3] CMake: fix error by only setting properties for targets
|
||||
which are actually defined
|
||||
|
||||
---
|
||||
src/CMakeLists.txt | 13 +++++++++----
|
||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 8d7e7d1..59ad00a 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -22,25 +22,30 @@ if(NOT MSVC)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
+
|
||||
if(BUILD_CS2CS)
|
||||
- include(bin_cs2cs.cmake)
|
||||
+ list(APPEND BINARY_TARGETS cs2cs)
|
||||
+ include(bin_cs2cs.cmake)
|
||||
endif(BUILD_CS2CS)
|
||||
|
||||
if(BUILD_PROJ)
|
||||
+ list(APPEND BINARY_TARGETS proj)
|
||||
include(bin_proj.cmake)
|
||||
endif(BUILD_PROJ)
|
||||
|
||||
if(BUILD_GEOD)
|
||||
+ list(APPEND BINARY_TARGETS geod)
|
||||
include(bin_geod.cmake)
|
||||
include(bin_geodtest.cmake)
|
||||
endif(BUILD_GEOD)
|
||||
|
||||
if(BUILD_NAD2BIN)
|
||||
+ list(APPEND BINARY_TARGETS nad2bin)
|
||||
include(bin_nad2bin.cmake)
|
||||
endif(BUILD_NAD2BIN)
|
||||
|
||||
-if (MSVC OR CMAKE_CONFIGURATION_TYPES)
|
||||
+if ((MSVC OR CMAKE_CONFIGURATION_TYPES) AND BINARY_TARGETS)
|
||||
# Add _d suffix for your debug versions of the tools
|
||||
- set_target_properties (cs2cs binproj geod nad2bin PROPERTIES
|
||||
- DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
||||
+ set_target_properties(${BINARY_TARGETS} PROPERTIES
|
||||
+ DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
||||
endif ()
|
||||
--
|
||||
2.9.2.windows.1
|
||||
|
@ -0,0 +1,98 @@
|
||||
From 0be627798d943558c674d4d92767ca255d847631 Mon Sep 17 00:00:00 2001
|
||||
From: Manuel Massing <Manuel Massing m.massing@warped-space.de>
|
||||
Date: Tue, 22 Nov 2016 12:26:39 +0100
|
||||
Subject: [PATCH 3/3] CMake: configurable cmake config install location
|
||||
|
||||
---
|
||||
CMakeLists.txt | 1 +
|
||||
cmake/CMakeLists.txt | 14 +++++++-------
|
||||
cmake/Proj4InstallPath.cmake | 12 +++++++++---
|
||||
3 files changed, 17 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index cde21f0..1b1f892 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -106,6 +106,7 @@ set(LIBDIR "${DEFAULT_LIBDIR}" CACHE PATH "The directory to install libraries in
|
||||
set(DATADIR "${DEFAULT_DATADIR}" CACHE PATH "The directory to install data files into.")
|
||||
set(DOCDIR "${DEFAULT_DOCDIR}" CACHE PATH "The directory to install doc files into.")
|
||||
set(INCLUDEDIR "${DEFAULT_INCLUDEDIR}" CACHE PATH "The directory to install includes into.")
|
||||
+set(CMAKEDIR "${DEFAULT_CMAKE_CONFIGDIR}" CACHE PATH "The directory to install cmake files into.")
|
||||
|
||||
#################################################################################
|
||||
# Build configured components
|
||||
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
|
||||
index 742da0e..2bdef0d 100644
|
||||
--- a/cmake/CMakeLists.txt
|
||||
+++ b/cmake/CMakeLists.txt
|
||||
@@ -2,13 +2,13 @@
|
||||
# ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative
|
||||
# path to the root from there. (Note that the whole install tree can
|
||||
# be relocated.)
|
||||
-if (NOT WIN32)
|
||||
- set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}")
|
||||
- set (PROJECT_ROOT_DIR "../../..")
|
||||
-else ()
|
||||
- set (INSTALL_CMAKE_DIR "cmake")
|
||||
- set (PROJECT_ROOT_DIR "..")
|
||||
-endif ()
|
||||
+
|
||||
+set (INSTALL_CMAKE_DIR ${CMAKEDIR})
|
||||
+if(NOT IS_ABSOLUTE ${INSTALL_CMAKE_DIR})
|
||||
+ set(INSTALL_CMAKE_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKEDIR}")
|
||||
+endif()
|
||||
+
|
||||
+file(RELATIVE_PATH PROJECT_ROOT_DIR ${INSTALL_CMAKE_DIR} ${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
|
||||
configure_file (project-config.cmake.in project-config.cmake @ONLY)
|
||||
diff --git a/cmake/Proj4InstallPath.cmake b/cmake/Proj4InstallPath.cmake
|
||||
index da1491c..826fb29 100644
|
||||
--- a/cmake/Proj4InstallPath.cmake
|
||||
+++ b/cmake/Proj4InstallPath.cmake
|
||||
@@ -28,13 +28,15 @@ if(WIN32)
|
||||
set(DEFAULT_DATA_SUBDIR share)
|
||||
set(DEFAULT_INCLUDE_SUBDIR local/include)
|
||||
set(DEFAULT_DOC_SUBDIR share/doc/proj)
|
||||
+ set(DEFAULT_CMAKE_CONFIG_SUBDIR "cmake")
|
||||
else()
|
||||
- # Common locatoins for Unix and Mac OS X
|
||||
+ # Common locations for Unix and Mac OS X
|
||||
set(DEFAULT_BIN_SUBDIR bin)
|
||||
set(DEFAULT_LIB_SUBDIR lib)
|
||||
set(DEFAULT_DATA_SUBDIR share/proj)
|
||||
set(DEFAULT_DOC_SUBDIR doc/proj)
|
||||
set(DEFAULT_INCLUDE_SUBDIR include)
|
||||
+ set(DEFAULT_CMAKE_CONFIG_SUBDIR "share/cmake/${PROJECT_NAME}")
|
||||
endif()
|
||||
|
||||
# Locations are changeable by user to customize layout of PDAL installation
|
||||
@@ -49,19 +51,23 @@ set(PROJ_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING
|
||||
"Subdirectory where data will be installed")
|
||||
set(PROJ_DOC_SUBDIR ${DEFAULT_DOC_SUBDIR} CACHE STRING
|
||||
"Subdirectory where data will be installed")
|
||||
-
|
||||
+set(PROJ_CMAKE_CONFIG_SUBDIR ${DEFAULT_CMAKE_CONFIG_SUBDIR} CACHE STRING
|
||||
+ "Subdirectory where cmake configuration files will be installed")
|
||||
+
|
||||
# Mark *DIR variables as advanced and dedicated to use by power-users only.
|
||||
mark_as_advanced(PROJ_ROOT_DIR
|
||||
PROJ_BIN_SUBDIR
|
||||
PROJ_LIB_SUBDIR
|
||||
PROJ_INCLUDE_SUBDIR
|
||||
PROJ_DATA_SUBDIR
|
||||
- PROJ_DOC_SUBDIR )
|
||||
+ PROJ_DOC_SUBDIR
|
||||
+ PROJ_CMAKE_CONFIG_SUBDIR)
|
||||
|
||||
set(DEFAULT_BINDIR "${PROJ_BIN_SUBDIR}")
|
||||
set(DEFAULT_LIBDIR "${PROJ_LIB_SUBDIR}")
|
||||
set(DEFAULT_DATADIR "${PROJ_DATA_SUBDIR}")
|
||||
set(DEFAULT_DOCDIR "${PROJ_DOC_SUBDIR}")
|
||||
set(DEFAULT_INCLUDEDIR "${PROJ_INCLUDE_SUBDIR}")
|
||||
+set(DEFAULT_CMAKE_CONFIGDIR "${PROJ_CMAKE_CONFIG_SUBDIR}")
|
||||
|
||||
|
||||
--
|
||||
2.9.2.windows.1
|
||||
|
3
ports/proj/CONTROL
Normal file
3
ports/proj/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: proj
|
||||
Version: 4.9.3
|
||||
Description: PROJ.4 library for cartographic projections
|
57
ports/proj/portfile.cmake
Normal file
57
ports/proj/portfile.cmake
Normal file
@ -0,0 +1,57 @@
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/proj-4.9.3)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://download.osgeo.org/proj/proj-4.9.3.zip"
|
||||
FILENAME "proj-4.9.3.zip"
|
||||
SHA512 c9703008cd1f75fe1239b180158e560b9b88ae2ffd900b72923c716908eb86d1abbc4230647af5e3131f8c34481bdc66b03826d669620161ffcfbe67801cb631
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}/
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001-CMake-add-detection-of-recent-visual-studio-versions.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0003-CMake-configurable-cmake-config-install-location.patch
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=YES")
|
||||
else()
|
||||
list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=NO")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS ${CMAKE_OPTIONS}
|
||||
-DPROJ_LIB_SUBDIR=lib
|
||||
-DPROJ_INCLUDE_SUBDIR=include
|
||||
-DPROJ_DATA_SUBDIR=share/proj
|
||||
-DPROJ_CMAKE_CONFIG_SUBDIR=share/proj
|
||||
-DBUILD_CS2CS=NO
|
||||
-DBUILD_PROJ=NO
|
||||
-DBUILD_GEOD=NO
|
||||
-DBUILD_NAD2BIN=NO
|
||||
-DPROJ4_TESTS=NO
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
|
||||
# Rename library and adapt cmake configuration
|
||||
# N.B. debug cmake export is not copied, as it's not relocatable
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/share/proj/proj4-targets-release.cmake PROJ4_TARGETS_RELEASE)
|
||||
string(REPLACE "proj_4_9.lib" "proj.lib" PROJ4_TARGETS_RELEASE ${PROJ4_TARGETS_RELEASE})
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj/proj4-targets-release.cmake ${PROJ4_TARGETS_RELEASE})
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib)
|
||||
|
||||
# Remove duplicate headers installed from debug build
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
# Remove data installed from debug build
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/proj)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/proj/COPYING ${CURRENT_PACKAGES_DIR}/share/proj/copyright)
|
@ -1,3 +1,3 @@
|
||||
Source: rxcpp
|
||||
Version: 2.3.0
|
||||
Version: 3.0.0
|
||||
Description: Reactive Extensions for C++
|
@ -1,12 +1,12 @@
|
||||
#header-only library
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/RxCpp-2.3.0)
|
||||
vcpkg_download_distfile(ARCHIVE_FILE
|
||||
URLS "https://github.com/Reactive-Extensions/RxCpp/archive/v2.3.0.tar.gz"
|
||||
FILENAME "RxCpp-2.3.0.tar.gz"
|
||||
SHA512 180cf36777b0c14e989b4b79f01fcda7ecabfe4b3cee3ad7343138497578af02745de63f74941ec228eac3fccca4a7dfdfdd1c4d16a89438022dca6f9968953f
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/RxCpp-3.0.0)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/Reactive-Extensions/RxCpp/archive/v3.0.0.tar.gz"
|
||||
FILENAME "RxCpp-v3.0.0.tar.gz"
|
||||
SHA512 6d810b6163d0920d531f32a13729e290c81b47d5fc9c3e3d3d8a25d27a6f0671fec097d091bef7383b7e556e9e5471db087bb955e7f4fd9a5fdc9e7b06050844
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE_FILE})
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Rx/v2/src/rxcpp
|
||||
|
@ -1,3 +1,4 @@
|
||||
Source: tiff
|
||||
Version: 4.0.6
|
||||
Version: 4.0.6-1
|
||||
Build-Depends: zlib
|
||||
Description: A library that supports the manipulation of TIFF image files
|
3
ports/zstd/CONTROL
Normal file
3
ports/zstd/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: zstd
|
||||
Version: 1.1.1
|
||||
Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net
|
42
ports/zstd/portfile.cmake
Normal file
42
ports/zstd/portfile.cmake
Normal file
@ -0,0 +1,42 @@
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/zstd-1.1.1)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/facebook/zstd/archive/v1.1.1.zip"
|
||||
FILENAME "zstd-1.1.1.zip"
|
||||
SHA512 c96a97519202a759c62f661c7bbaeaa0d48e4e78588a8232ad23fd78fe7c3440f1f07d996dcf07daa652569e1c5e39cb7b93103b9ec7845db05b161ec29a8dde
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}/build/cmake
|
||||
OPTIONS -DZSTD_LEGACY_SUPPORT=1
|
||||
)
|
||||
vcpkg_build_cmake()
|
||||
|
||||
# Manual install
|
||||
message(STATUS "Installing")
|
||||
|
||||
file(COPY ${SOURCE_PATH}/lib/zstd.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(COPY ${SOURCE_PATH}/lib/common/zbuff.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(COPY ${SOURCE_PATH}/lib/dictBuilder/zdict.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
set(RELDIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/Release)
|
||||
set(DEBDIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/Debug)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
file(INSTALL ${RELDIR}/zstdlib.1.1.1024_${TRIPLET_SYSTEM_ARCH}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME zstdlib.lib)
|
||||
file(INSTALL ${DEBDIR}/zstdlib.1.1.1024_${TRIPLET_SYSTEM_ARCH}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib RENAME zstdlib.lib)
|
||||
file(INSTALL ${RELDIR}/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dll")
|
||||
file(INSTALL ${DEBDIR}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dll")
|
||||
vcpkg_copy_pdbs()
|
||||
else()
|
||||
file(INSTALL ${RELDIR}/zstdlib_${TRIPLET_SYSTEM_ARCH}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME zstdlib.lib)
|
||||
file(INSTALL ${DEBDIR}/zstdlib_${TRIPLET_SYSTEM_ARCH}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib RENAME zstdlib.lib)
|
||||
endif()
|
||||
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/zstd)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/zstd/LICENSE ${CURRENT_PACKAGES_DIR}/share/zstd/copyright)
|
||||
|
||||
message(STATUS "Installing done")
|
@ -30,6 +30,28 @@ function(vcpkg_find_acquire_program VAR)
|
||||
set(URL "https://www.python.org/ftp/python/3.5.2/python-3.5.2-embed-amd64.zip")
|
||||
set(ARCHIVE "python-3.5.2-embed-amd64.zip")
|
||||
set(HASH 48bdcb6f94c993acad6782ee33ad4a07a0ea3b9b1bfcdeadf446d459a9224336837e2e7b518d54d8d99c5c3f4e9f8877ea1789cae513fa2eda2a3cad9e4dfd8f)
|
||||
elseif(VAR MATCHES "PYTHON2")
|
||||
find_program(PYTHON2 NAMES python2 python PATHS C:/python27 ENV PYTHON)
|
||||
if(NOT PYTHON2 MATCHES "NOTFOUND")
|
||||
execute_process(
|
||||
COMMAND ${PYTHON2} --version
|
||||
OUTPUT_VARIABLE PYTHON_VER_CHECK_OUT
|
||||
ERROR_VARIABLE PYTHON_VER_CHECK_ERR
|
||||
)
|
||||
set(PYTHON_VER_CHECK "${PYTHON_VER_CHECK_OUT}${PYTHON_VER_CHECK_ERR}")
|
||||
debug_message("PYTHON_VER_CHECK=${PYTHON_VER_CHECK}")
|
||||
if(NOT PYTHON_VER_CHECK MATCHES "Python 2.7")
|
||||
set(PYTHON2 PYTHON2-NOTFOUND)
|
||||
find_program(PYTHON2 NAMES python2 python PATHS C:/python27 ENV PYTHON NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
endif()
|
||||
endif()
|
||||
if(PYTHON2 MATCHES "NOTFOUND")
|
||||
message(FATAL_ERROR "libuv uses the GYP build system, which requires Python 2.7.\n"
|
||||
"Python 2.7 was not found in the path or by searching inside C:\\Python27.\n"
|
||||
"There is no portable redistributable for Python 2.7, so you will need to install the MSI located at:\n"
|
||||
" https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi\n"
|
||||
)
|
||||
endif()
|
||||
elseif(VAR MATCHES "JOM")
|
||||
set(PROGNAME jom)
|
||||
set(PATHS ${DOWNLOADS}/tools/jom)
|
||||
|
@ -1 +1 @@
|
||||
"0.0.60"
|
||||
"0.0.61"
|
@ -46,8 +46,8 @@ namespace vcpkg
|
||||
|
||||
const ConfigurationType& config() const;
|
||||
const LinkageType& linkage() const;
|
||||
const std::regex& crt_regex() const;
|
||||
const std::string& toString() const;
|
||||
const std::regex crt_regex() const;
|
||||
const std::string toString() const;
|
||||
|
||||
private:
|
||||
BuildType(const ConfigurationType& config, const LinkageType& linkage, const std::string& crt_regex_as_string)
|
||||
@ -106,7 +106,7 @@ namespace vcpkg
|
||||
|
||||
OutdatedDynamicCrt() = delete;
|
||||
|
||||
const std::regex& crt_regex() const;
|
||||
const std::regex crt_regex() const;
|
||||
const std::string& toString() const;
|
||||
|
||||
private:
|
||||
|
@ -14,15 +14,15 @@ namespace vcpkg
|
||||
return this->m_linkage;
|
||||
}
|
||||
|
||||
const std::regex& BuildType::crt_regex() const
|
||||
const std::regex BuildType::crt_regex() const
|
||||
{
|
||||
static const std::regex r(this->m_crt_regex_as_string, std::regex_constants::icase);
|
||||
const std::regex r(this->m_crt_regex_as_string, std::regex_constants::icase);
|
||||
return r;
|
||||
}
|
||||
|
||||
const std::string& BuildType::toString() const
|
||||
const std::string BuildType::toString() const
|
||||
{
|
||||
static const std::string s = Strings::format("[%s,%s]", to_string(this->m_config), to_string(this->m_linkage));
|
||||
const std::string s = Strings::format("[%s,%s]", to_string(this->m_config), to_string(this->m_linkage));
|
||||
return s;
|
||||
}
|
||||
|
||||
@ -151,9 +151,9 @@ namespace vcpkg
|
||||
const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCRT20_DLL = OutdatedDynamicCrt("msvcrt20.dll", R"(msvcrt20\.dll)");;
|
||||
const OutdatedDynamicCrt OutdatedDynamicCrt::MSVCRT40_DLL = OutdatedDynamicCrt("msvcrt40.dll", R"(msvcrt40\.dll)");;
|
||||
|
||||
const std::regex& OutdatedDynamicCrt::crt_regex() const
|
||||
const std::regex OutdatedDynamicCrt::crt_regex() const
|
||||
{
|
||||
static const std::regex r(this->m_crt_regex_as_string, std::regex_constants::icase);
|
||||
const std::regex r(this->m_crt_regex_as_string, std::regex_constants::icase);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <set>
|
||||
#include "Paragraphs.h"
|
||||
#include "SourceParagraph.h"
|
||||
#include "vcpkg_Environment.h"
|
||||
|
||||
namespace vcpkg
|
||||
{
|
||||
@ -87,14 +88,28 @@ namespace vcpkg
|
||||
return names_and_versions;
|
||||
}
|
||||
|
||||
static void check_commit_exists(const std::wstring& git_commit_id)
|
||||
{
|
||||
static const std::string VALID_COMMIT_OUTPUT = "commit\n";
|
||||
|
||||
const std::wstring cmd = Strings::wformat(LR"(git cat-file -t %s 2>NUL)", git_commit_id);
|
||||
const System::exit_code_and_output output = System::cmd_execute_and_capture_output(cmd);
|
||||
Checks::check_exit(output.output == VALID_COMMIT_OUTPUT, "Invalid commit id %s", Strings::utf16_to_utf8(git_commit_id));
|
||||
}
|
||||
|
||||
void portsdiff_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
|
||||
{
|
||||
static const std::string example = Strings::format("The argument should be a branch/tag/hash to checkout.\n%s", create_example_string("portsdiff mybranchname"));
|
||||
args.check_min_arg_count(1, example.c_str());
|
||||
args.check_max_arg_count(2, example.c_str());
|
||||
|
||||
Environment::ensure_git_on_path(paths);
|
||||
const std::wstring git_commit_id_for_previous_snapshot = Strings::utf8_to_utf16(args.command_arguments.at(0));
|
||||
const std::wstring git_commit_id_for_current_snapshot = args.command_arguments.size() < 2 ? L"HEAD" : Strings::utf8_to_utf16(args.command_arguments.at(1));
|
||||
|
||||
check_commit_exists(git_commit_id_for_current_snapshot);
|
||||
check_commit_exists(git_commit_id_for_previous_snapshot);
|
||||
|
||||
const std::map<std::string, std::string> current_names_and_versions = read_ports_from_commit(paths, git_commit_id_for_current_snapshot);
|
||||
const std::map<std::string, std::string> previous_names_and_versions = read_ports_from_commit(paths, git_commit_id_for_previous_snapshot);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user