mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 17:51:47 +08:00
Merge branch 'master' of https://github.com/Microsoft/vcpkg into qca
This commit is contained in:
commit
5ba4567c02
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()
|
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
|
||||
Description: A library for transferring data with URLs
|
||||
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)
|
@ -1,3 +1,3 @@
|
||||
Source: dxut
|
||||
Version: 11.14
|
||||
Version: 11.14-1
|
||||
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,11 +11,6 @@ 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
|
||||
)
|
||||
@ -37,18 +32,10 @@ file(INSTALL
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
||||
)
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Core/Bin/Desktop_2015/${BUILD_ARCH}/Release/DXUT.dll
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/Core/Bin/Desktop_2015/${BUILD_ARCH}/Release/DXUT.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
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
|
@ -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.
|
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()
|
@ -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")
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user