From f2fdeb52836b64f2ad12251af535193bfe92ed1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Fri, 4 Sep 2020 20:07:29 -0700 Subject: [sentry-native] Fix build failure and cmake path (#13329) * [sentry-native] Fix build failure and cmake path * Re-fix the static_assert issue --- ports/sentry-native/CONTROL | 1 + ports/sentry-native/portfile.cmake | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ports/sentry-native/CONTROL b/ports/sentry-native/CONTROL index 7cfa576e0..fbcf54f6c 100644 --- a/ports/sentry-native/CONTROL +++ b/ports/sentry-native/CONTROL @@ -1,5 +1,6 @@ Source: sentry-native Version: 0.4.0 +Port-Version: 1 Homepage: https://sentry.io/ Description: Sentry SDK for C, C++ and native applications. Build-Depends: curl (!windows) diff --git a/ports/sentry-native/portfile.cmake b/ports/sentry-native/portfile.cmake index d58a78676..7370bd7d2 100644 --- a/ports/sentry-native/portfile.cmake +++ b/ports/sentry-native/portfile.cmake @@ -12,12 +12,20 @@ vcpkg_extract_source_archive_ex( NO_REMOVE_ONE_LEVEL ) +if (VCPKG_TARGET_IS_WINDOWS) + set(SENTRY_NATIVE_C_STANDARD 99) +else() + set(SENTRY_NATIVE_C_STANDARD 11) +endif() + + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DSENTRY_BUILD_TESTS=OFF -DSENTRY_BUILD_EXAMPLES=OFF + -DCMAKE_C_STANDARD=${SENTRY_NATIVE_C_STANDARD} ) vcpkg_install_cmake() @@ -26,7 +34,7 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sentry TARGET_PATH share/sentry-native/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sentry TARGET_PATH share/sentry) if (WIN32) vcpkg_copy_tools( -- cgit v1.2.3