diff --git a/cmake/Export.hh.in b/cmake/Export.hh.in index c20b4836..003f6193 100644 --- a/cmake/Export.hh.in +++ b/cmake/Export.hh.in @@ -52,12 +52,46 @@ #endif -#ifndef IGN_DEPRECATED +#ifndef GZ_DEPRECATED /// For @lib_name@ developers: Use this macro to indicate that a /// function or class has been deprecated and should no longer be used. A /// version should be specified to provide context to the user about when the /// function became deprecated. -#define IGN_DEPRECATED(version) IGN_DEPRECATED_ALL_VERSIONS + +// NOTE(CH3): GZ_DEPRECATED_ALL_VERSIONS can't be ticktocked, it's generated +// On the bright side, it seems to be private +#define GZ_DEPRECATED(version) GZ_DEPRECATED_ALL_VERSIONS #endif + +// TICKTOCK IGNITION ======================================================== +// TODO(CH3): Remove on ticktock, supports defining IGNITION macros if we're +// a lib is using GZ_ prefixed export macros +#ifndef @_ign_export_base@_VISIBLE +/// For @lib_name@ developers: Apply this macro to @lib_name@ +/// functions and classes which consumers of this library will need to be able +/// to call from their own programs or libraries. +#define @_ign_export_base@_VISIBLE \ + DETAIL_@export_base@_VISIBLE #endif + + +#ifndef @_ign_export_base@_HIDDEN +/// For @lib_name@ developers: Apply this macro to @lib_name@ +/// functions and classes which must not be used by consumers of this library. +/// By default, this property is applied to all classes and functions which are +/// not tagged with @_ign_export_base@_VISIBLE, so this does not +/// generally need to be used. +#define @_ign_export_base@_HIDDEN \ + DETAIL_@export_base@_HIDDEN +#endif + + +#ifndef IGN_DEPRECATED +// TODO(CH3): Remove on ticktock +// NOTE(CH3): This has no docstring since we'll make GZ_DEPRECATED the default +#define IGN_DEPRECATED(version) GZ_DEPRECATED_ALL_VERSIONS +#endif + + +#endif // @export_base@_EXPORT_HH_ diff --git a/cmake/IgnConfigureProject.cmake b/cmake/IgnConfigureProject.cmake index 05b638f3..4a8a08d0 100644 --- a/cmake/IgnConfigureProject.cmake +++ b/cmake/IgnConfigureProject.cmake @@ -105,6 +105,7 @@ macro(ign_configure_project) set(PROJECT_VERSION_FULL ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) + # The full version of the project, but without any prerelease suffix set(PROJECT_VERSION_FULL_NO_SUFFIX ${PROJECT_VERSION_FULL}) diff --git a/cmake/IgnUtils.cmake b/cmake/IgnUtils.cmake index 4f185061..7f78a532 100644 --- a/cmake/IgnUtils.cmake +++ b/cmake/IgnUtils.cmake @@ -138,7 +138,12 @@ # is provided using VERSION, then this will be left # out, whether or not it is provided. # -macro(ign_find_package PACKAGE_NAME) +macro(ign_find_package MACRO_PACKAGE_NAME) + # This is to allow "remapping" of the macro arg for function-like capability, but also access to + # the parent scope + # TODO(CH3): Remove this on tock, along the later sections, + # and change MACRO_PACKAGE_NAME back to PACKAGE_NAME + set(PACKAGE_NAME ${MACRO_PACKAGE_NAME}) #------------------------------------ # Define the expected arguments @@ -150,6 +155,77 @@ macro(ign_find_package PACKAGE_NAME) # Parse the arguments _ign_cmake_parse_arguments(gz_find_package "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + #------------------------------------ + # Handle ticktock + # TODO(CH3): Remove on tock + if(${PACKAGE_NAME} MATCHES "^ignition-") + message(DEPRECATION + "\nThe use of 'ign-' and 'ignition-' prefixed libraries has been " + "deprecated in favor of 'gz-' and will be removed in the next version!\n" + ) + set(GZ_PACKAGE_NAME ${PACKAGE_NAME}) + + string(REGEX REPLACE "^ign(ition)?-" "gz-" GZ_PACKAGE_NAME ${PACKAGE_NAME}) + message(NOTICE "...Trying to use the gz- version of the library you specified: '${GZ_PACKAGE_NAME}'\n") + + #------------------------------------ + # Construct the arguments to pass to find_package + # The duplication is necessary for the ticktock... + # TODO(CH3): Remove on tock + set(gz_find_package_args ${GZ_PACKAGE_NAME}) + + if(ign_find_package_VERSION) + list(APPEND gz_find_package_args ${ign_find_package_VERSION}) + endif() + + if(ign_find_package_QUIET) + list(APPEND gz_find_package_args QUIET) + endif() + + if(ign_find_package_EXACT) + list(APPEND gz_find_package_args EXACT) + endif() + + if(ign_find_package_CONFIG) + list(APPEND gz_find_package_args CONFIG) + endif() + + if(ign_find_package_COMPONENTS) + list(APPEND gz_find_package_args COMPONENTS ${ign_find_package_COMPONENTS}) + endif() + + if(ign_find_package_OPTIONAL_COMPONENTS) + list(APPEND gz_find_package_args OPTIONAL_COMPONENTS ${ign_find_package_OPTIONAL_COMPONENTS}) + endif() + + if(ign_find_package_EXTRA_ARGS) + list(APPEND gz_find_package_args ${ign_find_package_EXTRA_ARGS}) + endif() + + find_package(${gz_find_package_args} QUIET) + + if(${GZ_PACKAGE_NAME}_FOUND) + message(NOTICE "Found! Using it instead of '${PACKAGE_NAME_BAK}'") + + # Manually set ignition- prefix version numbers for ticktock + # TODO(CH3): Remove on tock + set(${PACKAGE_NAME}_VERSION ${${GZ_PACKAGE_NAME}_VERSION}) + set(${PACKAGE_NAME}_VERSION_MAJOR ${${GZ_PACKAGE_NAME}_VERSION_MAJOR}) + set(${PACKAGE_NAME}_VERSION_MINOR ${${GZ_PACKAGE_NAME}_VERSION_MINOR}) + set(${PACKAGE_NAME}_VERSION_PATCH ${${GZ_PACKAGE_NAME}_VERSION_PATCH}) + set(${PACKAGE_NAME}_VERSION_TWEAK ${${GZ_PACKAGE_NAME}_VERSION_TWEAK}) + + else() + message(WARNING + "\n'${GZ_PACKAGE_NAME}' not found! Falling back to '${PACKAGE_NAME}'...\n" + "== NOTE ==\n" + "gz- library finding will sometimes deterministically fail because the dynamic substitution " + "doesn't get picked up by colcon-cmake.\n" + "To avoid these failures, substitute your 'ign(ition)-' prefixes with 'gz-' in your CMake " + "files, or call `colcon build --executor sequential` instead!\n") + endif() + endif() + #------------------------------------ # Construct the arguments to pass to find_package set(${PACKAGE_NAME}_find_package_args ${PACKAGE_NAME}) @@ -309,7 +385,7 @@ macro(ign_find_package PACKAGE_NAME) # TODO: When we migrate to cmake-3.9+ bring back find_dependency(~) because # at that point it will be able to support COMPONENTS and EXTRA_ARGS -# set(${PACKAGE_NAME}_find_dependency "find_dependency(${${PACKAGE_NAME}_dependency_args})") + # set(${PACKAGE_NAME}_find_dependency "find_dependency(${${PACKAGE_NAME}_dependency_args})") set(${PACKAGE_NAME}_find_dependency "find_package(${${PACKAGE_NAME}_dependency_args})") @@ -952,12 +1028,58 @@ function(ign_create_core_library) #------------------------------------ # Create the target for the core library, and configure it to be installed - _ign_add_library_or_component( - LIB_NAME ${PROJECT_LIBRARY_TARGET_NAME} - INCLUDE_DIR "${PROJECT_INCLUDE_DIR}" - EXPORT_BASE IGNITION_${IGN_DESIGNATION_UPPER} - SOURCES ${sources} - ${interface_option}) + + # Support "gz-" + if(${PROJECT_LIBRARY_TARGET_NAME} MATCHES "^gz-") + _ign_add_library_or_component( + LIB_NAME ${PROJECT_LIBRARY_TARGET_NAME} + INCLUDE_DIR "${PROJECT_INCLUDE_DIR}" + EXPORT_BASE GZ_${IGN_DESIGNATION_UPPER} + SOURCES ${sources} + ${interface_option}) + + # For ticktocking: Export an "ignition-" target as well, allowing linking against + # the ignition- prefixed name + # TODO(CH3): To remove on tock + string(REGEX REPLACE "^gz-" "ignition-" IGN_LIBRARY_TARGET_NAME ${PROJECT_LIBRARY_TARGET_NAME}) + _ign_add_library_or_component( + LIB_NAME ${IGN_LIBRARY_TARGET_NAME} + INCLUDE_DIR "${PROJECT_INCLUDE_DIR}" + + # Using GZ_ is deliberate, Export.hh.in has logic to deal with this + EXPORT_BASE GZ_${IGN_DESIGNATION_UPPER} + SOURCES ${sources} + ${interface_option}) + + target_include_directories(${IGN_LIBRARY_TARGET_NAME} + ${property_type} + # This is the publicly installed headers directory. + "$" + # This is the in-build version of the core library headers directory. + # Generated headers for the core library get placed here. + "$" + # Generated headers for the core library might also get placed here. + "$") + + #------------------------------------ + # Handle cmake and pkgconfig packaging + # TODO(CH3): Remove on tock + string(REGEX REPLACE "^gz-" "ignition-" IGN_PROJECT_NAME_LOWER ${PROJECT_NAME_LOWER}) + + if(ign_create_core_library_INTERFACE) + set(project_pkgconfig_core_lib) # Intentionally blank + else() + set(project_pkgconfig_core_lib "-l${IGN_PROJECT_NAME_LOWER}") + endif() + + else() + _ign_add_library_or_component( + LIB_NAME ${PROJECT_LIBRARY_TARGET_NAME} + INCLUDE_DIR "${PROJECT_INCLUDE_DIR}" + EXPORT_BASE GZ_${IGN_DESIGNATION_UPPER} + SOURCES ${sources} + ${interface_option}) + endif() # These generator expressions are necessary for multi-configuration generators # such as MSVC on Windows. They also ensure that our target exports its @@ -1006,7 +1128,9 @@ function(ign_create_core_library) if(gz_create_core_library_INTERFACE) set(project_pkgconfig_core_lib) # Intentionally blank else() - set(project_pkgconfig_core_lib "-l${PROJECT_NAME_LOWER}") + # We append here so the project target can live alongside the ignition- alias + # TODO(CH3): Change back to set() on tock and remove the set() in the other TODO above + ign_string_append(project_pkgconfig_core_lib "-l${PROJECT_NAME_LOWER}") endif() # Export and install the core library's cmake target and package information @@ -1136,10 +1260,18 @@ function(ign_add_component component_name) #------------------------------------ # Create the target for this component, and configure it to be installed + + # Support "gz-" + if(${PROJECT_LIBRARY_TARGET_NAME} MATCHES "^gz-") + set(EXPORT_PREFIX "GZ") + else() + set(EXPORT_PREFIX "IGNITION") + endif() + _ign_add_library_or_component( LIB_NAME ${component_target_name} INCLUDE_DIR "${PROJECT_INCLUDE_DIR}/${include_subdir}" - EXPORT_BASE IGNITION_${IGN_DESIGNATION_UPPER}_${component_name_upper} + EXPORT_BASE GZ_${IGN_DESIGNATION_UPPER}_${component_name_upper} SOURCES ${sources} ${interface_option}) @@ -1339,6 +1471,8 @@ macro(_ign_add_library_or_component) # - include_dir # - export_base # - lib_name + # + # - _ign_export_base #------------------------------------ # Define the expected arguments @@ -1424,7 +1558,7 @@ macro(_ign_add_library_or_component) EXPORT_FILE_NAME ${implementation_file_name} EXPORT_MACRO_NAME DETAIL_${export_base}_VISIBLE NO_EXPORT_MACRO_NAME DETAIL_${export_base}_HIDDEN - DEPRECATED_MACRO_NAME IGN_DEPRECATED_ALL_VERSIONS) + DEPRECATED_MACRO_NAME GZ_DEPRECATED_ALL_VERSIONS) set(install_include_dir "${IGN_INCLUDE_INSTALL_DIR_FULL}/${include_dir}") @@ -1438,6 +1572,12 @@ macro(_ign_add_library_or_component) # Configure the public-facing header for exporting and deprecating. This # header provides commentary for the macros so that developers can know their # purpose. + + # TODO(CH3): Remove this on ticktock + # This is to allow IGNITION_ prefixed export macros to generate in Export.hh + # _using_gz_export_base is used in Export.hh.in's configuration! + string(REGEX REPLACE "^GZ_" "IGNITION_" _ign_export_base ${export_base}) + configure_file( "${IGNITION_CMAKE_DIR}/Export.hh.in" "${binary_include_dir}/Export.hh") diff --git a/cmake/ignition-config.cmake.in b/cmake/ignition-config.cmake.in index 19145484..a15d41fe 100644 --- a/cmake/ignition-config.cmake.in +++ b/cmake/ignition-config.cmake.in @@ -94,6 +94,12 @@ endif() @PACKAGE_INIT@ +# Add 'ignition-' prefixed package name if package is 'gz-' prefixed +# TODO(CH3): Remove on tock +if(@PKG_NAME@ MATCHES "^gz-") + string(REGEX REPLACE "^gz-" "ignition-" IGN_PKG_NAME @PKG_NAME@) +endif() + if(NOT TARGET @import_target_name@) include("${CMAKE_CURRENT_LIST_DIR}/@target_output_filename@") @@ -102,6 +108,16 @@ if(NOT TARGET @import_target_name@) add_library(@simple_import_name@ INTERFACE IMPORTED) set_target_properties(@simple_import_name@ PROPERTIES INTERFACE_LINK_LIBRARIES @import_target_name@) + + # Add 'ignition-' prefixed "alias" for the core library + # TODO(CH3): Remove on tock + if(IGN_PKG_NAME) + string(REGEX REPLACE "^gz-" "ignition-" ign_simple_import_name @simple_import_name@) + add_library(${ign_simple_import_name} INTERFACE IMPORTED) + set_target_properties(${ign_simple_import_name} PROPERTIES + INTERFACE_LINK_LIBRARIES @import_target_name@) + endif() + # Note: In a future version of cmake, we can replace this with an ALIAS target # In case someone tries to link against the plain library name, we want to @@ -112,11 +128,30 @@ if(NOT TARGET @import_target_name@) set_target_properties(@PKG_NAME@ PROPERTIES INTERFACE_LINK_LIBRARIES @import_target_name@) + # Add 'ignition-' prefixed "alias" + # TODO(CH3): Remove on tock + if(IGN_PKG_NAME) + add_library(${IGN_PKG_NAME} INTERFACE IMPORTED) + set_target_properties(${IGN_PKG_NAME} PROPERTIES + INTERFACE_LINK_LIBRARIES @import_target_name@) + endif() + +endif() + +# TODO(CH3): Remove on tock +if(IGN_PKG_NAME) + # This is a really bad name... + string(REGEX REPLACE "^gz-" "ignition-" ign_ign_namespace @ign_namespace@) endif() # Create the "all" target if it does not already exist if(NOT TARGET @ign_namespace@requested) add_library(@ign_namespace@requested INTERFACE IMPORTED) + + # TODO(CH3): Remove on tock + if(IGN_PKG_NAME) + add_library(${ign_ign_namespace}requested INTERFACE IMPORTED) + endif() endif() # Link the core library to the "all" target. We set the property explicitly @@ -128,17 +163,41 @@ if(NOT ign_all_components) # should NOT pass into the INTERFACE_LINK_LIBRARIES property. set_target_properties(@ign_namespace@requested PROPERTIES INTERFACE_LINK_LIBRARIES "@import_target_name@") + + # TODO(CH3): Remove on tock + if(IGN_PKG_NAME) + # This is a really bad name... + set_target_properties(${ign_ign_namespace}requested PROPERTIES + INTERFACE_LINK_LIBRARIES "@import_target_name@") + endif() else() set_target_properties(@ign_namespace@requested PROPERTIES INTERFACE_LINK_LIBRARIES "${ign_all_components};@import_target_name@") + + # TODO(CH3): Remove on tock + if(IGN_PKG_NAME) + # This is a really bad name... + set_target_properties(${ign_ign_namespace}requested PROPERTIES + INTERFACE_LINK_LIBRARIES "${ign_all_components};@import_target_name@") + endif() endif() # Package variables. Note that @PKG_NAME@_LIBRARIES and @PKG_NAME@_CORE_LIBRARY # contain imported targets, so @PKG_NAME@_INCLUDE_DIRS is never needed. set(@PKG_NAME@_CORE_LIBRARY @simple_import_name@) set(@PKG_NAME@_LIBRARIES @ign_namespace@requested) + set_and_check(@PKG_NAME@_INCLUDE_DIRS "@PACKAGE_IGN_INCLUDE_INSTALL_DIR_FULL@") +# Add ignition- prefixed package variables and include directories pointing to the gz- headers +# TODO(CH3): Remove on tock +if(IGN_PKG_NAME) + set(${IGN_PKG_NAME}_CORE_LIBRARY @simple_import_name@) + set(${IGN_PKG_NAME}_LIBRARIES @ign_namespace@requested) + + set_and_check(${IGN_PKG_NAME}_INCLUDE_DIRS "@PACKAGE_IGN_INCLUDE_INSTALL_DIR_FULL@") +endif() + # Backwards compatibility variables set(@LEGACY_PROJECT_PREFIX@_LIBRARIES ${@PKG_NAME@_LIBRARIES}) set(@LEGACY_PROJECT_PREFIX@_INCLUDE_DIRS ${@PKG_NAME@_INCLUDE_DIRS}) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 90abd1ac..33117584 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -31,36 +31,36 @@ endif() foreach(example ${example_directories}) set(run_codecheck false) if (${example} STREQUAL "ign_conf") - set(example_tarball_name ignition-minimal-0.1.0.tar.bz2) + set(example_tarball_name gz-minimal-0.1.0.tar.bz2) elseif (${example} STREQUAL "no_ignition_prefix") set(example_tarball_name no_ignition_prefix-0.1.0.tar.bz2) elseif (${example} STREQUAL "prerelease") - set(example_tarball_name ignition-minimal-1.0.0~pre1.tar.bz2) + set(example_tarball_name gz-minimal-1.0.0~pre1.tar.bz2) elseif (${example} STREQUAL "core_nodep") - set(example_tarball_name ignition-core_no_deps-0.1.0.tar.bz2) + set(example_tarball_name gz-core_no_deps-0.1.0.tar.bz2) set(run_codecheck true) elseif (${example} STREQUAL "core_nodep_static") - set(example_tarball_name ignition-core_no_deps_static-0.1.0.tar.bz2) + set(example_tarball_name gz-core_no_deps_static-0.1.0.tar.bz2) set(run_codecheck true) elseif (${example} STREQUAL "core_child") - set(example_tarball_name ignition-core_child-0.1.0.tar.bz2) + set(example_tarball_name gz-core_child-0.1.0.tar.bz2) set(run_codecheck true) elseif (${example} STREQUAL "core_child_private") - set(example_tarball_name ignition-core_child_private-0.1.0.tar.bz2) + set(example_tarball_name gz-core_child_private-0.1.0.tar.bz2) set(run_codecheck true) elseif (${example} STREQUAL "core_static_child") - set(example_tarball_name ignition-core_static_child-0.1.0.tar.bz2) + set(example_tarball_name gz-core_static_child-0.1.0.tar.bz2) set(run_codecheck true) elseif (${example} STREQUAL "comp_deps") - set(example_tarball_name ignition-component_deps-0.1.0.tar.bz2) + set(example_tarball_name gz-component_deps-0.1.0.tar.bz2) elseif (${example} STREQUAL "use_component_depsA") - set(example_tarball_name ignition-use_component_depsa-0.1.0.tar.bz2) + set(example_tarball_name gz-use_component_depsa-0.1.0.tar.bz2) elseif (${example} STREQUAL "use_component_depsB") - set(example_tarball_name ignition-use_component_depsb-0.1.0.tar.bz2) + set(example_tarball_name gz-use_component_depsb-0.1.0.tar.bz2) elseif (${example} STREQUAL "use_component_depsC") - set(example_tarball_name ignition-use_component_depsc-0.1.0.tar.bz2) + set(example_tarball_name gz-use_component_depsc-0.1.0.tar.bz2) elseif (${example} STREQUAL "use_config_ifp") - set(example_tarball_name ignition-find_config-0.1.0.tar.bz2) + set(example_tarball_name gz-find_config-0.1.0.tar.bz2) else() set(example_tarball_name) @@ -192,7 +192,7 @@ if (UNIX) @ONLY) set(_env_vars) # On Debian and if the install prefix is /usr, the default CMAKE_INSTALL_LIBDIR of this project - # as set by GNUInstallDirs will be different from the one of the example project, + # as set by GNUInstallDirs will be different from the one of the example project, # so let's hardcode it in that case if(EXISTS "/etc/debian_version" AND "${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$") set(example_PKGCONFIG_INSTALL_LIBDIR "lib/pkgconfig") diff --git a/examples/comp_deps/CMakeLists.txt b/examples/comp_deps/CMakeLists.txt index 5ae53288..3cb9c4fe 100644 --- a/examples/comp_deps/CMakeLists.txt +++ b/examples/comp_deps/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-component_deps VERSION 0.1.0) +project(gz-component_deps VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) ign_configure_project() ign_configure_build(QUIT_IF_BUILD_ERRORS diff --git a/examples/core_child/CMakeLists.txt b/examples/core_child/CMakeLists.txt index a348d179..341b1df4 100644 --- a/examples/core_child/CMakeLists.txt +++ b/examples/core_child/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-core_child VERSION 0.1.0) +project(gz-core_child VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) ign_configure_project() -ign_find_package(ignition-core_no_deps REQUIRED) +ign_find_package(gz-core_no_deps REQUIRED) ign_configure_build(QUIT_IF_BUILD_ERRORS) ign_create_packages() -ign_create_docs(TAGFILES "${IGNITION-CORE_NO_DEPS_DOXYGEN_TAGFILE} = ${IGNITION-CORE_NO_DEPS_API_URL}") +ign_create_docs(TAGFILES "${GZ-CORE_NO_DEPS_DOXYGEN_TAGFILE} = ${GZ-CORE_NO_DEPS_API_URL}") diff --git a/examples/core_child/src/CMakeLists.txt b/examples/core_child/src/CMakeLists.txt index 82c11722..7a02bba2 100644 --- a/examples/core_child/src/CMakeLists.txt +++ b/examples/core_child/src/CMakeLists.txt @@ -2,5 +2,5 @@ ign_get_libsources_and_unittests(sources gtest_sources) ign_create_core_library(SOURCES ${sources} CXX_STANDARD 11) target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC - ignition-core_no_deps::ignition-core_no_deps) + gz-core_no_deps::gz-core_no_deps) ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}) diff --git a/examples/core_child_private/CMakeLists.txt b/examples/core_child_private/CMakeLists.txt index 0036a2b4..62d576f4 100644 --- a/examples/core_child_private/CMakeLists.txt +++ b/examples/core_child_private/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-core_child_private VERSION 0.1.0) +project(gz-core_child_private VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) ign_configure_project() -ign_find_package(ignition-core_no_deps PRIVATE REQUIRED) +ign_find_package(gz-core_no_deps PRIVATE REQUIRED) ign_configure_build(QUIT_IF_BUILD_ERRORS) ign_create_packages() -ign_create_docs(TAGFILES "${IGNITION-CORE_NO_DEPS_DOXYGEN_TAGFILE} = ${IGNITION-CORE_NO_DEPS_API_URL}") +ign_create_docs(TAGFILES "${GZ-CORE_NO_DEPS_DOXYGEN_TAGFILE} = ${GZ-CORE_NO_DEPS_API_URL}") diff --git a/examples/core_child_private/src/CMakeLists.txt b/examples/core_child_private/src/CMakeLists.txt index 29014808..d5845a1b 100644 --- a/examples/core_child_private/src/CMakeLists.txt +++ b/examples/core_child_private/src/CMakeLists.txt @@ -2,5 +2,5 @@ ign_get_libsources_and_unittests(sources gtest_sources) ign_create_core_library(SOURCES ${sources} CXX_STANDARD 11) target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} PRIVATE - ignition-core_no_deps::ignition-core_no_deps) + gz-core_no_deps::gz-core_no_deps) ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}) diff --git a/examples/core_nodep/CMakeLists.txt b/examples/core_nodep/CMakeLists.txt index 5759bd2e..580074cd 100644 --- a/examples/core_nodep/CMakeLists.txt +++ b/examples/core_nodep/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-core_no_deps VERSION 0.1.0) +project(gz-core_no_deps VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) ign_configure_project() ign_configure_build(QUIT_IF_BUILD_ERRORS) diff --git a/examples/core_nodep_static/CMakeLists.txt b/examples/core_nodep_static/CMakeLists.txt index 5726db10..e03ffbc8 100644 --- a/examples/core_nodep_static/CMakeLists.txt +++ b/examples/core_nodep_static/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-core_no_deps_static VERSION 0.1.0) +project(gz-core_no_deps_static VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) ign_configure_project() OPTION(BUILD_SHARED_LIBS OFF) diff --git a/examples/core_static_child/CMakeLists.txt b/examples/core_static_child/CMakeLists.txt index 92758ed4..7fa33335 100644 --- a/examples/core_static_child/CMakeLists.txt +++ b/examples/core_static_child/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-core_static_child VERSION 0.1.0) +project(gz-core_static_child VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) ign_configure_project() -ign_find_package(ignition-core_no_deps_static REQUIRED) +ign_find_package(gz-core_no_deps_static REQUIRED) ign_configure_build(QUIT_IF_BUILD_ERRORS) ign_create_packages() -ign_create_docs(TAGFILES "${IGNITION-CORE_NO_DEPS_STATIC_DOXYGEN_TAGFILE} = ${IGNITION-CORE_NO_DEPS_STATIC_API_URL}") +ign_create_docs(TAGFILES "${GZ-CORE_NO_DEPS_STATIC_DOXYGEN_TAGFILE} = ${GZ-CORE_NO_DEPS_STATIC_API_URL}") diff --git a/examples/core_static_child/src/CMakeLists.txt b/examples/core_static_child/src/CMakeLists.txt index 400f4ecd..10104e34 100644 --- a/examples/core_static_child/src/CMakeLists.txt +++ b/examples/core_static_child/src/CMakeLists.txt @@ -2,5 +2,5 @@ ign_get_libsources_and_unittests(sources gtest_sources) ign_create_core_library(SOURCES ${sources} CXX_STANDARD 11) target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC - ignition-core_no_deps_static::ignition-core_no_deps_static) + gz-core_no_deps_static::gz-core_no_deps_static) ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}) diff --git a/examples/find_ogre2/ogre-2.1/CMakeLists.txt b/examples/find_ogre2/ogre-2.1/CMakeLists.txt index a465a5cf..0ba25292 100644 --- a/examples/find_ogre2/ogre-2.1/CMakeLists.txt +++ b/examples/find_ogre2/ogre-2.1/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-ogre-2.1 VERSION 0.1.0) +project(gz-ogre-2.1 VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) diff --git a/examples/find_ogre2/ogre-2.2/CMakeLists.txt b/examples/find_ogre2/ogre-2.2/CMakeLists.txt index 7e1044eb..57da6219 100644 --- a/examples/find_ogre2/ogre-2.2/CMakeLists.txt +++ b/examples/find_ogre2/ogre-2.2/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-ogre-2.2 VERSION 0.1.0) +project(gz-ogre-2.2 VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) diff --git a/examples/ign_conf/CMakeLists.txt b/examples/ign_conf/CMakeLists.txt index b39e8d44..02722de2 100644 --- a/examples/ign_conf/CMakeLists.txt +++ b/examples/ign_conf/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-minimal0 VERSION 0.1.0) +project(gz-minimal0 VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) ign_configure_project() ign_configure_build(QUIT_IF_BUILD_ERRORS) diff --git a/examples/prerelease/CMakeLists.txt b/examples/prerelease/CMakeLists.txt index a4649eea..d376f980 100644 --- a/examples/prerelease/CMakeLists.txt +++ b/examples/prerelease/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-minimal1 VERSION 1.0.0) +project(gz-minimal1 VERSION 1.0.0) find_package(ignition-cmake3 REQUIRED) ign_configure_project(VERSION_SUFFIX pre1) ign_configure_build(QUIT_IF_BUILD_ERRORS) diff --git a/examples/sanitizers/CMakeLists.txt b/examples/sanitizers/CMakeLists.txt index 22e9cab4..0ade8e8c 100644 --- a/examples/sanitizers/CMakeLists.txt +++ b/examples/sanitizers/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-sanitizers VERSION 0.1.0) +project(gz-sanitizers VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) ign_configure_project() ign_configure_build(QUIT_IF_BUILD_ERRORS) diff --git a/examples/test_core_child_requires_core_no_deps.bash b/examples/test_core_child_requires_core_no_deps.bash index 9febf845..810dfcb1 100755 --- a/examples/test_core_child_requires_core_no_deps.bash +++ b/examples/test_core_child_requires_core_no_deps.bash @@ -2,40 +2,40 @@ TEST_STATUS=0 echo -echo Expect ignition-core_child to require ignition-core_no_deps -pkg-config ignition-core_child --print-requires -if ! pkg-config ignition-core_child --print-requires \ - | grep ignition-core_no_deps +echo Expect gz-core_child to require gz-core_no_deps +pkg-config gz-core_child --print-requires +if ! pkg-config gz-core_child --print-requires \ + | grep gz-core_no_deps then echo oops TEST_STATUS=1 fi echo -echo Expect ignition-core_child to not privately require ignition-core_no_deps -pkg-config ignition-core_child --print-requires-private -if pkg-config ignition-core_child --print-requires-private \ - | grep ignition-core_no_deps +echo Expect gz-core_child to not privately require gz-core_no_deps +pkg-config gz-core_child --print-requires-private +if pkg-config gz-core_child --print-requires-private \ + | grep gz-core_no_deps then echo oops TEST_STATUS=1 fi echo -echo Expect ignition-core_child_private to privately require ignition-core_no_deps -pkg-config ignition-core_child_private --print-requires-private -if ! pkg-config ignition-core_child_private --print-requires-private \ - | grep ignition-core_no_deps +echo Expect gz-core_child_private to privately require gz-core_no_deps +pkg-config gz-core_child_private --print-requires-private +if ! pkg-config gz-core_child_private --print-requires-private \ + | grep gz-core_no_deps then echo oops TEST_STATUS=1 fi echo -echo Expect ignition-core_child_private to not require ignition-core_no_deps -pkg-config ignition-core_child_private --print-requires -if pkg-config ignition-core_child_private --print-requires \ - | grep ignition-core_no_deps +echo Expect gz-core_child_private to not require gz-core_no_deps +pkg-config gz-core_child_private --print-requires +if pkg-config gz-core_child_private --print-requires \ + | grep gz-core_no_deps then echo oops TEST_STATUS=1 @@ -44,11 +44,11 @@ fi echo if [[ $TEST_STATUS -eq 0 ]] then - echo Successfully detected ignition-core_nodep requirements + echo Successfully detected gz-core_nodep requirements cp core_child_requires_core_nodep_pass.xml ../test_results/core_child_requires_core_nodep.xml exit 0 else - echo Could not detect all ignition-core_nodep requirements correctly + echo Could not detect all gz-core_nodep requirements correctly cp core_child_requires_core_nodep_fail.xml ../test_results/core_child_requires_core_nodep.xml exit 1 fi diff --git a/examples/use_component_depsA/CMakeLists.txt b/examples/use_component_depsA/CMakeLists.txt index fa2e397a..5f7d1f98 100644 --- a/examples/use_component_depsA/CMakeLists.txt +++ b/examples/use_component_depsA/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-use_component_depsA VERSION 0.1.0) +project(gz-use_component_depsA VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) ign_configure_project() -ign_find_package(ignition-component_deps REQUIRED COMPONENTS parent child) +ign_find_package(gz-component_deps REQUIRED COMPONENTS parent child) ign_configure_build(QUIT_IF_BUILD_ERRORS) ign_create_packages() ign_create_docs() diff --git a/examples/use_component_depsA/src/CMakeLists.txt b/examples/use_component_depsA/src/CMakeLists.txt index 1344fa3f..7e9873f1 100644 --- a/examples/use_component_depsA/src/CMakeLists.txt +++ b/examples/use_component_depsA/src/CMakeLists.txt @@ -2,5 +2,5 @@ ign_get_libsources_and_unittests(sources gtest_sources) ign_create_core_library(SOURCES ${sources} CXX_STANDARD 11) target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC - ignition-component_deps::ignition-component_deps-child) + gz-component_deps::gz-component_deps-child) ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}) diff --git a/examples/use_component_depsB/CMakeLists.txt b/examples/use_component_depsB/CMakeLists.txt index 09ffa782..312927e2 100644 --- a/examples/use_component_depsB/CMakeLists.txt +++ b/examples/use_component_depsB/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-use_component_depsB VERSION 0.1.0) +project(gz-use_component_depsB VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) ign_configure_project() -ign_find_package(ignition-component_deps REQUIRED COMPONENTS child parent) +ign_find_package(gz-component_deps REQUIRED COMPONENTS child parent) ign_configure_build(QUIT_IF_BUILD_ERRORS) ign_create_packages() ign_create_docs() diff --git a/examples/use_component_depsB/src/CMakeLists.txt b/examples/use_component_depsB/src/CMakeLists.txt index 1344fa3f..7e9873f1 100644 --- a/examples/use_component_depsB/src/CMakeLists.txt +++ b/examples/use_component_depsB/src/CMakeLists.txt @@ -2,5 +2,5 @@ ign_get_libsources_and_unittests(sources gtest_sources) ign_create_core_library(SOURCES ${sources} CXX_STANDARD 11) target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC - ignition-component_deps::ignition-component_deps-child) + gz-component_deps::gz-component_deps-child) ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}) diff --git a/examples/use_component_depsC/CMakeLists.txt b/examples/use_component_depsC/CMakeLists.txt index cbf897be..61962770 100644 --- a/examples/use_component_depsC/CMakeLists.txt +++ b/examples/use_component_depsC/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-use_component_depsC VERSION 0.1.0) +project(gz-use_component_depsC VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) ign_configure_project() -ign_find_package(ignition-component_deps REQUIRED COMPONENTS child) +ign_find_package(gz-component_deps REQUIRED COMPONENTS child) ign_configure_build(QUIT_IF_BUILD_ERRORS) ign_create_packages() ign_create_docs() diff --git a/examples/use_component_depsC/src/CMakeLists.txt b/examples/use_component_depsC/src/CMakeLists.txt index 1344fa3f..7e9873f1 100644 --- a/examples/use_component_depsC/src/CMakeLists.txt +++ b/examples/use_component_depsC/src/CMakeLists.txt @@ -2,5 +2,5 @@ ign_get_libsources_and_unittests(sources gtest_sources) ign_create_core_library(SOURCES ${sources} CXX_STANDARD 11) target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC - ignition-component_deps::ignition-component_deps-child) + gz-component_deps::gz-component_deps-child) ign_build_tests(TYPE UNIT SOURCES ${gtest_sources}) diff --git a/examples/use_config_ifp/CMakeLists.txt b/examples/use_config_ifp/CMakeLists.txt index 29cfee2f..5cb0afcf 100644 --- a/examples/use_config_ifp/CMakeLists.txt +++ b/examples/use_config_ifp/CMakeLists.txt @@ -1,17 +1,17 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(ignition-find_config VERSION 0.1.0) +project(gz-find_config VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/") -set(ignition-find_config_DIR "${CMAKE_SOURCE_DIR}/") -#ign_find_package(ignition-find_config) will search for Findignition-find_config.cmake before ignition-find_configConfig.cmake -ign_find_package(ignition-find_config) +set(gz-find_config_DIR "${CMAKE_SOURCE_DIR}/") +#ign_find_package(gz-find_config) will search for Findgz-find_config.cmake before gz-find_configConfig.cmake +ign_find_package(gz-find_config) if(CONFIG_TEST MATCHES "The package was found using MODULE mode") message(STATUS "The package was found using MODULE mode") else() message(SEND_ERROR "Couldn't find correct package in MODULE mode.\nign_find_package CONFIG test failed") endif() #After CONFIG arguemnt ign_find_package will skip MODULE mode and search for ignition-find_configConfig.cmake directly -ign_find_package(ignition-find_config CONFIG) +ign_find_package(gz-find_config CONFIG) if(CONFIG_TEST MATCHES "The package was found using CONFIG mode") message(STATUS "The package was found using CONFIG mode") else() diff --git a/examples/use_config_ifp/Findignition-find_config.cmake b/examples/use_config_ifp/Findgz-find_config.cmake similarity index 100% rename from examples/use_config_ifp/Findignition-find_config.cmake rename to examples/use_config_ifp/Findgz-find_config.cmake diff --git a/examples/use_config_ifp/ignition-find_configConfig.cmake b/examples/use_config_ifp/gz-find_configConfig.cmake similarity index 100% rename from examples/use_config_ifp/ignition-find_configConfig.cmake rename to examples/use_config_ifp/gz-find_configConfig.cmake