vcpkg/ports/crashrpt/portfile.cmake

52 lines
1.7 KiB
CMake
Raw Normal View History

[crashrpt] Add new port (#9162) * Add port files for crashrpt * Fix x64 output paths and fail port install if architecture is not x86 or x64 * Use vcpkg_fail_port_install * Add patch for CMakeLists.txt add install target for CrashRpt and CrashSender * Replace vendored dependencies for minizip, png, and zlib with packages from vcpkg * Fix 002-find-minizip-png-zlib.patch, accidentally included folder move/renaming in previous commit * Add vcpkg_copy_tool_dependencies so that dlls for CrashSender .exe will be copied to tools folder * Add install for crprober.exe tool * Replace libogg and libtheora vendored dependencies using find_library() and find_path() * Replace vendored tinyxml library * Replace vendored wtl library * Replace vendored JPEG library with libjpeg-turbo from vcpkg * Add patch to install demos and test applications to tools directory and add vcpkg port features to enable building the tests and demos * Add port of dbghelp that copies files from Windows 10 SDK. Use this crashrpt to replace vendored dependency of dbghelp. * [dbghelp] Improve portfile.cmake * Update baseline * update CONTROL file * Update ci.baseline.txt to skip dbghelp on Windows platforms * * Combined patch files * Use vendored minizip since it has modifications to support Unicode file paths using wchar_t* which CrashRpt depends on * Add feature "probe" in order to allow excluding the CrashRptProbe library * Use VERSION_GREATER instead of MATCHES to compare WINDOWS_SDK version in dbghelp portfile.cmake. Remove redundant check of WINDOWS_SDK version later in script. Co-authored-by: Travis Drake <tdrake@qsrautomations.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
2020-08-09 16:12:14 -04:00
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
set(ARCH_DIR "")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
set(ARCH_DIR "x64/")
else()
message(FATAL_ERROR "${PORT} only supports x86 and x64 architectures")
[crashrpt] Add new port (#9162) * Add port files for crashrpt * Fix x64 output paths and fail port install if architecture is not x86 or x64 * Use vcpkg_fail_port_install * Add patch for CMakeLists.txt add install target for CrashRpt and CrashSender * Replace vendored dependencies for minizip, png, and zlib with packages from vcpkg * Fix 002-find-minizip-png-zlib.patch, accidentally included folder move/renaming in previous commit * Add vcpkg_copy_tool_dependencies so that dlls for CrashSender .exe will be copied to tools folder * Add install for crprober.exe tool * Replace libogg and libtheora vendored dependencies using find_library() and find_path() * Replace vendored tinyxml library * Replace vendored wtl library * Replace vendored JPEG library with libjpeg-turbo from vcpkg * Add patch to install demos and test applications to tools directory and add vcpkg port features to enable building the tests and demos * Add port of dbghelp that copies files from Windows 10 SDK. Use this crashrpt to replace vendored dependency of dbghelp. * [dbghelp] Improve portfile.cmake * Update baseline * update CONTROL file * Update ci.baseline.txt to skip dbghelp on Windows platforms * * Combined patch files * Use vendored minizip since it has modifications to support Unicode file paths using wchar_t* which CrashRpt depends on * Add feature "probe" in order to allow excluding the CrashRptProbe library * Use VERSION_GREATER instead of MATCHES to compare WINDOWS_SDK version in dbghelp portfile.cmake. Remove redundant check of WINDOWS_SDK version later in script. Co-authored-by: Travis Drake <tdrake@qsrautomations.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
2020-08-09 16:12:14 -04:00
endif()
vcpkg_from_git(
OUT_SOURCE_PATH SOURCE_PATH
URL https://git.code.sf.net/p/crashrpt/code
REF 4616504670be5a425a525376648d912a72ce18f2
PATCHES
001-add-install-target-and-find-deps.patch
002-fix-wtl-includepath.patch
003-add-definition-UNICODE.patch
[crashrpt] Add new port (#9162) * Add port files for crashrpt * Fix x64 output paths and fail port install if architecture is not x86 or x64 * Use vcpkg_fail_port_install * Add patch for CMakeLists.txt add install target for CrashRpt and CrashSender * Replace vendored dependencies for minizip, png, and zlib with packages from vcpkg * Fix 002-find-minizip-png-zlib.patch, accidentally included folder move/renaming in previous commit * Add vcpkg_copy_tool_dependencies so that dlls for CrashSender .exe will be copied to tools folder * Add install for crprober.exe tool * Replace libogg and libtheora vendored dependencies using find_library() and find_path() * Replace vendored tinyxml library * Replace vendored wtl library * Replace vendored JPEG library with libjpeg-turbo from vcpkg * Add patch to install demos and test applications to tools directory and add vcpkg port features to enable building the tests and demos * Add port of dbghelp that copies files from Windows 10 SDK. Use this crashrpt to replace vendored dependency of dbghelp. * [dbghelp] Improve portfile.cmake * Update baseline * update CONTROL file * Update ci.baseline.txt to skip dbghelp on Windows platforms * * Combined patch files * Use vendored minizip since it has modifications to support Unicode file paths using wchar_t* which CrashRpt depends on * Add feature "probe" in order to allow excluding the CrashRptProbe library * Use VERSION_GREATER instead of MATCHES to compare WINDOWS_SDK version in dbghelp portfile.cmake. Remove redundant check of WINDOWS_SDK version later in script. Co-authored-by: Travis Drake <tdrake@qsrautomations.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
2020-08-09 16:12:14 -04:00
)
# Remove vendored dependencies to ensure they are not picked up by the build
# Vendored minizip is still used since it contains modifications needed for CrashRpt
foreach(DEPENDENCY dbghelp jpeg libogg libpng libtheora tinyxml wtl zlib)
if(EXISTS "${SOURCE_PATH}/thirdparty/${DEPENDENCY}")
file(REMOVE_RECURSE "${SOURCE_PATH}/thirdparty/${DEPENDENCY}")
[crashrpt] Add new port (#9162) * Add port files for crashrpt * Fix x64 output paths and fail port install if architecture is not x86 or x64 * Use vcpkg_fail_port_install * Add patch for CMakeLists.txt add install target for CrashRpt and CrashSender * Replace vendored dependencies for minizip, png, and zlib with packages from vcpkg * Fix 002-find-minizip-png-zlib.patch, accidentally included folder move/renaming in previous commit * Add vcpkg_copy_tool_dependencies so that dlls for CrashSender .exe will be copied to tools folder * Add install for crprober.exe tool * Replace libogg and libtheora vendored dependencies using find_library() and find_path() * Replace vendored tinyxml library * Replace vendored wtl library * Replace vendored JPEG library with libjpeg-turbo from vcpkg * Add patch to install demos and test applications to tools directory and add vcpkg port features to enable building the tests and demos * Add port of dbghelp that copies files from Windows 10 SDK. Use this crashrpt to replace vendored dependency of dbghelp. * [dbghelp] Improve portfile.cmake * Update baseline * update CONTROL file * Update ci.baseline.txt to skip dbghelp on Windows platforms * * Combined patch files * Use vendored minizip since it has modifications to support Unicode file paths using wchar_t* which CrashRpt depends on * Add feature "probe" in order to allow excluding the CrashRptProbe library * Use VERSION_GREATER instead of MATCHES to compare WINDOWS_SDK version in dbghelp portfile.cmake. Remove redundant check of WINDOWS_SDK version later in script. Co-authored-by: Travis Drake <tdrake@qsrautomations.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
2020-08-09 16:12:14 -04:00
endif()
endforeach()
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CRASHRPT_BUILD_SHARED_LIBS)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" CRASHRPT_LINK_CRT_AS_DLL)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
probe CRASHRPT_BUILD_PROBE
tests CRASHRPT_BUILD_TESTS
demos CRASHRPT_BUILD_DEMOS
[crashrpt] Add new port (#9162) * Add port files for crashrpt * Fix x64 output paths and fail port install if architecture is not x86 or x64 * Use vcpkg_fail_port_install * Add patch for CMakeLists.txt add install target for CrashRpt and CrashSender * Replace vendored dependencies for minizip, png, and zlib with packages from vcpkg * Fix 002-find-minizip-png-zlib.patch, accidentally included folder move/renaming in previous commit * Add vcpkg_copy_tool_dependencies so that dlls for CrashSender .exe will be copied to tools folder * Add install for crprober.exe tool * Replace libogg and libtheora vendored dependencies using find_library() and find_path() * Replace vendored tinyxml library * Replace vendored wtl library * Replace vendored JPEG library with libjpeg-turbo from vcpkg * Add patch to install demos and test applications to tools directory and add vcpkg port features to enable building the tests and demos * Add port of dbghelp that copies files from Windows 10 SDK. Use this crashrpt to replace vendored dependency of dbghelp. * [dbghelp] Improve portfile.cmake * Update baseline * update CONTROL file * Update ci.baseline.txt to skip dbghelp on Windows platforms * * Combined patch files * Use vendored minizip since it has modifications to support Unicode file paths using wchar_t* which CrashRpt depends on * Add feature "probe" in order to allow excluding the CrashRptProbe library * Use VERSION_GREATER instead of MATCHES to compare WINDOWS_SDK version in dbghelp portfile.cmake. Remove redundant check of WINDOWS_SDK version later in script. Co-authored-by: Travis Drake <tdrake@qsrautomations.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
2020-08-09 16:12:14 -04:00
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
[crashrpt] Add new port (#9162) * Add port files for crashrpt * Fix x64 output paths and fail port install if architecture is not x86 or x64 * Use vcpkg_fail_port_install * Add patch for CMakeLists.txt add install target for CrashRpt and CrashSender * Replace vendored dependencies for minizip, png, and zlib with packages from vcpkg * Fix 002-find-minizip-png-zlib.patch, accidentally included folder move/renaming in previous commit * Add vcpkg_copy_tool_dependencies so that dlls for CrashSender .exe will be copied to tools folder * Add install for crprober.exe tool * Replace libogg and libtheora vendored dependencies using find_library() and find_path() * Replace vendored tinyxml library * Replace vendored wtl library * Replace vendored JPEG library with libjpeg-turbo from vcpkg * Add patch to install demos and test applications to tools directory and add vcpkg port features to enable building the tests and demos * Add port of dbghelp that copies files from Windows 10 SDK. Use this crashrpt to replace vendored dependency of dbghelp. * [dbghelp] Improve portfile.cmake * Update baseline * update CONTROL file * Update ci.baseline.txt to skip dbghelp on Windows platforms * * Combined patch files * Use vendored minizip since it has modifications to support Unicode file paths using wchar_t* which CrashRpt depends on * Add feature "probe" in order to allow excluding the CrashRptProbe library * Use VERSION_GREATER instead of MATCHES to compare WINDOWS_SDK version in dbghelp portfile.cmake. Remove redundant check of WINDOWS_SDK version later in script. Co-authored-by: Travis Drake <tdrake@qsrautomations.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
2020-08-09 16:12:14 -04:00
OPTIONS
-DCRASHRPT_BUILD_SHARED_LIBS=${CRASHRPT_BUILD_SHARED_LIBS}
-DCRASHRPT_LINK_CRT_AS_DLL=${CRASHRPT_LINK_CRT_AS_DLL}
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
[crashrpt] Add new port (#9162) * Add port files for crashrpt * Fix x64 output paths and fail port install if architecture is not x86 or x64 * Use vcpkg_fail_port_install * Add patch for CMakeLists.txt add install target for CrashRpt and CrashSender * Replace vendored dependencies for minizip, png, and zlib with packages from vcpkg * Fix 002-find-minizip-png-zlib.patch, accidentally included folder move/renaming in previous commit * Add vcpkg_copy_tool_dependencies so that dlls for CrashSender .exe will be copied to tools folder * Add install for crprober.exe tool * Replace libogg and libtheora vendored dependencies using find_library() and find_path() * Replace vendored tinyxml library * Replace vendored wtl library * Replace vendored JPEG library with libjpeg-turbo from vcpkg * Add patch to install demos and test applications to tools directory and add vcpkg port features to enable building the tests and demos * Add port of dbghelp that copies files from Windows 10 SDK. Use this crashrpt to replace vendored dependency of dbghelp. * [dbghelp] Improve portfile.cmake * Update baseline * update CONTROL file * Update ci.baseline.txt to skip dbghelp on Windows platforms * * Combined patch files * Use vendored minizip since it has modifications to support Unicode file paths using wchar_t* which CrashRpt depends on * Add feature "probe" in order to allow excluding the CrashRptProbe library * Use VERSION_GREATER instead of MATCHES to compare WINDOWS_SDK version in dbghelp portfile.cmake. Remove redundant check of WINDOWS_SDK version later in script. Co-authored-by: Travis Drake <tdrake@qsrautomations.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
2020-08-09 16:12:14 -04:00
vcpkg_copy_pdbs()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/License.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)