diff options
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-vxl')
4 files changed, 70 insertions, 0 deletions
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-vxl/portfile.cmake b/vcpkg/scripts/test_ports/vcpkg-ci-vxl/portfile.cmake new file mode 100644 index 0000000..8700efd --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-vxl/portfile.cmake @@ -0,0 +1,8 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_cmake_configure( + SOURCE_PATH "${CURRENT_PORT_DIR}/project" + OPTIONS_DEBUG + -DBUILD_TYPE=debug +) +vcpkg_cmake_build() diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-vxl/project/CMakeLists.txt b/vcpkg/scripts/test_ports/vcpkg-ci-vxl/project/CMakeLists.txt new file mode 100644 index 0000000..2ac14a1 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-vxl/project/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.7) +project(vnl-test CXX) + +if(APPLE) + set(CMAKE_CXX_STANDARD "11") +endif() + +find_package(VXL CONFIG REQUIRED) + +# The use file doesn't only set variables, +# but also directly calls include_directories(). +# (Calling link_directories() must remain disabled in vcpkg.) +# The imported targets don't carry the main include directories! +include("${VXL_CMAKE_DIR}/UseVXL.cmake") + +# Catch wrong link directories. +find_library(vcpkg_ci_vnl_library NAMES vnl REQUIRED) +cmake_path(GET vcpkg_ci_vnl_library PARENT_PATH vcpkg_ci_vnl_library_dir) +if(BUILD_TYPE STREQUAL "debug" AND NOT vcpkg_ci_vnl_library_dir MATCHES "/debug/lib\$") + message(SEND_ERROR "vil library directory is wrong." + "\n Expected path: '${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib'" + "\n Actual path: '${vcpkg_ci_vnl_library_dir}'" + ) +endif() + +add_executable(main main.cpp) +target_link_libraries(main PRIVATE + $<TARGET_NAME:vil> # required. Needs image format deps + $<TARGET_NAME:vnl_algo> # test only: wants netlib + $<TARGET_NAME:vgl> # test only: wants polyclipping + $<TARGET_NAME:vgl_algo> # test only: wants image formats +) + diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-vxl/project/main.cpp b/vcpkg/scripts/test_ports/vcpkg-ci-vxl/project/main.cpp new file mode 100644 index 0000000..681dc8b --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-vxl/project/main.cpp @@ -0,0 +1,10 @@ +//#include <vxl_config.h> +#include <vil/vil_rgb.h> +#include <vil/vil_load.h> +#include <vil/vil_image_view.h> + +int main() +{ + vil_image_view<vil_rgb<vxl_byte> > img = vil_load("foo.tiff"); + return 0; +}
\ No newline at end of file diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-vxl/vcpkg.json b/vcpkg/scripts/test_ports/vcpkg-ci-vxl/vcpkg.json new file mode 100644 index 0000000..0c0986e --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-vxl/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "vcpkg-ci-vxl", + "version-string": "ci", + "description": "Port to force features of vxl within CI", + "homepage": "https://github.com/microsoft/vcpkg", + "license": "MIT", + "dependencies": [ + { + "name": "vxl", + "features": [ + "core-imaging" + ] + }, + { + "name": "vcpkg-cmake", + "host": true + } + ] +} |