# Copyright 2016, Raffi Enficiaud.
#
# The cmake-pip module should NOT be found here: the extension declares neither
# cmake_install nor cmake_install_component, so cmake-pip does not inject
# -Dcmakepip_DIR=<cmake_pip>/cmake_modules (cmake_extension.py) and the
# find_package below is expected to fail.
#
# The raise below is on purpose -- pip discards the build tree, so failing the
# configure is how this fixture reports its result to the test.

cmake_minimum_required(VERSION 3.21)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

enable_testing()

project(TestCMakePIPExt)

# Python libraries, required
find_package(Python3 COMPONENTS Interpreter REQUIRED)

find_package(cmakepip)
if(NOT (COMMAND python_package_add_target))
  message(FATAL_ERROR "python_package_add_target not found")
endif()
