From a523dfe8e0e15997b10f07e534ab855470c9e037 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Sat, 9 Jul 2022 01:08:13 -0700 Subject: [PATCH] Migrate configurable file references (#274) Signed-off-by: methylDragon --- CMakeLists.txt | 4 ++-- cmake/GzPackaging.cmake | 18 +++++++++--------- cmake/GzUtils.cmake | 12 ++++++------ cmake/gz_auto_headers.hh.in | 2 +- examples/find_ogre2/ogre-2.1/CMakeLists.txt | 2 +- examples/find_ogre2/ogre-2.2/CMakeLists.txt | 2 +- test/cmake_minimum_required.bash | 16 ++++++++-------- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61a536e0..0217bec9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,11 +54,11 @@ install(DIRECTORY tools/ #-------------------------------------- # Create configuration and installation variables -set(gz_config_input "${CMAKE_CURRENT_SOURCE_DIR}/config/ignition-cmake-config.cmake.in") +set(gz_config_input "${CMAKE_CURRENT_SOURCE_DIR}/config/gz-cmake-config.cmake.in") set(gz_config_output "${PROJECT_NAME_LOWER}-config.cmake") set(gz_version_output "${PROJECT_NAME_LOWER}-config-version.cmake") set(gz_config_install_dir "${CMAKE_INSTALL_DATAROOTDIR}/cmake/${PROJECT_NAME_LOWER}") -set(ign_pkgconfig_input "${CMAKE_CURRENT_SOURCE_DIR}/config/ignition-cmake.pc.in") +set(ign_pkgconfig_input "${CMAKE_CURRENT_SOURCE_DIR}/config/gz-cmake.pc.in") set(ign_pkgconfig_output "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc") set(ign_pkgconfig_install_dir "${IGN_LIB_INSTALL_DIR}/pkgconfig") set(ign_utilities_target ${PROJECT_EXPORT_NAME}-utilities) diff --git a/cmake/GzPackaging.cmake b/cmake/GzPackaging.cmake index 9d8c3a8a..e9c0e845 100644 --- a/cmake/GzPackaging.cmake +++ b/cmake/GzPackaging.cmake @@ -178,8 +178,8 @@ endmacro() # gz_add_component(~), so users of gz-cmake should not call this # function. # -# NOTE: For gz-cmake developers, the variables needed by ignition.pc.in or -# ignition-component.pc.in MUST be set before calling this function. +# NOTE: For gz-cmake developers, the variables needed by gz.pc.in or +# gz-component.pc.in MUST be set before calling this function. # # Create a pkgconfig file for your target, and install it. function(_gz_create_pkgconfig) @@ -197,10 +197,10 @@ function(_gz_create_pkgconfig) #------------------------------------ # Choose which input file to use if(_gz_create_pkgconfig_COMPONENT) - set(pkgconfig_input "${IGNITION_CMAKE_DIR}/pkgconfig/ignition-component.pc.in") + set(pkgconfig_input "${IGNITION_CMAKE_DIR}/pkgconfig/gz-component.pc.in") set(target_name ${PROJECT_LIBRARY_TARGET_NAME}-${_gz_create_pkgconfig_COMPONENT}) else() - set(pkgconfig_input "${IGNITION_CMAKE_DIR}/pkgconfig/ignition.pc.in") + set(pkgconfig_input "${IGNITION_CMAKE_DIR}/pkgconfig/gz.pc.in") set(target_name ${PROJECT_LIBRARY_TARGET_NAME}) endif() @@ -239,7 +239,7 @@ endfunction() # function. # # NOTE: For gz-cmake developers, some of the variables needed by -# ignition-config.cmake.in or ignition-component-config.cmake.in MUST be +# gz-config.cmake.in or gz-component-config.cmake.in MUST be # set before calling this function. The following variables are set # automatically by this function: # - import_target_name @@ -270,12 +270,12 @@ function(_gz_create_cmake_package) set(component ${_gz_create_cmake_package_COMPONENT}) set(target_name ${PROJECT_LIBRARY_TARGET_NAME}-${component}) - set(gz_config_input "${IGNITION_CMAKE_DIR}/ignition-component-config.cmake.in") + set(gz_config_input "${IGNITION_CMAKE_DIR}/gz-component-config.cmake.in") set(simple_import_name ${component}) elseif(_gz_create_cmake_package_ALL) - set(gz_config_input "${IGNITION_CMAKE_DIR}/ignition-all-config.cmake.in") + set(gz_config_input "${IGNITION_CMAKE_DIR}/gz-all-config.cmake.in") set(target_name ${PROJECT_LIBRARY_TARGET_NAME}-all) set(all_pkg_name ${PROJECT_LIBRARY_TARGET_NAME}-all) set(simple_import_name all) @@ -283,7 +283,7 @@ function(_gz_create_cmake_package) else() set(target_name ${PROJECT_LIBRARY_TARGET_NAME}) - set(gz_config_input "${IGNITION_CMAKE_DIR}/ignition-config.cmake.in") + set(gz_config_input "${IGNITION_CMAKE_DIR}/gz-config.cmake.in") set(simple_import_name core) endif() @@ -298,7 +298,7 @@ function(_gz_create_cmake_package) endif() - # This gets used by the ignition-*.config.cmake.in files + # This gets used by the gz-*.config.cmake.in files set(target_output_filename ${target_name}-targets.cmake) set(gz_config_output "${PROJECT_BINARY_DIR}/cmake/${target_name}-config.cmake") set(gz_version_output "${PROJECT_BINARY_DIR}/cmake/${target_name}-config-version.cmake") diff --git a/cmake/GzUtils.cmake b/cmake/GzUtils.cmake index f84b1fef..08c43e15 100644 --- a/cmake/GzUtils.cmake +++ b/cmake/GzUtils.cmake @@ -699,7 +699,7 @@ endfunction() # ${IGN_DESIGNATION}.hh. This will only add them to the header, it will not # generate or install them. # -# This will also run configure_file on ign_auto_headers.hh.in and config.hh.in +# This will also run configure_file on gz_auto_headers.hh.in and config.hh.in # and install them. This will NOT install any other files or directories that # appear in the ${CMAKE_CURRENT_BINARY_DIR}. # @@ -821,7 +821,7 @@ function(gz_install_all_headers) set(meta_header_install_dir ${IGN_INCLUDE_INSTALL_DIR_FULL}/${PROJECT_INCLUDE_DIR}/${component_name}) # Define the input/output of the configuration for the component "master" header - set(master_header_in ${IGNITION_CMAKE_DIR}/ign_auto_headers.hh.in) + set(master_header_in ${IGNITION_CMAKE_DIR}/gz_auto_headers.hh.in) set(master_header_out ${CMAKE_CURRENT_BINARY_DIR}/${component_name}.hh) else() @@ -830,7 +830,7 @@ function(gz_install_all_headers) set(meta_header_install_dir ${IGN_INCLUDE_INSTALL_DIR_FULL}/${PROJECT_INCLUDE_DIR}) # Define the input/output of the configuration for the core "master" header - set(master_header_in ${IGNITION_CMAKE_DIR}/ign_auto_headers.hh.in) + set(master_header_in ${IGNITION_CMAKE_DIR}/gz_auto_headers.hh.in) set(master_header_out ${CMAKE_CURRENT_BINARY_DIR}/../${IGN_DESIGNATION}.hh) endif() @@ -1377,7 +1377,7 @@ function(gz_add_component component_name) endif() #------------------------------------ - # Set variables that are needed by cmake/ignition-component-config.cmake.in + # Set variables that are needed by cmake/gz-component-config.cmake.in set(component_pkg_name ${component_target_name}) if(gz_add_component_INTERFACE) set(component_pkgconfig_lib) @@ -1389,7 +1389,7 @@ function(gz_add_component component_name) # variable is used in config files set(component_name ${component_name}) - # ... and by cmake/pkgconfig/ignition-component.pc.in + # ... and by cmake/pkgconfig/gz-component.pc.in set(component_pkgconfig_requires ${${component_name}_PKGCONFIG_REQUIRES}) set(component_pkgconfig_requires_private ${${component_name}_PKGCONFIG_REQUIRES_PRIVATE}) set(component_pkgconfig_lib_deps ${${component_name}_PKGCONFIG_LIBS}) @@ -1437,7 +1437,7 @@ endfunction() # Exports the `all` target. This function is private to gz-cmake. function(_gz_export_target_all) - # find_all_pkg_components is used as a variable in ignition-all-config.cmake.in + # find_all_pkg_components is used as a variable in gz-all-config.cmake.in set(find_all_pkg_components "") get_property(all_known_components TARGET ${PROJECT_LIBRARY_TARGET_NAME}-all PROPERTY INTERFACE_IGN_ALL_KNOWN_COMPONENTS) diff --git a/cmake/gz_auto_headers.hh.in b/cmake/gz_auto_headers.hh.in index 9a64c883..20c91f44 100644 --- a/cmake/gz_auto_headers.hh.in +++ b/cmake/gz_auto_headers.hh.in @@ -17,7 +17,7 @@ // ****** Do not modify this file. ****** // This file is automatically generated by CMake. Changes should instead be -// made to cmake/ign_auto_headers.hh.in in gz-cmake +// made to cmake/gz_auto_headers.hh.in in gz-cmake #include <@PROJECT_INCLUDE_DIR@/config.hh> ${ign_headers} diff --git a/examples/find_ogre2/ogre-2.1/CMakeLists.txt b/examples/find_ogre2/ogre-2.1/CMakeLists.txt index ee558652..c636f62b 100644 --- a/examples/find_ogre2/ogre-2.1/CMakeLists.txt +++ b/examples/find_ogre2/ogre-2.1/CMakeLists.txt @@ -5,7 +5,7 @@ find_package(gz-cmake3 REQUIRED) message(STATUS "Finding OGRE 2.1") -gz_find_package(IgnOGRE2 VERSION 2.1.0 +gz_find_package(GzOGRE2 VERSION 2.1.0 COMPONENTS HlmsPbs HlmsUnlit Overlay) message(STATUS "OGRE2_FOUND: " ${OGRE2_FOUND}) diff --git a/examples/find_ogre2/ogre-2.2/CMakeLists.txt b/examples/find_ogre2/ogre-2.2/CMakeLists.txt index 2c9ec409..9f176a1d 100644 --- a/examples/find_ogre2/ogre-2.2/CMakeLists.txt +++ b/examples/find_ogre2/ogre-2.2/CMakeLists.txt @@ -5,7 +5,7 @@ find_package(gz-cmake3 REQUIRED) message(STATUS "Finding OGRE 2.2") -gz_find_package(IgnOGRE2 VERSION 2.2.0 +gz_find_package(GzOGRE2 VERSION 2.2.0 COMPONENTS HlmsPbs HlmsUnlit Overlay) message(STATUS "OGRE2_FOUND: " ${OGRE2_FOUND}) diff --git a/test/cmake_minimum_required.bash b/test/cmake_minimum_required.bash index ba16505b..4a5b18c9 100755 --- a/test/cmake_minimum_required.bash +++ b/test/cmake_minimum_required.bash @@ -3,18 +3,18 @@ export CMAKE_FILES_TO_CHECK=" $1/CMakeLists.txt - $1/cmake/ignition-all-config.cmake.in - $1/cmake/ignition-component-config.cmake.in - $1/cmake/ignition-config.cmake.in - $1/config/ignition-cmake-config.cmake.in" + $1/cmake/gz-all-config.cmake.in + $1/cmake/gz-component-config.cmake.in + $1/cmake/gz-config.cmake.in + $1/config/gz-cmake-config.cmake.in" unset TEST_CMAKE_MIN_REQUIRED_FAILED # first argument is root of gz-cmake repository if [[ ! -d "$1" \ || ! -a "$1/CMakeLists.txt" \ - || ! -a "$1/cmake/ignition-all-config.cmake.in" \ - || ! -a "$1/cmake/ignition-component-config.cmake.in" \ - || ! -a "$1/cmake/ignition-config.cmake.in" \ - || ! -a "$1/config/ignition-cmake-config.cmake.in" ]]; then + || ! -a "$1/cmake/gz-all-config.cmake.in" \ + || ! -a "$1/cmake/gz-component-config.cmake.in" \ + || ! -a "$1/cmake/gz-config.cmake.in" \ + || ! -a "$1/config/gz-cmake-config.cmake.in" ]]; then echo the first argument must be the root of the gz-cmake repository export TEST_CMAKE_MIN_REQUIRED_FAILED=1 else