From 47af38473c6ff427b75263041a62484ffac1b03c Mon Sep 17 00:00:00 2001 From: Saul Thurrowgood Date: Wed, 23 Nov 2016 11:00:31 +1100 Subject: Add zstd port --- ports/zstd/CONTROL | 3 +++ ports/zstd/portfile.cmake | 58 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 ports/zstd/CONTROL create mode 100644 ports/zstd/portfile.cmake diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL new file mode 100644 index 000000000..f92f610a4 --- /dev/null +++ b/ports/zstd/CONTROL @@ -0,0 +1,3 @@ +Source: zstd +Version: 1.1.1 +Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake new file mode 100644 index 000000000..c7c276e7a --- /dev/null +++ b/ports/zstd/portfile.cmake @@ -0,0 +1,58 @@ +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 since zstd guarded all their installation functions behind an if (UNIX) +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) + +# Copy the command-line zstd exe +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/programs/Release/ + DESTINATION ${CURRENT_PACKAGES_DIR}/tools + FILES_MATCHING PATTERN "zstd.exe") + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + # Dynamic libs of zstd appear to start with "zstdlib." + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/Release/ + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + FILES_MATCHING PATTERN "zstdlib.*.lib") + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/Release/ + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + FILES_MATCHING PATTERN "zstdlib.*.dll") + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/Debug/ + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + FILES_MATCHING PATTERN "zstdlib.*.lib") + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/Debug/ + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + FILES_MATCHING PATTERN "zstdlib.*.dll") +else() + # Static libs of zstd appear to start with "zstdlib_" + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/Release/ + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + FILES_MATCHING PATTERN "zstdlib_*.lib") + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/Debug/ + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + FILES_MATCHING PATTERN "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) + +vcpkg_copy_pdbs() +message(STATUS "Installing done") -- cgit v1.2.3 From 5c745463008a800cba3af3a4af06e83823d248f7 Mon Sep 17 00:00:00 2001 From: Saul Thurrowgood Date: Wed, 23 Nov 2016 17:56:56 +1100 Subject: zstd port: rename to non-versioned libs, don't --- ports/zstd/portfile.cmake | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index c7c276e7a..e9ba07b54 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -21,11 +21,6 @@ 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) -# Copy the command-line zstd exe -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/programs/Release/ - DESTINATION ${CURRENT_PACKAGES_DIR}/tools - FILES_MATCHING PATTERN "zstd.exe") - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) # Dynamic libs of zstd appear to start with "zstdlib." file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/Release/ -- cgit v1.2.3 From 431f5e12a3626ac522fb468e44b7b3549f2d2fe1 Mon Sep 17 00:00:00 2001 From: Saul Thurrowgood Date: Wed, 23 Nov 2016 17:58:25 +1100 Subject: zstd port: rename libs to non-versioned names --- ports/zstd/portfile.cmake | 57 ++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index e9ba07b54..7384e5461 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -7,47 +7,58 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +# Name dynamic libs to be non-versioned and simpler "zstd". +# Avoid name conflict with static, so postfix static to "zstd-static" +# This seems to be less painful than renaming a DLL file after creation. +set(lib_cmake_filename ${SOURCE_PATH}/build/cmake/lib/CMakeLists.txt) +if (NOT EXISTS ${lib_cmake_filename}.orig) + file(INSTALL ${SOURCE_PATH}/build/cmake/lib/CMakeLists.txt + DESTINATION ${SOURCE_PATH}/build/cmake/lib + RENAME CMakeLists.txt.orig) +endif() +file(READ "${lib_cmake_filename}" lib_cmake_content) +string(REPLACE + "SET(SHARED_LIBRARY_OUTPUT_NAME \${LIBRARY_BASE_NAME}.\${LIBVER_MAJOR}.\${LIBVER_MINOR}.\${LIBVER_RELEASE})" + "SET(SHARED_LIBRARY_OUTPUT_NAME zstd)" + lib_cmake_content + "${lib_cmake_content}" +) +string(REPLACE + "SET(STATIC_LIBRARY_OUTPUT_NAME \${LIBRARY_BASE_NAME})" + "SET(STATIC_LIBRARY_OUTPUT_NAME zstd-static)" + lib_cmake_content + "${lib_cmake_content}" +) +file(WRITE "${lib_cmake_filename}" "${lib_cmake_content}") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/build/cmake OPTIONS -DZSTD_LEGACY_SUPPORT=1 ) - vcpkg_build_cmake() -# Manual install since zstd guarded all their installation functions behind an if (UNIX) +# 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) - # Dynamic libs of zstd appear to start with "zstdlib." - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/Release/ - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - FILES_MATCHING PATTERN "zstdlib.*.lib") - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/Release/ - DESTINATION ${CURRENT_PACKAGES_DIR}/bin - FILES_MATCHING PATTERN "zstdlib.*.dll") - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/Debug/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - FILES_MATCHING PATTERN "zstdlib.*.lib") - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/Debug/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - FILES_MATCHING PATTERN "zstdlib.*.dll") + file(INSTALL ${RELDIR}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "zstd_*.lib") + file(INSTALL ${RELDIR}/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "zstd_*.dll") + file(INSTALL ${DEBDIR}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "zstd_*.lib") + file(INSTALL ${DEBDIR}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "zstd_*.dll") + vcpkg_copy_pdbs() else() - # Static libs of zstd appear to start with "zstdlib_" - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/Release/ - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - FILES_MATCHING PATTERN "zstdlib_*.lib") - file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/Debug/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - FILES_MATCHING PATTERN "zstdlib_*.lib") + file(INSTALL ${RELDIR}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "zstd-static_*.lib") + file(INSTALL ${DEBDIR}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "zstd-static_*.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) -vcpkg_copy_pdbs() message(STATUS "Installing done") -- cgit v1.2.3 From 266703eab8b6ecde6b64e2e1a6cd52be6cb6b4e3 Mon Sep 17 00:00:00 2001 From: sdcb Date: Fri, 25 Nov 2016 16:42:12 +0800 Subject: [dxut] switch dxut building static lib dxut is by building static library by default, my previous PR forcing dxut building dynamic by creating a huge patch (basically add dllimport/dllexport everywhere). This PR droped the huge patch and switch building static library (which is the upstream default behavior). related issue: https://github.com/Microsoft/DXUT/issues/8 --- ports/dxut/CONTROL | 2 +- ports/dxut/dll.patch | 834 ---------------------------------------------- ports/dxut/portfile.cmake | 19 +- 3 files changed, 4 insertions(+), 851 deletions(-) delete mode 100644 ports/dxut/dll.patch diff --git a/ports/dxut/CONTROL b/ports/dxut/CONTROL index ee632dfab..56fefdb32 100644 --- a/ports/dxut/CONTROL +++ b/ports/dxut/CONTROL @@ -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 \ No newline at end of file diff --git a/ports/dxut/dll.patch b/ports/dxut/dll.patch deleted file mode 100644 index 4557ab88a..000000000 --- a/ports/dxut/dll.patch +++ /dev/null @@ -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 - #include - -+#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 @@ - - - -- StaticLibrary -+ DynamicLibrary - Unicode - v140 - - -- StaticLibrary -+ DynamicLibrary - Unicode - v140 - - -- StaticLibrary -+ DynamicLibrary - true - Unicode - v140 - - -- StaticLibrary -+ DynamicLibrary - true - Unicode - v140 - - -- StaticLibrary -+ DynamicLibrary - true - Unicode - v140 - - -- StaticLibrary -+ DynamicLibrary - true - Unicode - v140 -@@ -147,7 +147,7 @@ - StreamingSIMDExtensions2 - Sync - %(AdditionalOptions) -- WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) -+ DXUT_EXPORT;WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) - EditAndContinue - EnableFastChecks - $(IntDir)$(TargetName).pdb -@@ -156,7 +156,7 @@ - - - %(AdditionalOptions) -- %(AdditionalDependencies) -+ comctl32.lib;%(AdditionalDependencies) - Windows - true - true -@@ -188,7 +188,7 @@ - Fast - Sync - %(AdditionalOptions) -- WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) -+ DXUT_EXPORT;WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) - EnableFastChecks - $(IntDir)$(TargetName).pdb - Use -@@ -196,7 +196,7 @@ - - - %(AdditionalOptions) -- %(AdditionalDependencies) -+ comctl32.lib;%(AdditionalDependencies) - Windows - true - true -@@ -230,14 +230,14 @@ - StreamingSIMDExtensions2 - Sync - %(AdditionalOptions) -- WIN32;NDEBUG;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) -+ DXUT_EXPORT;WIN32;NDEBUG;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) - $(IntDir)$(TargetName).pdb - Use - DXUT.h - - - %(AdditionalOptions) -- %(AdditionalDependencies) -+ comctl32.lib;%(AdditionalDependencies) - true - Windows - true -@@ -272,14 +272,14 @@ - Fast - Sync - %(AdditionalOptions) -- WIN32;NDEBUG;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) -+ DXUT_EXPORT;WIN32;NDEBUG;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) - $(IntDir)$(TargetName).pdb - Use - DXUT.h - - - %(AdditionalOptions) -- %(AdditionalDependencies) -+ comctl32.lib;%(AdditionalDependencies) - true - Windows - true -@@ -315,14 +315,14 @@ - StreamingSIMDExtensions2 - Sync - %(AdditionalOptions) -- WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) -+ DXUT_EXPORT;WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) - $(IntDir)$(TargetName).pdb - Use - DXUT.h - - - %(AdditionalOptions) -- %(AdditionalDependencies) -+ comctl32.lib;%(AdditionalDependencies) - true - Windows - true -@@ -357,14 +357,14 @@ - Fast - Sync - %(AdditionalOptions) -- WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) -+ DXUT_EXPORT;WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;USE_DIRECT3D11_2;_WIN32_WINNT=0x0600;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) - $(IntDir)$(TargetName).pdb - Use - DXUT.h - - - %(AdditionalOptions) -- %(AdditionalDependencies) -+ comctl32.lib;%(AdditionalDependencies) - true - Windows - true -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 - #include - -+#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 - #include - -+#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 - diff --git a/ports/dxut/portfile.cmake b/ports/dxut/portfile.cmake index 774ef4d5f..294f64a1f 100644 --- a/ports/dxut/portfile.cmake +++ b/ports/dxut/portfile.cmake @@ -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) -- cgit v1.2.3 From 5cc2e93a6f9105ff246f5405bcfcc36f20357b3a Mon Sep 17 00:00:00 2001 From: sdcb Date: Fri, 25 Nov 2016 17:37:48 +0800 Subject: Add directxtk Note: 1. dynamic build is not supported, because upstream build are static by default. 2. Currently uwp build are not supported, it can eanbled by swith to using DirectXTK_Windows10.sln instead of DirectXTK_Desktop_2015_Win10.sln. We can enable it in the future. --- ports/directxtk/CONTROL | 3 +++ ports/directxtk/portfile.cmake | 51 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 ports/directxtk/CONTROL create mode 100644 ports/directxtk/portfile.cmake diff --git a/ports/directxtk/CONTROL b/ports/directxtk/CONTROL new file mode 100644 index 000000000..c9c00c89c --- /dev/null +++ b/ports/directxtk/CONTROL @@ -0,0 +1,3 @@ +Source: directxtk +Version: oct2016 +Description: A collection of helper classes for writing DirectX 11.x code in C++. \ No newline at end of file diff --git a/ports/directxtk/portfile.cmake b/ports/directxtk/portfile.cmake new file mode 100644 index 000000000..8315cd196 --- /dev/null +++ b/ports/directxtk/portfile.cmake @@ -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 +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/directxtk RENAME copyright) -- cgit v1.2.3 From 57f051776f3015e51045bab19d71fa8f7a69c81b Mon Sep 17 00:00:00 2001 From: "Michael B. McLaughlin" Date: Fri, 25 Nov 2016 18:48:19 -0500 Subject: Added ports for pixman 0.32.0 and cairo 1.14.6. Note that neither support UWP (pixman can only build as a static library due to having no exports and cairo depends on GDI among other things). Also, cairo depends on pixman, libpng, and zlib. --- ports/cairo/CMakeLists.txt | 3 + ports/cairo/CMakeLists_cairo.txt | 250 +++++++++++++++++++++++++++++++++++++ ports/cairo/CONTROL | 4 + ports/cairo/cairo-features.h | 27 ++++ ports/cairo/portfile.cmake | 54 ++++++++ ports/pixman/CMakeLists.txt | 4 + ports/pixman/CMakeLists_pixman.txt | 53 ++++++++ ports/pixman/CONTROL | 3 + ports/pixman/portfile.cmake | 52 ++++++++ 9 files changed, 450 insertions(+) create mode 100644 ports/cairo/CMakeLists.txt create mode 100644 ports/cairo/CMakeLists_cairo.txt create mode 100644 ports/cairo/CONTROL create mode 100644 ports/cairo/cairo-features.h create mode 100644 ports/cairo/portfile.cmake create mode 100644 ports/pixman/CMakeLists.txt create mode 100644 ports/pixman/CMakeLists_pixman.txt create mode 100644 ports/pixman/CONTROL create mode 100644 ports/pixman/portfile.cmake diff --git a/ports/cairo/CMakeLists.txt b/ports/cairo/CMakeLists.txt new file mode 100644 index 000000000..348732130 --- /dev/null +++ b/ports/cairo/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.0) +project(cairo VERSION 1.14.6 LANGUAGES C CXX) +add_subdirectory(src) diff --git a/ports/cairo/CMakeLists_cairo.txt b/ports/cairo/CMakeLists_cairo.txt new file mode 100644 index 000000000..f445605b9 --- /dev/null +++ b/ports/cairo/CMakeLists_cairo.txt @@ -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() diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL new file mode 100644 index 000000000..017569c50 --- /dev/null +++ b/ports/cairo/CONTROL @@ -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 diff --git a/ports/cairo/cairo-features.h b/ports/cairo/cairo-features.h new file mode 100644 index 000000000..b9277b7f7 --- /dev/null +++ b/ports/cairo/cairo-features.h @@ -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 diff --git a/ports/cairo/portfile.cmake b/ports/cairo/portfile.cmake new file mode 100644 index 000000000..2131bd146 --- /dev/null +++ b/ports/cairo/portfile.cmake @@ -0,0 +1,54 @@ +# Common Ambient Variables: +# VCPKG_ROOT_DIR = +# 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() diff --git a/ports/pixman/CMakeLists.txt b/ports/pixman/CMakeLists.txt new file mode 100644 index 000000000..aad6ec778 --- /dev/null +++ b/ports/pixman/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.0) +project(pixman VERSION 0.32.0 LANGUAGES C CXX) + +add_subdirectory(pixman) \ No newline at end of file diff --git a/ports/pixman/CMakeLists_pixman.txt b/ports/pixman/CMakeLists_pixman.txt new file mode 100644 index 000000000..c8030bcd6 --- /dev/null +++ b/ports/pixman/CMakeLists_pixman.txt @@ -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 +) diff --git a/ports/pixman/CONTROL b/ports/pixman/CONTROL new file mode 100644 index 000000000..564c81466 --- /dev/null +++ b/ports/pixman/CONTROL @@ -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. diff --git a/ports/pixman/portfile.cmake b/ports/pixman/portfile.cmake new file mode 100644 index 000000000..b4029a26b --- /dev/null +++ b/ports/pixman/portfile.cmake @@ -0,0 +1,52 @@ +# Common Ambient Variables: +# VCPKG_ROOT_DIR = +# 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() -- cgit v1.2.3 From 1794eec16dd4f329a2d751b7be0f1e33d2a02124 Mon Sep 17 00:00:00 2001 From: flysha Date: Sat, 26 Nov 2016 09:58:03 +0800 Subject: [rxcpp] Upgrade to latest 3.0.0 --- ports/rxcpp/CONTROL | 2 +- ports/rxcpp/portfile.cmake | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/rxcpp/CONTROL b/ports/rxcpp/CONTROL index b4440da35..02b873816 100644 --- a/ports/rxcpp/CONTROL +++ b/ports/rxcpp/CONTROL @@ -1,3 +1,3 @@ Source: rxcpp -Version: 2.3.0 +Version: 3.0.0 Description: Reactive Extensions for C++ \ No newline at end of file diff --git a/ports/rxcpp/portfile.cmake b/ports/rxcpp/portfile.cmake index 65062c360..440c7ccf3 100644 --- a/ports/rxcpp/portfile.cmake +++ b/ports/rxcpp/portfile.cmake @@ -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 "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 -- cgit v1.2.3 From 420795eed17f103db1c2597f939d14bcabb2173e Mon Sep 17 00:00:00 2001 From: Kirk Shoop Date: Fri, 25 Nov 2016 19:27:07 -0800 Subject: update rxcpp to 3.0.0 --- ports/rxcpp/CONTROL | 2 +- ports/rxcpp/portfile.cmake | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ports/rxcpp/CONTROL b/ports/rxcpp/CONTROL index b4440da35..02b873816 100644 --- a/ports/rxcpp/CONTROL +++ b/ports/rxcpp/CONTROL @@ -1,3 +1,3 @@ Source: rxcpp -Version: 2.3.0 +Version: 3.0.0 Description: Reactive Extensions for C++ \ No newline at end of file diff --git a/ports/rxcpp/portfile.cmake b/ports/rxcpp/portfile.cmake index 65062c360..8180c2051 100644 --- a/ports/rxcpp/portfile.cmake +++ b/ports/rxcpp/portfile.cmake @@ -1,20 +1,15 @@ #header-only library include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/RxCpp-2.3.0) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/RxCpp-3.0.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 + URLS "https://github.com/Reactive-Extensions/RxCpp/archive/v3.0.0.tar.gz" + FILENAME "RxCpp-3.0.0.tar.gz" + SHA512 f30f71cefee25f86297d66a49e752a44bdb8ad9a1a92249bf944101afd91b432564e9b8c9e8853f7042608030bffaa4d58d294f18a61f394701cee347f42bcbb ) vcpkg_extract_source_archive(${ARCHIVE_FILE}) file(INSTALL - ${SOURCE_PATH}/Rx/v2/src/rxcpp - DESTINATION ${CURRENT_PACKAGES_DIR}/include -) - -file(INSTALL - ${SOURCE_PATH}/Ix/CPP/src/cpplinq + ${SOURCE_PATH}/Rx/v2/src DESTINATION ${CURRENT_PACKAGES_DIR}/include ) -- cgit v1.2.3 From bff67a592def0047547237ec2b0e6420e055dba6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 25 Nov 2016 21:44:01 -0800 Subject: Revert "Merge pull request #348 from kirkshoop/rxcpp3.0.0" This reverts commit 82c29e0dc5f7a19f6294b2b654acf2c7b5bae60d, reversing changes made to a5b1ed784aafd000a9e14dfc2c6ed228d5fe2952. --- ports/rxcpp/portfile.cmake | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ports/rxcpp/portfile.cmake b/ports/rxcpp/portfile.cmake index f767d8a3b..440c7ccf3 100644 --- a/ports/rxcpp/portfile.cmake +++ b/ports/rxcpp/portfile.cmake @@ -3,16 +3,21 @@ include(vcpkg_common_functions) 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" + FILENAME "v3.0.0.tar.gz" SHA512 6d810b6163d0920d531f32a13729e290c81b47d5fc9c3e3d3d8a25d27a6f0671fec097d091bef7383b7e556e9e5471db087bb955e7f4fd9a5fdc9e7b06050844 ) vcpkg_extract_source_archive(${ARCHIVE}) file(INSTALL - ${SOURCE_PATH}/Rx/v2/src + ${SOURCE_PATH}/Rx/v2/src/rxcpp DESTINATION ${CURRENT_PACKAGES_DIR}/include ) file(INSTALL - ${SOURCE_PATH}/license.md - DESTINATION ${CURRENT_PACKAGES_DIR}/share/rxcpp RENAME copyright) \ No newline at end of file + ${SOURCE_PATH}/Ix/CPP/src/cpplinq + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +file(INSTALL + ${SOURCE_PATH}/license.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/rxcpp RENAME copyright) \ No newline at end of file -- cgit v1.2.3 From cdba9a5e4904af960362614d1222ee47a29c21a7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 25 Nov 2016 21:45:41 -0800 Subject: [rxcpp] Renaming downloaded file back to RxCpp-v3.0.0.tar.gz to avoid collisions with other libraries --- ports/rxcpp/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/rxcpp/portfile.cmake b/ports/rxcpp/portfile.cmake index 440c7ccf3..4a321222d 100644 --- a/ports/rxcpp/portfile.cmake +++ b/ports/rxcpp/portfile.cmake @@ -3,7 +3,7 @@ include(vcpkg_common_functions) 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 "v3.0.0.tar.gz" + FILENAME "RxCpp-v3.0.0.tar.gz" SHA512 6d810b6163d0920d531f32a13729e290c81b47d5fc9c3e3d3d8a25d27a6f0671fec097d091bef7383b7e556e9e5471db087bb955e7f4fd9a5fdc9e7b06050844 ) vcpkg_extract_source_archive(${ARCHIVE}) -- cgit v1.2.3 From 7e4a57fbfd60ad0eb9cfce7d4db0160bdf6e9cc4 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 26 Nov 2016 00:15:38 -0800 Subject: [curl] [freetype] [tiff] Add dependencies on zlib. Add curl dependency on openssl. --- ports/curl/CONTROL | 5 +++-- ports/freetype/CONTROL | 3 ++- ports/tiff/CONTROL | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index 26fe767c3..bca23865d 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,3 +1,4 @@ Source: curl -Version: 7.51.0 -Description: A library for transferring data with URLs \ No newline at end of file +Version: 7.51.0-1 +Build-Depends: zlib, openssl +Description: A library for transferring data with URLs diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL index 39def18fc..614017c81 100644 --- a/ports/freetype/CONTROL +++ b/ports/freetype/CONTROL @@ -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. \ No newline at end of file diff --git a/ports/tiff/CONTROL b/ports/tiff/CONTROL index df11c0e9c..65e3d37da 100644 --- a/ports/tiff/CONTROL +++ b/ports/tiff/CONTROL @@ -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 \ No newline at end of file -- cgit v1.2.3 From 02f00dfbc75844a09b121a6f0de35747dafb898f Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 26 Nov 2016 02:40:38 -0800 Subject: [zstd] Reduce modifications to the upstream CMake. Remove all variation from the import lib name. --- ports/zstd/portfile.cmake | 40 +++++++++------------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index 7384e5461..0cb089ce5 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -7,30 +7,6 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -# Name dynamic libs to be non-versioned and simpler "zstd". -# Avoid name conflict with static, so postfix static to "zstd-static" -# This seems to be less painful than renaming a DLL file after creation. -set(lib_cmake_filename ${SOURCE_PATH}/build/cmake/lib/CMakeLists.txt) -if (NOT EXISTS ${lib_cmake_filename}.orig) - file(INSTALL ${SOURCE_PATH}/build/cmake/lib/CMakeLists.txt - DESTINATION ${SOURCE_PATH}/build/cmake/lib - RENAME CMakeLists.txt.orig) -endif() -file(READ "${lib_cmake_filename}" lib_cmake_content) -string(REPLACE - "SET(SHARED_LIBRARY_OUTPUT_NAME \${LIBRARY_BASE_NAME}.\${LIBVER_MAJOR}.\${LIBVER_MINOR}.\${LIBVER_RELEASE})" - "SET(SHARED_LIBRARY_OUTPUT_NAME zstd)" - lib_cmake_content - "${lib_cmake_content}" -) -string(REPLACE - "SET(STATIC_LIBRARY_OUTPUT_NAME \${LIBRARY_BASE_NAME})" - "SET(STATIC_LIBRARY_OUTPUT_NAME zstd-static)" - lib_cmake_content - "${lib_cmake_content}" -) -file(WRITE "${lib_cmake_filename}" "${lib_cmake_content}") - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/build/cmake OPTIONS -DZSTD_LEGACY_SUPPORT=1 @@ -46,17 +22,19 @@ file(COPY ${SOURCE_PATH}/lib/dictBuilder/zdict.h DESTINATION ${CURRENT_PACKAGES_ 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}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "zstd_*.lib") - file(INSTALL ${RELDIR}/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "zstd_*.dll") - file(INSTALL ${DEBDIR}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "zstd_*.lib") - file(INSTALL ${DEBDIR}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "zstd_*.dll") + +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}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "zstd-static_*.lib") - file(INSTALL ${DEBDIR}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "zstd-static_*.lib") + 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) -- cgit v1.2.3 From cc7ee77d9031853580eeecd8c80ca195a8ae9bd6 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 26 Nov 2016 02:49:42 -0800 Subject: [vcpkg] The static keyword at member function scope is not once-per-instance, it's once-per-function --- toolsrc/src/BuildInfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolsrc/src/BuildInfo.cpp b/toolsrc/src/BuildInfo.cpp index 1f802869f..3fc56efc0 100644 --- a/toolsrc/src/BuildInfo.cpp +++ b/toolsrc/src/BuildInfo.cpp @@ -16,13 +16,13 @@ namespace vcpkg 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 { - 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; } @@ -153,7 +153,7 @@ namespace vcpkg 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; } -- cgit v1.2.3 From 692d95c865f271d0805a60fff63fb319c1985ad3 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Sat, 26 Nov 2016 02:51:12 -0800 Subject: [vcpkg] Do not return references to locals --- toolsrc/include/BuildInfo.h | 6 +++--- toolsrc/src/BuildInfo.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/toolsrc/include/BuildInfo.h b/toolsrc/include/BuildInfo.h index 22b4bed7d..7f64c51cc 100644 --- a/toolsrc/include/BuildInfo.h +++ b/toolsrc/include/BuildInfo.h @@ -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: diff --git a/toolsrc/src/BuildInfo.cpp b/toolsrc/src/BuildInfo.cpp index 3fc56efc0..8d46a0dba 100644 --- a/toolsrc/src/BuildInfo.cpp +++ b/toolsrc/src/BuildInfo.cpp @@ -14,13 +14,13 @@ namespace vcpkg return this->m_linkage; } - const std::regex& BuildType::crt_regex() const + const std::regex BuildType::crt_regex() const { 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 { const std::string s = Strings::format("[%s,%s]", to_string(this->m_config), to_string(this->m_linkage)); return s; @@ -151,7 +151,7 @@ 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 { const std::regex r(this->m_crt_regex_as_string, std::regex_constants::icase); return r; -- cgit v1.2.3 From c7bb71b29ac142105f755d548133a6dda28442c0 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 26 Nov 2016 16:54:51 +0100 Subject: Specify path for includes --- ports/directxtk/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/directxtk/portfile.cmake b/ports/directxtk/portfile.cmake index 8315cd196..c14b7c6aa 100644 --- a/ports/directxtk/portfile.cmake +++ b/ports/directxtk/portfile.cmake @@ -44,7 +44,7 @@ file(INSTALL file(INSTALL ${SOURCE_PATH}/Inc/ - DESTINATION ${CURRENT_PACKAGES_DIR}/include + DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK ) # Handle copyright -- cgit v1.2.3 From a510782857df5de7a98e8077ae5c053ba71b7563 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 26 Nov 2016 16:55:29 +0100 Subject: Bump version --- ports/directxtk/CONTROL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/directxtk/CONTROL b/ports/directxtk/CONTROL index c9c00c89c..b5e0bcb7d 100644 --- a/ports/directxtk/CONTROL +++ b/ports/directxtk/CONTROL @@ -1,3 +1,3 @@ Source: directxtk -Version: oct2016 -Description: A collection of helper classes for writing DirectX 11.x code in C++. \ No newline at end of file +Version: oct2016-1 +Description: A collection of helper classes for writing DirectX 11.x code in C++. -- cgit v1.2.3 From 469b819fdfa91bb81b3c0ec6081e43df36883528 Mon Sep 17 00:00:00 2001 From: Daniel Bonrath Date: Sat, 26 Nov 2016 19:36:25 +0100 Subject: #339 added clockUtils port --- ports/clockutils/CONTROL | 3 +++ ports/clockutils/portfile.cmake | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 ports/clockutils/CONTROL create mode 100644 ports/clockutils/portfile.cmake diff --git a/ports/clockutils/CONTROL b/ports/clockutils/CONTROL new file mode 100644 index 000000000..4ade8d5f0 --- /dev/null +++ b/ports/clockutils/CONTROL @@ -0,0 +1,3 @@ +Source: clockutils +Version: 1.1.1 +Description: A lightweight c++ library for commonly needed tasks. Optimized for simplicity and speed. diff --git a/ports/clockutils/portfile.cmake b/ports/clockutils/portfile.cmake new file mode 100644 index 000000000..c40d73328 --- /dev/null +++ b/ports/clockutils/portfile.cmake @@ -0,0 +1,34 @@ +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) \ No newline at end of file -- cgit v1.2.3 From 660797c22cf866a0fc613e3ec4c5d59cf761edc8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 26 Nov 2016 13:35:26 -0800 Subject: [clockutils] Call vcpkg_copy_pdbs() --- ports/clockutils/portfile.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/clockutils/portfile.cmake b/ports/clockutils/portfile.cmake index c40d73328..49ef3bf3f 100644 --- a/ports/clockutils/portfile.cmake +++ b/ports/clockutils/portfile.cmake @@ -31,4 +31,6 @@ 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) \ No newline at end of file +file(RENAME ${CURRENT_PACKAGES_DIR}/share/clockUtils/LICENSE ${CURRENT_PACKAGES_DIR}/share/clockUtils/copyright) + +vcpkg_copy_pdbs() \ No newline at end of file -- cgit v1.2.3 From 56581e816a7129d99e25b592035e1de5a8801178 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 26 Nov 2016 16:05:46 -0800 Subject: [curl] Enable static building --- ports/curl/portfile.cmake | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 8ad5ed7f7..e2359f73d 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -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() \ No newline at end of file -- cgit v1.2.3 From 9fdb1f8fe800867a5e87452f0bad249b2500f3b2 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Sat, 26 Nov 2016 16:11:27 -0800 Subject: [clockutils] Remove copy of LICENSE --- ports/clockutils/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/clockutils/portfile.cmake b/ports/clockutils/portfile.cmake index 49ef3bf3f..c078673a6 100644 --- a/ports/clockutils/portfile.cmake +++ b/ports/clockutils/portfile.cmake @@ -32,5 +32,6 @@ 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() \ No newline at end of file -- cgit v1.2.3