diff options
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-vxl/project')
| -rw-r--r-- | vcpkg/scripts/test_ports/vcpkg-ci-vxl/project/CMakeLists.txt | 33 | ||||
| -rw-r--r-- | vcpkg/scripts/test_ports/vcpkg-ci-vxl/project/main.cpp | 10 |
2 files changed, 43 insertions, 0 deletions
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 |