diff options
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-bgfx')
4 files changed, 54 insertions, 0 deletions
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-bgfx/portfile.cmake b/vcpkg/scripts/test_ports/vcpkg-ci-bgfx/portfile.cmake new file mode 100644 index 0000000..d1ab44a --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-bgfx/portfile.cmake @@ -0,0 +1,6 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_cmake_configure( + SOURCE_PATH "${CURRENT_PORT_DIR}/project" +) +vcpkg_cmake_build() diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-bgfx/project/CMakeLists.txt b/vcpkg/scripts/test_ports/vcpkg-ci-bgfx/project/CMakeLists.txt new file mode 100644 index 0000000..ef8945f --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-bgfx/project/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.10) +project(bgfx-test CXX) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +find_package(bgfx CONFIG REQUIRED) + +add_executable(main main.cpp) +target_link_libraries(main PRIVATE + bgfx::bgfx + # auxiliary targets + bgfx::bx + bgfx::bimg + bgfx::bimg_decode + bgfx::bimg_encode +) +if(ANDROID) + find_package(OpenGL COMPONENTS EGL GLES2 REQUIRED) + target_link_libraries(main PRIVATE nativewindow OpenGL::EGL OpenGL::GLES2) +endif() diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-bgfx/project/main.cpp b/vcpkg/scripts/test_ports/vcpkg-ci-bgfx/project/main.cpp new file mode 100644 index 0000000..94720d6 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-bgfx/project/main.cpp @@ -0,0 +1,9 @@ +#include <bgfx/bgfx.h> +#include <bgfx/platform.h> + +int main() +{ + bgfx::renderFrame(); + bgfx::Init init; + return 0; +} diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-bgfx/vcpkg.json b/vcpkg/scripts/test_ports/vcpkg-ci-bgfx/vcpkg.json new file mode 100644 index 0000000..b78e39c --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-bgfx/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "vcpkg-ci-bgfx", + "version-string": "ci", + "description": "Port to force features of bgfx within CI", + "homepage": "https://github.com/microsoft/vcpkg", + "license": "MIT", + "dependencies": [ + { + "name": "bgfx", + "default-features": false + }, + { + "name": "vcpkg-cmake", + "host": true + } + ] +} |