From 0a2ca011ba89efb60658db0be3843d4fa9bae82b Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sat, 30 Nov 2024 16:10:15 +0100 Subject: [PATCH] Remove deprecated module FindGLFW3 --- find-modules/CMakeLists.txt | 1 - find-modules/FindGLFW3.cmake | 141 ---------------------------------- help/manual/ycm-modules.7.rst | 1 - help/module/FindGLFW3.rst | 1 - 4 files changed, 144 deletions(-) delete mode 100644 find-modules/FindGLFW3.cmake delete mode 100644 help/module/FindGLFW3.rst diff --git a/find-modules/CMakeLists.txt b/find-modules/CMakeLists.txt index 31ff3a74d..53c661470 100644 --- a/find-modules/CMakeLists.txt +++ b/find-modules/CMakeLists.txt @@ -10,7 +10,6 @@ set(YCM_FIND_MODULES FindACE.cmake FindFreenect.cmake FindFTDI.cmake FindFuse.cmake - FindGLFW3.cmake FindGLM.cmake FindGooCanvas.cmake FindGooCanvasMM.cmake diff --git a/find-modules/FindGLFW3.cmake b/find-modules/FindGLFW3.cmake deleted file mode 100644 index 9bec33411..000000000 --- a/find-modules/FindGLFW3.cmake +++ /dev/null @@ -1,141 +0,0 @@ -# SPDX-FileCopyrightText: 2012-2021 Istituto Italiano di Tecnologia (IIT) -# SPDX-License-Identifier: BSD-3-Clause - -#[=======================================================================[.rst: -FindGLFW3 ---------- - -Find the GLFW3 framework. - -This module is deprecated, please use find_package(glfw3 NO_MODULE) -to find glfw3 instead. - -IMPORTED Targets -^^^^^^^^^^^^^^^^ - -This module defines the :prop_tgt:`IMPORTED` target ``glfw``, -if GLFW3 has been found. - -This module also defines the :prop_tgt:`IMPORTED` target ``GLFW3::GLFW3``, -for backward compatibility with old YCM versions, but support for it will be removed. - -Result Variables -^^^^^^^^^^^^^^^^ - -This module defines the following deprecated variables:: - - GLFW3_INCLUDE_DIRS - include directories for GLFW3 - GLFW3_LIBRARIES - libraries to link against GLFW3 - GLFW3_FOUND - true if GLFW3 has been found and can be used - -Environment Variables -^^^^^^^^^^^^^^^^^^^^^ - -If the library is not found on system paths, the ``GLFW3_ROOT`` -environment variable can be used to locate the lbrary. -#]=======================================================================] - -message(DEPRECATION "find_package(GLFW3) is deprecated, please use find_package(glfw3 NO_MODULE) and link glfw instead.") - -find_package(glfw3 NO_MODULE QUIET) - -if(glfw3_FOUND) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(GLFW3 - REQUIRED_VARS glfw3_FOUND) -else() - include(StandardFindModule) - standard_find_module(GLFW3 glfw3) - - if(NOT GLFW3_FOUND) - find_path(GLFW3_INCLUDE_DIR - DOC "Path to GLFW3 include directory." - NAMES GLFW/glfw3.h - PATH_SUFFIXES include - PATHS /usr/ - /usr/local/ - ${GLFW3_ROOT_DIR} - ENV GLFW3_ROOT) - - find_library(GLFW3_GLFW_LIBRARY - DOC "Absolute path to GLFW3 library." - NAMES glfw3 - glfw3dll - PATH_SUFFIXES lib - lib-vc2010 - PATHS /usr/ - /usr/local/ - ${GLFW3_ROOT_DIR} - ENV GLFW3_ROOT) - if(WIN32) - find_library(GLFW3_OPENGL_LIBRARY - NAMES OpenGL32 - PATHS "C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Lib" - "C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.1A\\Lib") - endif() - - set(GLFW3_GLFW_glfw3_h "${GLFW3_INCLUDE_DIR}/GLFW/glfw3.h") - if(GLFW3_INCLUDE_DIR AND EXISTS "${GLFW3_GLFW_glfw3_h}") - file(STRINGS "${GLFW3_GLFW_glfw3_h}" GLFW3_GLFW_glfw3_h_CONTENTS - REGEX "^#[\t ]*define[\t ]+GLFW_VERSION_(MAJOR|MINOR|REVISION)[\t ]+[0-9]+$") - - foreach(_part MAJOR MINOR REVISION) - string(REGEX REPLACE ".*#[\t ]*define[ \t]+GLFW_VERSION_${_part}[ \t]+([0-9]+).*" "\\1" - GLFW3_VERSION_${_part} "${GLFW3_GLFW_glfw3_h_CONTENTS}") - endforeach(_part) - - set(GLFW3_VERSION_STRING "${GLFW3_VERSION_MAJOR}.${GLFW3_VERSION_MINOR}.${GLFW3_VERSION_REVISION}") - - endif() - - set(GLFW3_INCLUDE_DIRS "${GLFW3_INCLUDE_DIR}") - set(GLFW3_LIBRARIES "${GLFW3_GLFW_LIBRARY}") - if(WIN32) - list(APPEND GLFW3_LIBRARIES "${GLFW3_OPENGL_LIBRARY}") - endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(GLFW3 - REQUIRED_VARS GLFW3_LIBRARIES - GLFW3_INCLUDE_DIRS - VERSION_VAR GLFW3_VERSION_STRING) - endif() -endif() - -# Set package properties if FeatureSummary was included -if(COMMAND set_package_properties) - set_package_properties(GLFW3 PROPERTIES DESCRIPTION "Portable library for OpenGL, window and input" - URL "http://www.glfw.org/") -endif() - -if(NOT GLFW3_FOUND) - return() -endif() - - -# Create imported target GLFW::GLFW3 -if(NOT TARGET GLFW3::GLFW3) - if(TARGET glfw) - # If the upstream target glfw exists, make GLFW::GLFW3 an alias of it - # Note: ALIAS of imported targets are not supported, so we define an - # imported interface target that links in a public way to glfw - add_library(GLFW3::GLFW3 INTERFACE IMPORTED) - set_target_properties(GLFW3::GLFW3 PROPERTIES INTERFACE_LINK_LIBRARIES glfw) - else() - add_library(GLFW3::GLFW3 STATIC IMPORTED) - set_target_properties(GLFW3::GLFW3 PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${GLFW3_INCLUDE_DIR}") - - if(WIN32) - set_target_properties(GLFW3::GLFW3 PROPERTIES - INTERFACE_LINK_LIBRARIES "${GLFW3_OPENGL_LIBRARY}") - endif() - - # Import target "GLFW3::GLFW3" for configuration "Release" - set_property(TARGET GLFW3::GLFW3 APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(GLFW3::GLFW3 PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" - IMPORTED_LOCATION_RELEASE "${GLFW3_GLFW_LIBRARY}") - endif() -endif() diff --git a/help/manual/ycm-modules.7.rst b/help/manual/ycm-modules.7.rst index c054a3299..bf3a20f83 100644 --- a/help/manual/ycm-modules.7.rst +++ b/help/manual/ycm-modules.7.rst @@ -79,7 +79,6 @@ Find Package Modules /module/FindFreenect /module/FindFTDI /module/FindFuse - /module/FindGLFW3 /module/FindGLM /module/FindGooCanvas /module/FindGooCanvasMM diff --git a/help/module/FindGLFW3.rst b/help/module/FindGLFW3.rst deleted file mode 100644 index 801da41e4..000000000 --- a/help/module/FindGLFW3.rst +++ /dev/null @@ -1 +0,0 @@ -.. cmake-module:: ../../find-modules/FindGLFW3.cmake