diff --git a/CMakeLists.txt b/CMakeLists.txt index 072cee80..b84383d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16) -project(YCM VERSION 0.17.1 LANGUAGES NONE) +project(YCM VERSION 0.18.0 LANGUAGES NONE) # Check if the project is the main project or included via FetchContent if (NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) @@ -19,7 +19,6 @@ endif() list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/internal-modules") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/modules") -include(YCMVersion) include(YCMInternal) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") diff --git a/YCMConfig.cmake.in b/YCMConfig.cmake.in index 23629ecc..77240bbd 100644 --- a/YCMConfig.cmake.in +++ b/YCMConfig.cmake.in @@ -11,20 +11,6 @@ set(YCM_VERSION @YCM_VERSION@) set(YCM_VERSION_MAJOR @YCM_VERSION_MAJOR@) set(YCM_VERSION_MINOR @YCM_VERSION_MINOR@) set(YCM_VERSION_PATCH @YCM_VERSION_PATCH@) -set(YCM_VERSION_REVISION @YCM_VERSION_REVISION@) -variable_watch(YCM_VERSION_REVISION _ycm_deprecated_variable_warning) -set(YCM_VERSION_DATE @YCM_VERSION_DATE@) -variable_watch(YCM_VERSION_DATE _ycm_deprecated_variable_warning) -set(YCM_VERSION_DATE_REVISION @YCM_VERSION_DATE_REVISION@) -variable_watch(YCM_VERSION_DATE_REVISION _ycm_deprecated_variable_warning) -set(YCM_VERSION_API @YCM_VERSION_API@) -variable_watch(YCM_VERSION_API _ycm_deprecated_variable_warning) -set(YCM_VERSION_SHORT @YCM_VERSION_SHORT@) -variable_watch(YCM_VERSION_SHORT _ycm_deprecated_variable_warning) -set(YCM_VERSION_SOURCE @YCM_VERSION_SOURCE@) -variable_watch(YCM_VERSION_SOURCE _ycm_deprecated_variable_warning) -set(YCM_VERSION_DIRTY @YCM_VERSION_DIRTY@) -variable_watch(YCM_VERSION_DIRTY _ycm_deprecated_variable_warning) @PACKAGE_INIT@ diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index ed808f96..6a6ea233 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -52,7 +52,7 @@ set(conf_copyright "Copyright 2012-2021 Istituto Italiano di Tecnologia (IIT)") set(conf_docs "${YCM_SOURCE_DIR}/help") set(conf_path "${CMAKE_CURRENT_SOURCE_DIR}") -set(conf_version "${YCM_VERSION_MAJOR}.${YCM_VERSION_MINOR}.${YCM_VERSION_TWEAK}") +set(conf_version "${YCM_VERSION_MAJOR}.${YCM_VERSION_MINOR}.${YCM_VERSION_PATCH}") set(conf_release "${YCM_VERSION}") configure_file(conf.py.in conf.py @ONLY) diff --git a/find-modules/CMakeLists.txt b/find-modules/CMakeLists.txt index 31ff3a74..53c66147 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 9bec3341..00000000 --- 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 ca2d679c..bf3a20f8 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 @@ -146,17 +145,3 @@ These modules are patched versions of the ones included in CMake. /module/ExternalProject /module/CMakeParseArguments - - -.. _`Deprecated Modules`: - -Deprecated Modules -================== - -.. warning:: These modules are deprecated and should not be used in new code. - -.. toctree:: - :maxdepth: 1 - - /module/FindGLUT - /module/YCMDefaultDirs diff --git a/help/module/FindGLFW3.rst b/help/module/FindGLFW3.rst deleted file mode 100644 index 801da41e..00000000 --- a/help/module/FindGLFW3.rst +++ /dev/null @@ -1 +0,0 @@ -.. cmake-module:: ../../find-modules/FindGLFW3.cmake diff --git a/help/module/FindGLUT.rst b/help/module/FindGLUT.rst deleted file mode 100644 index 350fadbc..00000000 --- a/help/module/FindGLUT.rst +++ /dev/null @@ -1 +0,0 @@ -.. cmake-module:: ../../deprecated/FindGLUT.cmake diff --git a/help/module/YCMDefaultDirs.rst b/help/module/YCMDefaultDirs.rst deleted file mode 100644 index 4fb8dbbb..00000000 --- a/help/module/YCMDefaultDirs.rst +++ /dev/null @@ -1 +0,0 @@ -.. cmake-module:: ../../deprecated/YCMDefaultDirs.cmake diff --git a/internal-modules/YCMPack.cmake b/internal-modules/YCMPack.cmake index 7a00101b..f77040cd 100644 --- a/internal-modules/YCMPack.cmake +++ b/internal-modules/YCMPack.cmake @@ -9,11 +9,11 @@ set(CPACK_PACKAGE_VENDOR "Istituto Italiano di Tecnologia (IIT)") set(CPACK_PACKAGE_VERSION_MAJOR "${YCM_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MINOR "${YCM_VERSION_MINOR}") set(CPACK_PACKAGE_VERSION_PATCH "${YCM_VERSION_PATCH}") -set(CPACK_PACKAGE_VERSION "${YCM_VERSION_SHORT}") +set(CPACK_PACKAGE_VERSION "${YCM_VERSION}") set(CPACK_PACKAGE_DESCRIPTION_FILE "${YCM_SOURCE_DIR}/README.md") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Extra CMake Modules for YARP and friends") -set(CPACK_PACKAGE_INSTALL_DIRECTORY "robotology/ycm-${YCM_VERSION_API}") +set(CPACK_PACKAGE_INSTALL_DIRECTORY "robotology/ycm-${YCM_VERSION_MAJOR}.${YCM_VERSION_MINOR}") set(CPACK_RESOURCE_FILE_LICENSE "${YCM_SOURCE_DIR}/LICENSE") set(CPACK_RESOURCE_FILE_WELCOME "${YCM_SOURCE_DIR}/tools/installer/welcome.txt") set(CPACK_PACKAGE_ICON "${YCM_SOURCE_DIR}/tools/installer/ycm.ico") @@ -24,7 +24,7 @@ else() # Produce an installer for 64bit windows enable_language(C) - set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${YCM_VERSION_API}") + set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${YCM_VERSION_MAJOR}.${YCM_VERSION_MINOR}") # WIX settings set(CPACK_WIX_UPGRADE_GUID 9130C806-91AD-4CE4-8C3A-2476F71FEF77) diff --git a/internal-modules/YCMVersion.cmake b/internal-modules/YCMVersion.cmake deleted file mode 100644 index 53489604..00000000 --- a/internal-modules/YCMVersion.cmake +++ /dev/null @@ -1,118 +0,0 @@ -# SPDX-FileCopyrightText: 2012-2021 Istituto Italiano di Tecnologia (IIT) -# SPDX-License-Identifier: BSD-3-Clause - -# This module should not be used outside YCM. - -#[=======================================================================[.rst: -YCMVersion ----------- - -This module should not be used outside YCM. - -Variables defined by this module:: - - YCM_VERSION_FULL - Full version, including git commit and dirty state. - YCM_VERSION_REVISION - Number of commits since latest release (git only) - YCM_VERSION_DATE - Date of the latest commit (git only) - YCM_VERSION_DATE_REVISION - Number of commits since of beginning of the day - of the latest commit (git only) - YCM_VERSION_API - YCM API version - YCM_VERSION_SHORT - YCM clean version (Not unique, includes the number - of commits since latest tag). - YCM_VERSION_SOURCE - YCM source version (includes commit date and hash - information) (git only) - YCM_VERSION_DIRTY - "dirty" if the source tree is contains uncommitted - changes, empty otherwise (git only) -#]=======================================================================] - -include(GitInfo) - -set(YCM_VERSION_API "${YCM_VERSION_MAJOR}.${YCM_VERSION_MINOR}") -set(YCM_VERSION_SHORT "${YCM_VERSION_MAJOR}.${YCM_VERSION_MINOR}.${YCM_VERSION_PATCH}") - -unset(YCM_VERSION_SOURCE) -unset(YCM_VERSION_DIRTY) -unset(YCM_VERSION_REVISION) -unset(YCM_VERSION_DATE) -unset(YCM_VERSION_DATE_REVISION) - -# Get information from the git repository if available -git_wt_info(SOURCE_DIR "${YCM_SOURCE_DIR}" - PREFIX YCM) - -if(DEFINED YCM_GIT_WT_HASH) - # This is a git repository and we have every information that we need - if(YCM_GIT_WT_TAG_REVISION GREATER 0) - # This is not the same commit as the latest tag. - # Include commit information in the version number. - set(YCM_VERSION_REVISION ${YCM_GIT_WT_TAG_REVISION}) - set(YCM_VERSION_DATE ${YCM_GIT_WT_AUTHOR_DATE}) - set(YCM_VERSION_DATE_REVISION ${YCM_GIT_WT_DATE_REVISION}) - string(REPLACE "-" "" _date ${YCM_GIT_WT_AUTHOR_DATE}) - if(YCM_GIT_WT_DATE_REVISION GREATER 1) - string(APPEND _date ".${YCM_GIT_WT_DATE_REVISION}") - endif() - if("${YCM_VERSION_PATCH}" STREQUAL "dev") - # This is the devel branch - set(YCM_VERSION_PATCH "${_date}") - set(YCM_VERSION_SHORT "${YCM_VERSION_MAJOR}.${YCM_VERSION_MINOR}.${YCM_VERSION_PATCH}") - elseif(NOT "${YCM_GIT_WT_TAG}" STREQUAL "v${YCM_VERSION_SHORT}") - # Probably some work in progress... - # Add some random information. - string(TIMESTAMP _ts "%Y%m%d") - string(APPEND YCM_VERSION_SHORT "~${_ts}") - else() - string(APPEND YCM_VERSION_SHORT ".${YCM_VERSION_REVISION}") - endif() - set(YCM_VERSION_SOURCE "${_date}+git${YCM_GIT_WT_HASH_SHORT}") - set(YCM_VERSION_FULL "${YCM_VERSION_SHORT}-${YCM_VERSION_SOURCE}") - elseif(NOT "${YCM_GIT_WT_TAG}" STREQUAL "v${YCM_VERSION_SHORT}") - # This is the same commit as the latest tag, but the version different - # Probably some work in progress... - # Add some random information. - string(TIMESTAMP _ts "%Y%m%d") - string(APPEND YCM_VERSION_SHORT "~${_ts}") - set(YCM_VERSION_FULL "${YCM_VERSION_SHORT}") - else() - # Same commit as latest tag. - # Nothing to do - endif() - # Include information about the "dirty" status. - if(YCM_GIT_WT_DIRTY) - set(YCM_VERSION_DIRTY "dirty") - set(YCM_VERSION_FULL "${YCM_VERSION}+${YCM_VERSION_DIRTY}") - endif() -else() - # This is not a git repository or git is missing. - if("${YCM_VERSION_PATCH}" STREQUAL "dev") - # This is weird, someone is using "dev" outside a repo or without git. - # Add some random information. - string(TIMESTAMP YCM_VERSION_PATCH "%Y%m%d") - set(YCM_VERSION_SHORT "${YCM_VERSION_MAJOR}.${YCM_VERSION_MINOR}.${YCM_VERSION_PATCH}") - set(YCM_VERSION_FULL "${YCM_VERSION_SHORT}~dev") - else() - # We assume that this is a release, there is not much that we can do if it's - # not. - # Nothing to do - endif() - # We don't have information about the "dirty" status outside a git repo. -endif() - -if(YCM_VERSION_DEBUG) - foreach(_var YCM_VERSION - YCM_VERSION_SHORT - YCM_VERSION_MAJOR - YCM_VERSION_MINOR - YCM_VERSION_FULL - YCM_VERSION_PATCH - YCM_VERSION_REVISION - YCM_VERSION_DATE - YCM_VERSION_DATE_REVISION - YCM_VERSION_API - YCM_VERSION_SOURCE - YCM_VERSION_DIRTY) - message(STATUS "${_var}: ${${_var}}") - endforeach() -endif() - -message(STATUS "YCM Version: ${YCM_VERSION_FULL} (${YCM_VERSION_SHORT})")