diff --git a/CMakeLists.txt b/CMakeLists.txt index 4da10b09..38b6559c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ list(APPEND CMAKE_MODULE_PATH "${IGNITION_CMAKE_DIR}") #-------------------------------------- # include the master IgnCMake module -include(IgnCMake) +include(GzCMake) #-------------------------------------- # Set up the project @@ -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) @@ -141,25 +141,53 @@ install( #============================================================================ # Install the files for this package #============================================================================ -set(ign_modules_install_dir "${gz_config_install_dir}/cmake${PROJECT_VERSION_MAJOR}") +set(gz_modules_install_dir "${gz_config_install_dir}/cmake${PROJECT_VERSION_MAJOR}") file(GLOB modules "cmake/*.cmake") file(GLOB templates "cmake/*.in") install( FILES ${modules} ${templates} - DESTINATION ${ign_modules_install_dir} + DESTINATION ${gz_modules_install_dir} COMPONENT modules) file(GLOB pkgconfig_templates "cmake/pkgconfig/*.in") install( FILES ${pkgconfig_templates} - DESTINATION ${ign_modules_install_dir}/pkgconfig + DESTINATION ${gz_modules_install_dir}/pkgconfig COMPONENT modules) message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") +# TODO(CH3): Deprecated. Remove on tock. +# Install symlinks for IgnPython and IgnBenchmark +set(tick_tocked_cmake_files + "GzPython.cmake" + "GzBenchmark.cmake") + +# TODO(CH3): Deprecated. Remove on tock. +# Install symlinks for IgnPython and IgnBenchmark +foreach(cmake_file ${tick_tocked_cmake_files}) + string(REGEX REPLACE "^Gz" "Ign" ign_cmake_file ${cmake_file}) + file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/cmake") + + if (WIN32) # Windows requires copy instead of symlink + install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E copy \ + ${CMAKE_INSTALL_PREFIX}\/${gz_modules_install_dir}\/${cmake_file} \ + ${PROJECT_BINARY_DIR}\/cmake/${ign_cmake_file})") + else() + install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \ + ${CMAKE_INSTALL_PREFIX}\/${gz_modules_install_dir}\/${cmake_file} \ + ${PROJECT_BINARY_DIR}\/cmake/${ign_cmake_file})") + endif() + + install( + FILES ${PROJECT_BINARY_DIR}/cmake/${ign_cmake_file} + DESTINATION ${gz_modules_install_dir} + COMPONENT modules) +endforeach() + include(CTest) if (BUILD_TESTING) add_subdirectory(test) @@ -203,7 +231,7 @@ set(CPPCHECK_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/examples ) set(IGNITION_CMAKE_CODECHECK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/codecheck") -include(IgnCodeCheck) +include(GzCodeCheck) _gz_setup_target_for_codecheck() # Docs diff --git a/Changelog.md b/Changelog.md index f16cdefe..d5c378ff 100644 --- a/Changelog.md +++ b/Changelog.md @@ -43,10 +43,10 @@ 1. doxygen allow all .cc, .hh, and CMakeLists.txt, not just in examples/ dir * [Pull request #198](https://github.com/gazebosim/gz-cmake/pull/198) -1. Add `LEGACY_PROJECT_PREFIX` parameter to `ign_create_core_library` +1. Add `LEGACY_PROJECT_PREFIX` parameter to `gz_create_core_library` * [Pull request #199](https://github.com/gazebosim/gz-cmake/pull/199) -1. Add `HIDE_SYMBOLS_BY_DEFAULT` parameter to `ign_configure_build` +1. Add `HIDE_SYMBOLS_BY_DEFAULT` parameter to `gz_configure_build` * [Pull request #196](https://github.com/gazebosim/gz-cmake/pull/196) 1. Add Ubuntu Jammy CI diff --git a/MigrationFromClassic.md b/MigrationFromClassic.md index a79f5724..ce63e385 100644 --- a/MigrationFromClassic.md +++ b/MigrationFromClassic.md @@ -377,7 +377,7 @@ writing a good quality find-module. In many cases, a package that we depend on will be distributed with a pkgconfig (`*.pc`) file. In such a case, `gz-cmake` provides a macro that can easily -find the package and create an imported target for it. Simply use `include(IgnPkgConfig)` +find the package and create an imported target for it. Simply use `include(GzPkgConfig)` and then `gz_pkg_check_modules(~)` in your find-module, and you are done. An example of a simple case of this can be found in `gz-cmake/cmake/FindGTS.cmake`. diff --git a/cmake/FindAVCODEC.cmake b/cmake/FindAVCODEC.cmake index f04fea88..3cfde81f 100644 --- a/cmake/FindAVCODEC.cmake +++ b/cmake/FindAVCODEC.cmake @@ -15,11 +15,11 @@ # ######################################## # Find avcodec -include(IgnPkgConfig) +include(GzPkgConfig) gz_pkg_check_modules_quiet(AVCODEC libavcodec) if(NOT AVCODEC_FOUND) - include(IgnManualSearch) + include(GzManualSearch) gz_manual_search(AVCODEC HEADER_NAMES "libavcodec/avcodec.h" LIBRARY_NAMES "avcodec") diff --git a/cmake/FindAVDEVICE.cmake b/cmake/FindAVDEVICE.cmake index 518a6df6..0f0f1038 100644 --- a/cmake/FindAVDEVICE.cmake +++ b/cmake/FindAVDEVICE.cmake @@ -19,11 +19,11 @@ set(av_major ${AVDEVICE_FIND_VERSION_MAJOR}) set(av_minor ${AVDEVICE_FIND_VERSION_MINOR}) set(av_patch ${AVDEVICE_FIND_VERSION_PATCH}) -include(IgnPkgConfig) +include(GzPkgConfig) gz_pkg_check_modules_quiet(AVDEVICE "libavdevice >= ${av_major}.${av_minor}.${av_patch}") if(NOT AVDEVICE_FOUND) - include(IgnManualSearch) + include(GzManualSearch) gz_manual_search(AVDEVICE HEADER_NAMES "libavdevice/avdevice.h" LIBRARY_NAMES "avdevice") diff --git a/cmake/FindAVFORMAT.cmake b/cmake/FindAVFORMAT.cmake index 6cca98b3..273d9e7e 100644 --- a/cmake/FindAVFORMAT.cmake +++ b/cmake/FindAVFORMAT.cmake @@ -15,11 +15,11 @@ # ######################################## # Find AV format -include(IgnPkgConfig) +include(GzPkgConfig) gz_pkg_check_modules_quiet(AVFORMAT libavformat) if(NOT AVFORMAT_FOUND) - include(IgnManualSearch) + include(GzManualSearch) gz_manual_search(AVFORMAT HEADER_NAMES "libavformat/avformat.h" LIBRARY_NAMES "avformat") diff --git a/cmake/FindAVUTIL.cmake b/cmake/FindAVUTIL.cmake index 4b34ae59..f0df6fdb 100644 --- a/cmake/FindAVUTIL.cmake +++ b/cmake/FindAVUTIL.cmake @@ -15,11 +15,11 @@ # ######################################## # Find avutil -include(IgnPkgConfig) +include(GzPkgConfig) gz_pkg_check_modules_quiet(AVUTIL libavutil) if(NOT AVUTIL_FOUND) - include(IgnManualSearch) + include(GzManualSearch) gz_manual_search(AVUTIL HEADER_NAMES "libavutil/avutil.h" LIBRARY_NAMES "avutil") diff --git a/cmake/FindCPPZMQ.cmake b/cmake/FindCPPZMQ.cmake index 9af839c5..12406621 100644 --- a/cmake/FindCPPZMQ.cmake +++ b/cmake/FindCPPZMQ.cmake @@ -50,7 +50,7 @@ endif() if(CPPZMQ_FOUND) - include(IgnImportTarget) + include(GzImportTarget) # Since this is a header-only library, we should import it as an INTERFACE # target. diff --git a/cmake/FindDL.cmake b/cmake/FindDL.cmake index a11c587e..94de8b66 100644 --- a/cmake/FindDL.cmake +++ b/cmake/FindDL.cmake @@ -85,7 +85,7 @@ else() mark_as_advanced(DL_LIBRARIES) if(DL_FOUND) - include(IgnImportTarget) + include(GzImportTarget) gz_import_target(DL) set(DL_TARGET DL::DL) endif() @@ -94,7 +94,7 @@ endif() # We need to manually specify the pkgconfig entry (and type of entry) for dl, # because gz_pkg_check_modules does not work for it. -include(IgnPkgConfig) +include(GzPkgConfig) gz_pkg_config_library_entry(DL dl) include(FindPackageHandleStandardArgs) diff --git a/cmake/FindFreeImage.cmake b/cmake/FindFreeImage.cmake index 0c40798d..8a5836e7 100644 --- a/cmake/FindFreeImage.cmake +++ b/cmake/FindFreeImage.cmake @@ -24,7 +24,7 @@ set(minor_version ${FreeImage_FIND_VERSION_MINOR}) set(full_version ${major_version}.${minor_version}) if (NOT WIN32) - include(IgnPkgConfig) + include(GzPkgConfig) gz_pkg_config_library_entry(FreeImage freeimage) # If we don't have PkgConfig, or if PkgConfig failed, then do a manual search @@ -87,7 +87,7 @@ if (NOT WIN32) if(FreeImage_FOUND) # Create the imported target for FreeImage if we found it - include(IgnImportTarget) + include(GzImportTarget) gz_import_target(FreeImage) endif() @@ -140,9 +140,9 @@ else() endif() if (FreeImage_FOUND) - include(IgnPkgConfig) + include(GzPkgConfig) gz_pkg_config_library_entry(FreeImage "FreeImage") - include(IgnImportTarget) + include(GzImportTarget) gz_import_target(FreeImage) endif() diff --git a/cmake/FindGTS.cmake b/cmake/FindGTS.cmake index a29f9659..b4004833 100644 --- a/cmake/FindGTS.cmake +++ b/cmake/FindGTS.cmake @@ -18,7 +18,7 @@ if (NOT WIN32) # Configuration using pkg-config modules - include(IgnPkgConfig) + include(GzPkgConfig) gz_pkg_check_modules(GTS gts) else() # true by default, change to false when a failure appears @@ -92,9 +92,9 @@ else() if (GTS_FOUND) # We need to manually specify the pkgconfig entry (and type of entry), # because gz_pkg_check_modules does not work for it. - include(IgnPkgConfig) + include(GzPkgConfig) gz_pkg_config_library_entry(GTS gts) - include(IgnImportTarget) + include(GzImportTarget) gz_import_target(GTS) endif() endif() diff --git a/cmake/FindGzCURL.cmake b/cmake/FindGzCURL.cmake index 37249741..90c1f2e2 100644 --- a/cmake/FindGzCURL.cmake +++ b/cmake/FindGzCURL.cmake @@ -58,7 +58,7 @@ if(${GzCURL_FOUND}) INTERFACE_LINK_LIBRARIES CURL::libcurl) endif() - include(IgnImportTarget) + include(GzImportTarget) if(NOT TARGET curl::curl) gz_import_target(curl @@ -66,7 +66,7 @@ if(${GzCURL_FOUND}) INCLUDE_VAR CURL_INCLUDE_DIRS) endif() - include(IgnPkgConfig) + include(GzPkgConfig) gz_pkg_config_entry(GzCURL "libcurl >= ${GzCURL_FIND_VERSION}") endif() diff --git a/cmake/FindGzOGRE.cmake b/cmake/FindGzOGRE.cmake index 8c01a682..237a3da3 100644 --- a/cmake/FindGzOGRE.cmake +++ b/cmake/FindGzOGRE.cmake @@ -259,7 +259,7 @@ if(OGRE_FOUND) list(APPEND OGRE_INCLUDE_DIRS ${dir_include}) endforeach() - include(IgnImportTarget) + include(GzImportTarget) gz_import_target(GzOGRE TARGET_NAME GzOGRE::GzOGRE LIB_VAR OGRE_LIBRARIES diff --git a/cmake/FindGzOGRE2.cmake b/cmake/FindGzOGRE2.cmake index 6272664a..fef9f052 100644 --- a/cmake/FindGzOGRE2.cmake +++ b/cmake/FindGzOGRE2.cmake @@ -261,7 +261,7 @@ if (NOT WIN32) set(OGRE2_VERSION "${OGRE2_VERSION_MAJOR}.${OGRE2_VERSION_MINOR}.${OGRE2_VERSION_PATCH}") # find ogre components - include(IgnImportTarget) + include(GzImportTarget) foreach(component ${GzOGRE2_FIND_COMPONENTS}) find_library(OGRE2-${component} NAMES @@ -339,7 +339,7 @@ if (NOT WIN32) # We need to manually specify the pkgconfig entry (and type of entry), # because gz_pkg_check_modules does not work for it. - include(IgnPkgConfig) + include(GzPkgConfig) gz_pkg_config_library_entry(GzOGRE2 OgreMain) else() #WIN32 diff --git a/cmake/FindGzProtobuf.cmake b/cmake/FindGzProtobuf.cmake index ff89a873..6b183830 100644 --- a/cmake/FindGzProtobuf.cmake +++ b/cmake/FindGzProtobuf.cmake @@ -23,7 +23,7 @@ # correctly imported. This is especially important on Windows in order to # support shared library versions of Protobuf. -include(IgnPkgConfig) +include(GzPkgConfig) gz_pkg_config_entry(GzProtobuf "protobuf >= ${GzProtobuf_FIND_VERSION}") find_package(Protobuf ${GzProtobuf_FIND_VERSION} QUIET CONFIG) @@ -82,7 +82,7 @@ if(${Protobuf_FOUND}) # Older versions of protobuf don't create imported targets, so we will create # them here if they have not been provided. - include(IgnImportTarget) + include(GzImportTarget) if(NOT TARGET protobuf::libprotobuf) gz_import_target(protobuf diff --git a/cmake/FindGzURDFDOM.cmake b/cmake/FindGzURDFDOM.cmake index 357b7bc5..c6fe13f1 100644 --- a/cmake/FindGzURDFDOM.cmake +++ b/cmake/FindGzURDFDOM.cmake @@ -16,7 +16,7 @@ # Prefer pkg-config over cmake if possible since version checking is not working # on urdfdom series from 1.x to 3.0.0 (at least) -include(IgnPkgConfig) +include(GzPkgConfig) if(PKG_CONFIG_FOUND) if (GzURDFDOM_FIND_VERSION) set(signature "urdfdom >= ${GzURDFDOM_FIND_VERSION}") diff --git a/cmake/FindIFADDRS.cmake b/cmake/FindIFADDRS.cmake index 7a4c4b2a..bf4ffe12 100644 --- a/cmake/FindIFADDRS.cmake +++ b/cmake/FindIFADDRS.cmake @@ -28,7 +28,7 @@ endif() if(IFADDRS_FOUND) - include(IgnImportTarget) + include(GzImportTarget) # Since this is a header-only library, we should import it as an INTERFACE # target. diff --git a/cmake/FindJSONCPP.cmake b/cmake/FindJSONCPP.cmake index aa80a976..2390b54e 100644 --- a/cmake/FindJSONCPP.cmake +++ b/cmake/FindJSONCPP.cmake @@ -33,7 +33,7 @@ if(JSONCPP_FIND_VERSION) else() find_package(jsoncpp CONFIG QUIET) set(JSONCPP_TARGET jsoncpp_lib) - include(IgnPkgConfig) + include(GzPkgConfig) if(JSONCPP_FOUND) gz_pkg_config_entry(JSONCPP jsoncpp) @@ -67,7 +67,7 @@ else() endif() if(JSONCPP_FOUND) - include(IgnImportTarget) + include(GzImportTarget) gz_import_target(JSONCPP) endif() endif() diff --git a/cmake/FindODE.cmake b/cmake/FindODE.cmake index 90efaa04..2984f2e5 100644 --- a/cmake/FindODE.cmake +++ b/cmake/FindODE.cmake @@ -54,7 +54,7 @@ if(ODE_FOUND) message(STATUS "Looking for Open Dynamics Engine - found") endif() - include(IgnImportTarget) + include(GzImportTarget) gz_import_target(ODE) if(NOT ODE_FIND_QUIETLY) diff --git a/cmake/FindOptiX.cmake b/cmake/FindOptiX.cmake index af1d1e7f..c33059b9 100644 --- a/cmake/FindOptiX.cmake +++ b/cmake/FindOptiX.cmake @@ -233,6 +233,6 @@ find_package_handle_standard_args( OptiX REQUIRED_VARS OptiX_FOUND) -include(IgnPkgConfig) +include(GzPkgConfig) gz_pkg_config_library_entry(OptiX OptiX) diff --git a/cmake/FindSWSCALE.cmake b/cmake/FindSWSCALE.cmake index da6f8c10..c63ef619 100644 --- a/cmake/FindSWSCALE.cmake +++ b/cmake/FindSWSCALE.cmake @@ -15,11 +15,11 @@ # ######################################## # Find libswscale format -include(IgnPkgConfig) +include(GzPkgConfig) gz_pkg_check_modules_quiet(SWSCALE libswscale) if(NOT SWSCALE_FOUND) - include(IgnManualSearch) + include(GzManualSearch) gz_manual_search(SWSCALE HEADER_NAMES "libswscale/swscale.h" LIBRARY_NAMES "swscale") diff --git a/cmake/FindTINYXML2.cmake b/cmake/FindTINYXML2.cmake index a20c028b..5a5a147c 100644 --- a/cmake/FindTINYXML2.cmake +++ b/cmake/FindTINYXML2.cmake @@ -16,7 +16,7 @@ ######################################## # Find tinyxml2. Only debian distributions package tinyxml with a pkg-config. -include(IgnPkgConfig) +include(GzPkgConfig) # Use pkg_check_modules to start gz_pkg_check_modules_quiet(TINYXML2 tinyxml2) @@ -53,7 +53,7 @@ if(NOT TINYXML2_FOUND) endif() if(TINYXML2_FOUND) - include(IgnImportTarget) + include(GzImportTarget) gz_import_target(TINYXML2) endif() diff --git a/cmake/FindUUID.cmake b/cmake/FindUUID.cmake index f1000001..63ea2c2c 100644 --- a/cmake/FindUUID.cmake +++ b/cmake/FindUUID.cmake @@ -17,11 +17,11 @@ # Find uuid if (UNIX) if(NOT APPLE) - include(IgnPkgConfig) + include(GzPkgConfig) gz_pkg_check_modules_quiet(UUID uuid) if(NOT UUID_FOUND) - include(IgnManualSearch) + include(GzManualSearch) gz_manual_search(UUID HEADER_NAMES "uuid.h" LIBRARY_NAMES "uuid libuuid" diff --git a/cmake/FindYAML.cmake b/cmake/FindYAML.cmake index 54950aa9..a23cddcf 100644 --- a/cmake/FindYAML.cmake +++ b/cmake/FindYAML.cmake @@ -51,7 +51,7 @@ if(YAML_FIND_VERSION AND NOT YAML_FIND_VERSION VERSION_EQUAL "0.1") message(WARNING "FindYAML only knows how to find version 0.1 " "but you requested version ${YAML_FIND_VERSION}.") else() - include(IgnPkgConfig) + include(GzPkgConfig) gz_pkg_check_modules_quiet(YAML yaml-0.1) # If that failed, then fall back to manual detection. @@ -80,7 +80,7 @@ else() endif() if(YAML_FOUND) - include(IgnImportTarget) + include(GzImportTarget) gz_import_target(YAML) message(STATUS "Assuming libyaml is static, defining YAML_DECLARE_STATIC") set_target_properties(YAML::YAML PROPERTIES diff --git a/cmake/FindZIP.cmake b/cmake/FindZIP.cmake index c12c4395..181bbbbf 100644 --- a/cmake/FindZIP.cmake +++ b/cmake/FindZIP.cmake @@ -26,7 +26,7 @@ # ZIP_INCLUDE_DIRS The location of ZIP headers # ZIP_LIBRARIES The ZIP libraries -include(IgnPkgConfig) +include(GzPkgConfig) gz_pkg_check_modules_quiet(ZIP libzip) # If that failed, then fall back to manual detection. @@ -55,7 +55,7 @@ if(NOT ZIP_FOUND) endif() if(ZIP_FOUND) - include(IgnImportTarget) + include(GzImportTarget) gz_import_target(ZIP) endif() endif() diff --git a/cmake/FindZeroMQ.cmake b/cmake/FindZeroMQ.cmake index e18eb1d0..a03e58bf 100644 --- a/cmake/FindZeroMQ.cmake +++ b/cmake/FindZeroMQ.cmake @@ -54,7 +54,7 @@ # ZeroMQ_LIBRARIES The ZeroMQ libraries # ZeroMQ_INCLUDE_DIRS The location of ZeroMQ headers -include(IgnPkgConfig) +include(GzPkgConfig) # We initialize this variable to the default target name set(ZeroMQ_TARGET ZeroMQ::ZeroMQ) diff --git a/cmake/IgnBenchmark.cmake b/cmake/GzBenchmark.cmake similarity index 98% rename from cmake/IgnBenchmark.cmake rename to cmake/GzBenchmark.cmake index d9da8f6e..0437adcc 100644 --- a/cmake/IgnBenchmark.cmake +++ b/cmake/GzBenchmark.cmake @@ -1,5 +1,5 @@ #.rst -# IgnBenchmark +# GzBenchmark # ------------ # # _gz_add_version_info_target() @@ -13,7 +13,7 @@ # # USAGE: # 1. Add the following line to your CMakeLists.txt -# include(IgnBenchmark) +# include(GzBenchmark) # # 2. Add the benchmark # gz_add_benchmarks(SOURCES ${benchmark_sources_list}) diff --git a/cmake/IgnCMake.cmake b/cmake/GzCMake.cmake similarity index 83% rename from cmake/IgnCMake.cmake rename to cmake/GzCMake.cmake index 9a88e2cb..171ec0bb 100644 --- a/cmake/IgnCMake.cmake +++ b/cmake/GzCMake.cmake @@ -1,5 +1,5 @@ #.rst -# IgnCMake +# GzCMake # -------- # # Includes a set of modules that are needed for building the ignition libraries @@ -22,15 +22,15 @@ #============================================================================ # gz-cmake modules #============================================================================ -include(IgnUtils) -include(IgnConfigureProject) -include(IgnPackaging) -include(IgnCreateDocs) -include(IgnSetCompilerFlags) -include(IgnConfigureBuild) -include(IgnImportTarget) -include(IgnPkgConfig) -include(IgnSanitizers) +include(GzUtils) +include(GzConfigureProject) +include(GzPackaging) +include(GzCreateDocs) +include(GzSetCompilerFlags) +include(GzConfigureBuild) +include(GzImportTarget) +include(GzPkgConfig) +include(GzSanitizers) #============================================================================ # Native cmake modules diff --git a/cmake/IgnCheckSSE.cmake b/cmake/GzCheckSSE.cmake similarity index 100% rename from cmake/IgnCheckSSE.cmake rename to cmake/GzCheckSSE.cmake diff --git a/cmake/IgnCodeCheck.cmake b/cmake/GzCodeCheck.cmake similarity index 98% rename from cmake/IgnCodeCheck.cmake rename to cmake/GzCodeCheck.cmake index 9b839a16..8e2878c1 100644 --- a/cmake/IgnCodeCheck.cmake +++ b/cmake/GzCodeCheck.cmake @@ -1,7 +1,7 @@ # Setup the codecheck target, which will run cppcheck and cppplint. # This function is private to gz-cmake. function(_gz_setup_target_for_codecheck) - include(IgnPython) + include(GzPython) find_program(CPPCHECK_PATH cppcheck) find_program(FIND_PATH find) diff --git a/cmake/IgnCodeCoverage.cmake b/cmake/GzCodeCoverage.cmake similarity index 99% rename from cmake/IgnCodeCoverage.cmake rename to cmake/GzCodeCoverage.cmake index 06cd2838..2174455c 100644 --- a/cmake/IgnCodeCoverage.cmake +++ b/cmake/GzCodeCoverage.cmake @@ -12,7 +12,7 @@ # # USAGE: # 1. Add the following line to your CMakeLists.txt: -# INCLUDE(IgnCodeCoverage) +# include(GzCodeCoverage) # # 2. Set compiler flags to turn off optimization and enable coverage: # SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage") diff --git a/cmake/IgnConfigureBuild.cmake b/cmake/GzConfigureBuild.cmake similarity index 99% rename from cmake/IgnConfigureBuild.cmake rename to cmake/GzConfigureBuild.cmake index 854caae9..85c79aa9 100644 --- a/cmake/IgnConfigureBuild.cmake +++ b/cmake/GzConfigureBuild.cmake @@ -1,5 +1,5 @@ #.rst -# IgnBuildProject +# GzBuildProject # ------------------- # # gz_configure_build() @@ -289,7 +289,7 @@ macro(gz_configure_build) #-------------------------------------- # Create codecheck target - include(IgnCodeCheck) + include(GzCodeCheck) _gz_setup_target_for_codecheck() #-------------------------------------- @@ -386,7 +386,7 @@ macro(_gz_parse_build_type) elseif("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "NONE") set(BUILD_TYPE_NONE TRUE) elseif("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "COVERAGE") - include(IgnCodeCoverage) + include(GzCodeCoverage) set(BUILD_TYPE_DEBUG TRUE) ign_setup_target_for_coverage( OUTPUT_NAME coverage diff --git a/cmake/IgnConfigureProject.cmake b/cmake/GzConfigureProject.cmake similarity index 99% rename from cmake/IgnConfigureProject.cmake rename to cmake/GzConfigureProject.cmake index 91e6df5e..f8ba1247 100644 --- a/cmake/IgnConfigureProject.cmake +++ b/cmake/GzConfigureProject.cmake @@ -1,5 +1,5 @@ #.rst -# IgnConfigureProject +# GzConfigureProject # ------------------- # # gz_configure_project([VERSION_SUFFIX
]) diff --git a/cmake/IgnCreateDocs.cmake b/cmake/GzCreateDocs.cmake similarity index 99% rename from cmake/IgnCreateDocs.cmake rename to cmake/GzCreateDocs.cmake index 593ba027..3e234233 100644 --- a/cmake/IgnCreateDocs.cmake +++ b/cmake/GzCreateDocs.cmake @@ -1,5 +1,5 @@ #.rst -# IgnCreatePackage +# GzCreatePackage # ---------------- # # gz_create_docs @@ -129,7 +129,7 @@ function(gz_create_docs) #-------------------------------------- # Create man pages - include(IgnRonn2Man) + include(GzRonn2Man) ign_add_manpage_target() set(IGNITION_DOXYGEN_API_MAINPAGE_MD ${gz_create_docs_API_MAINPAGE_MD}) diff --git a/cmake/IgnGenerateVersionInfo.cmake b/cmake/GzGenerateVersionInfo.cmake similarity index 99% rename from cmake/IgnGenerateVersionInfo.cmake rename to cmake/GzGenerateVersionInfo.cmake index 2047da59..06ecfd75 100644 --- a/cmake/IgnGenerateVersionInfo.cmake +++ b/cmake/GzGenerateVersionInfo.cmake @@ -1,5 +1,5 @@ #.rst -# IgnGenerateVersionInfo +# GzGenerateVersionInfo # ---------------------- # # Intended to be invoked as part of the _gz_add_version_info_target function diff --git a/cmake/IgnImportTarget.cmake b/cmake/GzImportTarget.cmake similarity index 100% rename from cmake/IgnImportTarget.cmake rename to cmake/GzImportTarget.cmake diff --git a/cmake/IgnManualSearch.cmake b/cmake/GzManualSearch.cmake similarity index 99% rename from cmake/IgnManualSearch.cmake rename to cmake/GzManualSearch.cmake index fe9dfe11..cecbc887 100644 --- a/cmake/IgnManualSearch.cmake +++ b/cmake/GzManualSearch.cmake @@ -107,7 +107,7 @@ macro(gz_manual_search package) endif() if(${package}_FOUND) - include(IgnImportTarget) + include(GzImportTarget) gz_import_target(${package} ${_gz_pkg_check_modules_interface_option} TARGET_NAME ${gz_pkg_check_modules_TARGET_NAME}) endif() diff --git a/cmake/IgnPackaging.cmake b/cmake/GzPackaging.cmake similarity index 95% rename from cmake/IgnPackaging.cmake rename to cmake/GzPackaging.cmake index 650391fd..e9c0e845 100644 --- a/cmake/IgnPackaging.cmake +++ b/cmake/GzPackaging.cmake @@ -1,5 +1,5 @@ #.rst -# IgnPackaging +# GzPackaging # ---------------- # # _gz_setup_packages @@ -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/IgnPkgConfig.cmake b/cmake/GzPkgConfig.cmake similarity index 99% rename from cmake/IgnPkgConfig.cmake rename to cmake/GzPkgConfig.cmake index 327c191e..f7d3758a 100644 --- a/cmake/IgnPkgConfig.cmake +++ b/cmake/GzPkgConfig.cmake @@ -181,7 +181,7 @@ macro(gz_pkg_check_modules_quiet package signature) "${${package}_LIBRARIES}" "${${package}_LIBRARY_DIRS}") - include(IgnImportTarget) + include(GzImportTarget) gz_import_target(${package} ${_gz_pkg_check_modules_interface_option} TARGET_NAME ${gz_pkg_check_modules_TARGET_NAME}) diff --git a/cmake/IgnPython.cmake b/cmake/GzPython.cmake similarity index 100% rename from cmake/IgnPython.cmake rename to cmake/GzPython.cmake diff --git a/cmake/IgnRonn2Man.cmake b/cmake/GzRonn2Man.cmake similarity index 100% rename from cmake/IgnRonn2Man.cmake rename to cmake/GzRonn2Man.cmake diff --git a/cmake/IgnSanitizers.cmake b/cmake/GzSanitizers.cmake similarity index 100% rename from cmake/IgnSanitizers.cmake rename to cmake/GzSanitizers.cmake diff --git a/cmake/IgnSetCompilerFlags.cmake b/cmake/GzSetCompilerFlags.cmake similarity index 99% rename from cmake/IgnSetCompilerFlags.cmake rename to cmake/GzSetCompilerFlags.cmake index 406394c9..4052c5fb 100644 --- a/cmake/IgnSetCompilerFlags.cmake +++ b/cmake/GzSetCompilerFlags.cmake @@ -1,5 +1,5 @@ #.rst -# IgnSetCompilerFlags +# GzSetCompilerFlags # ------------------- # # _gz_set_compiler_flags() @@ -250,7 +250,7 @@ endmacro() macro(_gz_set_sse_flags) message(STATUS "\n-- Searching for host SSE information") - include(IgnCheckSSE) + include(GzCheckSSE) if(SSE2_FOUND) add_compile_options(-msse -msse2) diff --git a/cmake/IgnUtils.cmake b/cmake/GzUtils.cmake similarity index 99% rename from cmake/IgnUtils.cmake rename to cmake/GzUtils.cmake index c0a02a9a..732b5ed9 100644 --- a/cmake/IgnUtils.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) @@ -1904,7 +1904,7 @@ macro(gz_build_tests) # Find the Python interpreter for running the # check_test_ran.py script - include(IgnPython) + include(GzPython) # Build all the tests foreach(target_name ${test_list}) diff --git a/cmake/ignition-all-config.cmake.in b/cmake/gz-all-config.cmake.in similarity index 100% rename from cmake/ignition-all-config.cmake.in rename to cmake/gz-all-config.cmake.in diff --git a/cmake/ignition-component-config.cmake.in b/cmake/gz-component-config.cmake.in similarity index 100% rename from cmake/ignition-component-config.cmake.in rename to cmake/gz-component-config.cmake.in diff --git a/cmake/ignition-config.cmake.in b/cmake/gz-config.cmake.in similarity index 100% rename from cmake/ignition-config.cmake.in rename to cmake/gz-config.cmake.in diff --git a/cmake/ign_auto_headers.hh.in b/cmake/gz_auto_headers.hh.in similarity index 93% rename from cmake/ign_auto_headers.hh.in rename to cmake/gz_auto_headers.hh.in index 9a64c883..20c91f44 100644 --- a/cmake/ign_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/cmake/pkgconfig/ignition-component.pc.in b/cmake/pkgconfig/gz-component.pc.in similarity index 100% rename from cmake/pkgconfig/ignition-component.pc.in rename to cmake/pkgconfig/gz-component.pc.in diff --git a/cmake/pkgconfig/ignition.pc.in b/cmake/pkgconfig/gz.pc.in similarity index 100% rename from cmake/pkgconfig/ignition.pc.in rename to cmake/pkgconfig/gz.pc.in diff --git a/config/ignition-cmake-config.cmake.in b/config/gz-cmake-config.cmake.in similarity index 99% rename from config/ignition-cmake-config.cmake.in rename to config/gz-cmake-config.cmake.in index 1d5120a9..48ce9e56 100644 --- a/config/ignition-cmake-config.cmake.in +++ b/config/gz-cmake-config.cmake.in @@ -61,7 +61,7 @@ if( NOT IGNITION_CMAKE_VERSION_MAJOR #-------------------------------------- # include the master IgnCMake module - include(IgnCMake) + include(GzCMake) set(IGNITION_CMAKE_DOXYGEN_DIR "@PACKAGE_IGN_DATA_INSTALL_DIR@/doxygen") set(IGNITION_CMAKE_CODECHECK_DIR "@PACKAGE_IGN_DATA_INSTALL_DIR@/codecheck") diff --git a/config/ignition-cmake.pc.in b/config/gz-cmake.pc.in similarity index 100% rename from config/ignition-cmake.pc.in rename to config/gz-cmake.pc.in diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 33117584..26f8bf3a 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -9,8 +9,8 @@ if (NOT WIN32 AND EXAMPLE_LCOV_PATH) endif() set(example_directories - ign_conf - no_ignition_prefix + gz_conf + no_gz_prefix prerelease core_nodep core_nodep_static @@ -30,10 +30,10 @@ endif() foreach(example ${example_directories}) set(run_codecheck false) - if (${example} STREQUAL "ign_conf") + if (${example} STREQUAL "gz_conf") 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 "no_gz_prefix") + set(example_tarball_name no_gz_prefix-0.1.0.tar.bz2) elseif (${example} STREQUAL "prerelease") set(example_tarball_name gz-minimal-1.0.0~pre1.tar.bz2) elseif (${example} STREQUAL "core_nodep") diff --git a/examples/comp_deps/CMakeLists.txt b/examples/comp_deps/CMakeLists.txt index 43f3fd69..ece4841d 100644 --- a/examples/comp_deps/CMakeLists.txt +++ b/examples/comp_deps/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) project(gz-component_deps VERSION 0.1.0) find_package(gz-cmake3 REQUIRED) -gz_configure_project() +gz_configure_project( + REPLACE_IGNITION_INCLUDE_PATH gz/component_deps +) gz_configure_build(QUIT_IF_BUILD_ERRORS COMPONENTS child parent) gz_create_packages() diff --git a/examples/comp_deps/src/AlmostEmpty.cc b/examples/comp_deps/src/AlmostEmpty.cc index e0dcd04a..373828ab 100644 --- a/examples/comp_deps/src/AlmostEmpty.cc +++ b/examples/comp_deps/src/AlmostEmpty.cc @@ -15,7 +15,7 @@ * */ -#include+#include namespace gz { diff --git a/examples/core_nodep/CMakeLists.txt b/examples/core_nodep/CMakeLists.txt index 126f66cf..9f4a03da 100644 --- a/examples/core_nodep/CMakeLists.txt +++ b/examples/core_nodep/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) project(gz-core_no_deps VERSION 0.1.0) find_package(gz-cmake3 REQUIRED) -gz_configure_project() +gz_configure_project( + REPLACE_IGNITION_INCLUDE_PATH gz/core_no_deps +) gz_configure_build(QUIT_IF_BUILD_ERRORS) gz_create_packages() gz_create_docs() diff --git a/examples/core_nodep/src/AlmostEmpty.cc b/examples/core_nodep/src/AlmostEmpty.cc index 9d3142b0..c1d058dd 100644 --- a/examples/core_nodep/src/AlmostEmpty.cc +++ b/examples/core_nodep/src/AlmostEmpty.cc @@ -15,7 +15,7 @@ * */ -#include +#include namespace gz { diff --git a/examples/core_nodep_static/CMakeLists.txt b/examples/core_nodep_static/CMakeLists.txt index c2729ee0..56b1e146 100644 --- a/examples/core_nodep_static/CMakeLists.txt +++ b/examples/core_nodep_static/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) project(gz-core_no_deps_static VERSION 0.1.0) find_package(gz-cmake3 REQUIRED) -gz_configure_project() +gz_configure_project( + REPLACE_IGNITION_INCLUDE_PATH gz/core_no_deps_static +) OPTION(BUILD_SHARED_LIBS OFF) gz_configure_build(QUIT_IF_BUILD_ERRORS) gz_create_packages() diff --git a/examples/core_nodep_static/src/AlmostEmpty.cc b/examples/core_nodep_static/src/AlmostEmpty.cc index ab3bd135..0f907a27 100644 --- a/examples/core_nodep_static/src/AlmostEmpty.cc +++ b/examples/core_nodep_static/src/AlmostEmpty.cc @@ -15,7 +15,7 @@ * */ -#include +#include namespace gz { 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/examples/ign_conf/CMakeLists.txt b/examples/gz_conf/CMakeLists.txt similarity index 100% rename from examples/ign_conf/CMakeLists.txt rename to examples/gz_conf/CMakeLists.txt diff --git a/examples/ign_conf/README.md b/examples/gz_conf/README.md similarity index 100% rename from examples/ign_conf/README.md rename to examples/gz_conf/README.md diff --git a/examples/ign_conf/include/CMakeLists.txt b/examples/gz_conf/include/CMakeLists.txt similarity index 100% rename from examples/ign_conf/include/CMakeLists.txt rename to examples/gz_conf/include/CMakeLists.txt diff --git a/examples/ign_conf/src/CMakeLists.txt b/examples/gz_conf/src/CMakeLists.txt similarity index 100% rename from examples/ign_conf/src/CMakeLists.txt rename to examples/gz_conf/src/CMakeLists.txt diff --git a/examples/ign_conf/test/CMakeLists.txt b/examples/gz_conf/test/CMakeLists.txt similarity index 100% rename from examples/ign_conf/test/CMakeLists.txt rename to examples/gz_conf/test/CMakeLists.txt diff --git a/examples/no_ignition_prefix/CMakeLists.txt b/examples/no_gz_prefix/CMakeLists.txt similarity index 71% rename from examples/no_ignition_prefix/CMakeLists.txt rename to examples/no_gz_prefix/CMakeLists.txt index 42ca3489..604a2a21 100644 --- a/examples/no_ignition_prefix/CMakeLists.txt +++ b/examples/no_gz_prefix/CMakeLists.txt @@ -1,9 +1,9 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) -project(no_ignition_prefix VERSION 0.1.0) +project(no_gz_prefix VERSION 0.1.0) find_package(gz-cmake3 REQUIRED) gz_configure_project( NO_IGNITION_PREFIX - REPLACE_IGNITION_INCLUDE_PATH no_ign) + REPLACE_IGNITION_INCLUDE_PATH no_gz) gz_configure_build(QUIT_IF_BUILD_ERRORS) gz_create_packages() gz_create_docs() diff --git a/examples/no_ignition_prefix/README.md b/examples/no_gz_prefix/README.md similarity index 56% rename from examples/no_ignition_prefix/README.md rename to examples/no_gz_prefix/README.md index e1d59f7f..fe1fba2b 100644 --- a/examples/no_ignition_prefix/README.md +++ b/examples/no_gz_prefix/README.md @@ -3,10 +3,10 @@ ## Configuring project name This package uses the `NO_IGNITION_PREFIX` option in `gz_configure_project` -to allow a cmake package name without the `ignition-` prefix. +to allow a cmake package name without the `gz-` prefix. To confirm, configure this package and `package_source` and then observe that the tarball, -pkg-config `.pc` file, and cmake config files omit the `ignition-` prefix: +pkg-config `.pc` file, and cmake config files omit the `gz-` prefix: ~~~ mkdir build @@ -15,16 +15,16 @@ cmake .. make package_source ~~~ -* `no_ignition_prefix-0.1.0.tar.bz2` -* `cmake/no_ignition_prefix-config.cmake` -* `cmake/pkgconfig/no_ignition_prefix.pc` +* `no_gz_prefix-0.1.0.tar.bz2` +* `cmake/no_gz_prefix-config.cmake` +* `cmake/pkgconfig/no_gz_prefix.pc` ## Configuring include directory names This package uses the `REPLACE_IGNITION_INCLUDE_PATH` option in `gz_configure_project` -to allow a custom include path of `no_ign`, which doesn't start with `ignition/`. +to allow a custom include path of `no_gz`, which doesn't start with `ignition/`. To confirm, build the package and observe that `AlmostEmpty.cc` -compiles successfully while including `no_ign/Export.hh`: +compiles successfully while including `no_gz/Export.hh`: ~~~ mkdir build diff --git a/examples/no_gz_prefix/include/CMakeLists.txt b/examples/no_gz_prefix/include/CMakeLists.txt new file mode 100644 index 00000000..f9a34131 --- /dev/null +++ b/examples/no_gz_prefix/include/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(no_gz) diff --git a/examples/no_ignition_prefix/include/no_ign/CMakeLists.txt b/examples/no_gz_prefix/include/no_gz/CMakeLists.txt similarity index 100% rename from examples/no_ignition_prefix/include/no_ign/CMakeLists.txt rename to examples/no_gz_prefix/include/no_gz/CMakeLists.txt diff --git a/examples/no_ignition_prefix/include/no_ign/config.hh.in b/examples/no_gz_prefix/include/no_gz/config.hh.in similarity index 100% rename from examples/no_ignition_prefix/include/no_ign/config.hh.in rename to examples/no_gz_prefix/include/no_gz/config.hh.in diff --git a/examples/no_ignition_prefix/src/AlmostEmpty.cc b/examples/no_gz_prefix/src/AlmostEmpty.cc similarity index 79% rename from examples/no_ignition_prefix/src/AlmostEmpty.cc rename to examples/no_gz_prefix/src/AlmostEmpty.cc index 3cb1c076..053e05d2 100644 --- a/examples/no_ignition_prefix/src/AlmostEmpty.cc +++ b/examples/no_gz_prefix/src/AlmostEmpty.cc @@ -15,13 +15,13 @@ * */ -#include -#include -#include +#include +#include +#include -namespace no_ignition_prefix +namespace no_gz_prefix { - class GZ_NO_IGNITION_PREFIX_VISIBLE AlmostEmpty + class GZ_NO_GZ_PREFIX_VISIBLE AlmostEmpty { }; } diff --git a/examples/no_ignition_prefix/src/CMakeLists.txt b/examples/no_gz_prefix/src/CMakeLists.txt similarity index 100% rename from examples/no_ignition_prefix/src/CMakeLists.txt rename to examples/no_gz_prefix/src/CMakeLists.txt diff --git a/examples/no_ignition_prefix/test/CMakeLists.txt b/examples/no_gz_prefix/test/CMakeLists.txt similarity index 100% rename from examples/no_ignition_prefix/test/CMakeLists.txt rename to examples/no_gz_prefix/test/CMakeLists.txt diff --git a/examples/no_ignition_prefix/include/CMakeLists.txt b/examples/no_ignition_prefix/include/CMakeLists.txt deleted file mode 100644 index 118eec0f..00000000 --- a/examples/no_ignition_prefix/include/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(no_ign) 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 diff --git a/tutorials/developing_with_ign-cmake.md b/tutorials/developing_with_gz-cmake.md similarity index 100% rename from tutorials/developing_with_ign-cmake.md rename to tutorials/developing_with_gz-cmake.md diff --git a/tutorials/ign_cmake_sanitizers.md b/tutorials/gz_cmake_sanitizers.md similarity index 100% rename from tutorials/ign_cmake_sanitizers.md rename to tutorials/gz_cmake_sanitizers.md