cgal/Installation/test/Installation/test_configuration.cmake.in

15 lines
616 B
CMake

cmake_minimum_required(VERSION 3.12...3.31)
project(test_configuration)
find_package(CGAL)
add_definitions(-DQT_NO_KEYWORDS)
get_filename_component(CGAL_DIR_PATH "${CGAL_DIR}/CMakeConfig.cmake" DIRECTORY)
get_filename_component(CGAL_GIVEN_DIR_PATH "${CGAL_GIVEN_DIR}/CMakeConfig.cmake" DIRECTORY)
if(NOT ${CGAL_DIR_PATH} STREQUAL ${CGAL_GIVEN_DIR_PATH})
message("${CGAL_DIR_PATH} != ${CGAL_GIVEN_DIR_PATH}")
message( FATAL_ERROR "The CGAL_DIR is wrong !")
endif()
add_executable(test_configuration @CMAKE_CURRENT_SOURCE_DIR@/test_configuration.cpp)
target_link_libraries(test_configuration PRIVATE CGAL::CGAL)