cmake_minimum_required(VERSION 3.1...3.23) 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 PUBLIC CGAL::CGAL)