diff --git a/cmake/FindAVCODEC.cmake b/cmake/FindAVCODEC.cmake index af5de5f6..785729f4 100644 --- a/cmake/FindAVCODEC.cmake +++ b/cmake/FindAVCODEC.cmake @@ -16,7 +16,7 @@ ######################################## # Find avcodec include(IgnPkgConfig) -ign_pkg_check_modules_quiet(AVCODEC libavcodec) +gz_pkg_check_modules_quiet(AVCODEC libavcodec) if(NOT AVCODEC_FOUND) include(IgnManualSearch) diff --git a/cmake/FindAVDEVICE.cmake b/cmake/FindAVDEVICE.cmake index 7ea9f60b..653ff112 100644 --- a/cmake/FindAVDEVICE.cmake +++ b/cmake/FindAVDEVICE.cmake @@ -20,7 +20,7 @@ set(av_minor ${AVDEVICE_FIND_VERSION_MINOR}) set(av_patch ${AVDEVICE_FIND_VERSION_PATCH}) include(IgnPkgConfig) -ign_pkg_check_modules_quiet(AVDEVICE "libavdevice >= ${av_major}.${av_minor}.${av_patch}") +gz_pkg_check_modules_quiet(AVDEVICE "libavdevice >= ${av_major}.${av_minor}.${av_patch}") if(NOT AVDEVICE_FOUND) include(IgnManualSearch) diff --git a/cmake/FindAVFORMAT.cmake b/cmake/FindAVFORMAT.cmake index 50593655..811949dc 100644 --- a/cmake/FindAVFORMAT.cmake +++ b/cmake/FindAVFORMAT.cmake @@ -16,7 +16,7 @@ ######################################## # Find AV format include(IgnPkgConfig) -ign_pkg_check_modules_quiet(AVFORMAT libavformat) +gz_pkg_check_modules_quiet(AVFORMAT libavformat) if(NOT AVFORMAT_FOUND) include(IgnManualSearch) diff --git a/cmake/FindAVUTIL.cmake b/cmake/FindAVUTIL.cmake index 7c96df54..5f1931f5 100644 --- a/cmake/FindAVUTIL.cmake +++ b/cmake/FindAVUTIL.cmake @@ -16,7 +16,7 @@ ######################################## # Find avutil include(IgnPkgConfig) -ign_pkg_check_modules_quiet(AVUTIL libavutil) +gz_pkg_check_modules_quiet(AVUTIL libavutil) if(NOT AVUTIL_FOUND) include(IgnManualSearch) diff --git a/cmake/FindCPPZMQ.cmake b/cmake/FindCPPZMQ.cmake index a0f1fafe..9af839c5 100644 --- a/cmake/FindCPPZMQ.cmake +++ b/cmake/FindCPPZMQ.cmake @@ -54,7 +54,7 @@ if(CPPZMQ_FOUND) # Since this is a header-only library, we should import it as an INTERFACE # target. - ign_import_target(CPPZMQ INTERFACE) + gz_import_target(CPPZMQ INTERFACE) # Now, to use the CPPZMQ headers, you should call # target_link_libraries( CPPZMQ::CPPZMQ) instead of using diff --git a/cmake/FindDL.cmake b/cmake/FindDL.cmake index 0f127fe5..a11c587e 100644 --- a/cmake/FindDL.cmake +++ b/cmake/FindDL.cmake @@ -86,16 +86,16 @@ else() if(DL_FOUND) include(IgnImportTarget) - ign_import_target(DL) + gz_import_target(DL) set(DL_TARGET DL::DL) endif() endif() # We need to manually specify the pkgconfig entry (and type of entry) for dl, -# because ign_pkg_check_modules does not work for it. +# because gz_pkg_check_modules does not work for it. include(IgnPkgConfig) -ign_pkg_config_library_entry(DL dl) +gz_pkg_config_library_entry(DL dl) include(FindPackageHandleStandardArgs) find_package_handle_standard_args( diff --git a/cmake/FindEIGEN3.cmake b/cmake/FindEIGEN3.cmake index 0f063bf5..4ca66759 100644 --- a/cmake/FindEIGEN3.cmake +++ b/cmake/FindEIGEN3.cmake @@ -32,13 +32,13 @@ if(EIGEN3_FOUND) # Attempt to create an imported target in case we're using an old version # of Eigen. (This function skip creating the imported target if it already # exists). - ign_import_target(EIGEN3 INTERFACE + gz_import_target(EIGEN3 INTERFACE TARGET_NAME Eigen3::Eigen) if(EIGEN3_FIND_VERSION) - ign_pkg_config_entry(EIGEN3 "eigen3 >= ${EIGEN3_FIND_VERSION}") + gz_pkg_config_entry(EIGEN3 "eigen3 >= ${EIGEN3_FIND_VERSION}") else() - ign_pkg_config_entry(EIGEN3 "eigen3") + gz_pkg_config_entry(EIGEN3 "eigen3") endif() return() @@ -46,11 +46,11 @@ if(EIGEN3_FOUND) endif() if(EIGEN3_FIND_VERSION) - ign_pkg_check_modules_quiet(EIGEN3 "eigen3 >= ${EIGEN3_FIND_VERSION}" + gz_pkg_check_modules_quiet(EIGEN3 "eigen3 >= ${EIGEN3_FIND_VERSION}" INTERFACE TARGET_NAME Eigen3::Eigen) else() - ign_pkg_check_modules_quiet(EIGEN3 "eigen3" + gz_pkg_check_modules_quiet(EIGEN3 "eigen3" INTERFACE TARGET_NAME Eigen3::Eigen) endif() @@ -68,7 +68,7 @@ if(MSVC) endif() endif() - ign_import_target(EIGEN3 INTERFACE + gz_import_target(EIGEN3 INTERFACE TARGET_NAME Eigen3::Eigen) endif() diff --git a/cmake/FindFreeImage.cmake b/cmake/FindFreeImage.cmake index 891e7552..0c40798d 100644 --- a/cmake/FindFreeImage.cmake +++ b/cmake/FindFreeImage.cmake @@ -25,7 +25,7 @@ set(full_version ${major_version}.${minor_version}) if (NOT WIN32) include(IgnPkgConfig) - ign_pkg_config_library_entry(FreeImage freeimage) + gz_pkg_config_library_entry(FreeImage freeimage) # If we don't have PkgConfig, or if PkgConfig failed, then do a manual search if(NOT FreeImage_FOUND) @@ -88,7 +88,7 @@ if (NOT WIN32) if(FreeImage_FOUND) # Create the imported target for FreeImage if we found it include(IgnImportTarget) - ign_import_target(FreeImage) + gz_import_target(FreeImage) endif() include(FindPackageHandleStandardArgs) @@ -141,9 +141,9 @@ else() if (FreeImage_FOUND) include(IgnPkgConfig) - ign_pkg_config_library_entry(FreeImage "FreeImage") + gz_pkg_config_library_entry(FreeImage "FreeImage") include(IgnImportTarget) - ign_import_target(FreeImage) + gz_import_target(FreeImage) endif() endif() diff --git a/cmake/FindGTS.cmake b/cmake/FindGTS.cmake index ea319203..a29f9659 100644 --- a/cmake/FindGTS.cmake +++ b/cmake/FindGTS.cmake @@ -19,7 +19,7 @@ if (NOT WIN32) # Configuration using pkg-config modules include(IgnPkgConfig) - ign_pkg_check_modules(GTS gts) + gz_pkg_check_modules(GTS gts) else() # true by default, change to false when a failure appears set(GTS_FOUND true) @@ -91,10 +91,10 @@ else() if (GTS_FOUND) # We need to manually specify the pkgconfig entry (and type of entry), - # because ign_pkg_check_modules does not work for it. + # because gz_pkg_check_modules does not work for it. include(IgnPkgConfig) - ign_pkg_config_library_entry(GTS gts) + gz_pkg_config_library_entry(GTS gts) include(IgnImportTarget) - ign_import_target(GTS) + gz_import_target(GTS) endif() endif() diff --git a/cmake/FindIFADDRS.cmake b/cmake/FindIFADDRS.cmake index 7fd33f3b..7a4c4b2a 100644 --- a/cmake/FindIFADDRS.cmake +++ b/cmake/FindIFADDRS.cmake @@ -32,7 +32,7 @@ if(IFADDRS_FOUND) # Since this is a header-only library, we should import it as an INTERFACE # target. - ign_import_target(IFADDRS INTERFACE) + gz_import_target(IFADDRS INTERFACE) endif() diff --git a/cmake/FindIgnBullet.cmake b/cmake/FindIgnBullet.cmake index 931a96fe..6a755316 100644 --- a/cmake/FindIgnBullet.cmake +++ b/cmake/FindIgnBullet.cmake @@ -38,7 +38,7 @@ set(IgnBullet_FOUND false) if(BULLET_FOUND) set(IgnBullet_FOUND true) - ign_import_target(IgnBullet + gz_import_target(IgnBullet TARGET_NAME IgnBullet::IgnBullet LIB_VAR BULLET_LIBRARIES INCLUDE_VAR BULLET_INCLUDE_DIRS diff --git a/cmake/FindIgnCURL.cmake b/cmake/FindIgnCURL.cmake index a2cf0337..4cd2b96e 100644 --- a/cmake/FindIgnCURL.cmake +++ b/cmake/FindIgnCURL.cmake @@ -55,12 +55,12 @@ if(${IgnCURL_FOUND}) include(IgnImportTarget) if(NOT TARGET curl::curl) - ign_import_target(curl + gz_import_target(curl LIB_VAR CURL_LIBRARIES INCLUDE_VAR CURL_INCLUDE_DIRS) endif() include(IgnPkgConfig) - ign_pkg_config_entry(IgnCURL "libcurl >= ${IgnCURL_FIND_VERSION}") + gz_pkg_config_entry(IgnCURL "libcurl >= ${IgnCURL_FIND_VERSION}") endif() diff --git a/cmake/FindIgnOGRE.cmake b/cmake/FindIgnOGRE.cmake index 27841209..572ad38f 100644 --- a/cmake/FindIgnOGRE.cmake +++ b/cmake/FindIgnOGRE.cmake @@ -20,7 +20,7 @@ # # Usage of this module as follows: # -# ign_find_package(IgnOGRE) +# gz_find_package(IgnOGRE) # # Variables defined by this module: # @@ -41,7 +41,7 @@ # # Example usage: # -# ign_find_package(IgnOGRE +# gz_find_package(IgnOGRE # VERSION 1.8.0 # COMPONENTS RTShaderSystem Terrain Overlay) @@ -92,7 +92,7 @@ if (NOT WIN32) set(OGRE_LIBRARY_DIRS "") set(OGRE_LIBRARIES "") set(ENV{PKG_CONFIG_PATH} ${pkg_path}) - ign_pkg_check_modules_quiet(OGRE "OGRE >= ${full_version}" + gz_pkg_check_modules_quiet(OGRE "OGRE >= ${full_version}" NO_CMAKE_ENVIRONMENT_PATH QUIET) if (OGRE_FOUND) @@ -140,7 +140,7 @@ if (NOT WIN32) # find ogre components foreach(component ${IgnOGRE_FIND_COMPONENTS}) - ign_pkg_check_modules_quiet(IgnOGRE-${component} "OGRE-${component} >= ${full_version}" NO_CMAKE_ENVIRONMENT_PATH) + gz_pkg_check_modules_quiet(IgnOGRE-${component} "OGRE-${component} >= ${full_version}" NO_CMAKE_ENVIRONMENT_PATH) if(IgnOGRE-${component}_FOUND) list(APPEND OGRE_LIBRARIES IgnOGRE-${component}::IgnOGRE-${component}) elseif(IgnOGRE_FIND_REQUIRED_${component}) @@ -158,7 +158,7 @@ if (NOT WIN32) set(OGRE_PLUGINDIR ${_pkgconfig_invoke_result}) endif() - ign_pkg_config_library_entry(IgnOGRE OgreMain) + gz_pkg_config_library_entry(IgnOGRE OgreMain) set(OGRE_RESOURCE_PATH ${OGRE_PLUGINDIR}) # Seems that OGRE_PLUGINDIR can end in a newline, which will cause problems @@ -260,7 +260,7 @@ if(OGRE_FOUND) endforeach() include(IgnImportTarget) - ign_import_target(IgnOGRE + gz_import_target(IgnOGRE TARGET_NAME IgnOGRE::IgnOGRE LIB_VAR OGRE_LIBRARIES INCLUDE_VAR OGRE_INCLUDE_DIRS) diff --git a/cmake/FindIgnOGRE2.cmake b/cmake/FindIgnOGRE2.cmake index c23dd43a..5804b014 100644 --- a/cmake/FindIgnOGRE2.cmake +++ b/cmake/FindIgnOGRE2.cmake @@ -20,7 +20,7 @@ # # Usage of this module as follows: # -# ign_find_package(IgnOGRE2) +# gz_find_package(IgnOGRE2) # # Variables used by this module, they can change the default behaviour and need # to be set before calling find_package: @@ -51,7 +51,7 @@ # # Example usage: # -# ign_find_package(IgnOGRE2 +# gz_find_package(IgnOGRE2 # VERSION 2.2.0 # COMPONENTS HlmsPbs HlmsUnlit Overlay) @@ -155,7 +155,7 @@ if (NOT WIN32) # Note: OGRE2 installed from debs is named OGRE-2.2 while the version # installed from source does not have the 2.2 suffix # look for OGRE2 installed from debs - ign_pkg_check_modules_quiet(${IGN_OGRE2_PROJECT_NAME} ${OGRE2_INSTALL_PATH} NO_CMAKE_ENVIRONMENT_PATH QUIET) + gz_pkg_check_modules_quiet(${IGN_OGRE2_PROJECT_NAME} ${OGRE2_INSTALL_PATH} NO_CMAKE_ENVIRONMENT_PATH QUIET) if (${IGN_OGRE2_PROJECT_NAME}_FOUND) set(IGN_PKG_NAME ${OGRE2_INSTALL_PATH}) @@ -296,7 +296,7 @@ if (NOT WIN32) set(component_LIBRARY_DIRS ${OGRE2_LIBRARY_DIRS}) set(component_LIBRARIES ${OGRE2-${component}}) - ign_import_target(${component} TARGET_NAME ${component_TARGET_NAME} + gz_import_target(${component} TARGET_NAME ${component_TARGET_NAME} LIB_VAR component_LIBRARIES INCLUDE_VAR component_INCLUDE_DIRS) @@ -338,9 +338,9 @@ if (NOT WIN32) fix_pkgconfig_resource_path_jammy_bug("${OGRE2_RESOURCE_PATH}" OGRE2_RESOURCE_PATH) # We need to manually specify the pkgconfig entry (and type of entry), - # because ign_pkg_check_modules does not work for it. + # because gz_pkg_check_modules does not work for it. include(IgnPkgConfig) - ign_pkg_config_library_entry(IgnOGRE2 OgreMain) + gz_pkg_config_library_entry(IgnOGRE2 OgreMain) else() #WIN32 set(OGRE2_FOUND TRUE) @@ -482,7 +482,7 @@ else() #WIN32 set(component_LIBRARIES ${${PREFIX}_LIBRARIES}) - ign_import_target(${component} + gz_import_target(${component} TARGET_NAME ${component_TARGET_NAME} LIB_VAR component_LIBRARIES INCLUDE_VAR component_INCLUDE_DIRS @@ -505,7 +505,7 @@ set(IgnOGRE2_FOUND false) if (OGRE2_FOUND) set(IgnOGRE2_FOUND true) - ign_import_target(IgnOGRE2 + gz_import_target(IgnOGRE2 TARGET_NAME IgnOGRE2::IgnOGRE2 LIB_VAR OGRE2_LIBRARIES INCLUDE_VAR OGRE2_INCLUDE_DIRS) diff --git a/cmake/FindIgnProtobuf.cmake b/cmake/FindIgnProtobuf.cmake index 199734dd..f367c8bb 100644 --- a/cmake/FindIgnProtobuf.cmake +++ b/cmake/FindIgnProtobuf.cmake @@ -24,7 +24,7 @@ # support shared library versions of Protobuf. include(IgnPkgConfig) -ign_pkg_config_entry(IgnProtobuf "protobuf >= ${IgnProtobuf_FIND_VERSION}") +gz_pkg_config_entry(IgnProtobuf "protobuf >= ${IgnProtobuf_FIND_VERSION}") find_package(Protobuf ${IgnProtobuf_FIND_VERSION} QUIET CONFIG) @@ -50,21 +50,21 @@ foreach(component ${IgnProtobuf_FIND_COMPONENTS}) if((${component} STREQUAL "libprotobuf") OR (${component} STREQUAL "all")) if((NOT PROTOBUF_LIBRARY) AND (NOT TARGET protobuf::libprotobuf)) set(Protobuf_FOUND false) - ign_string_append(IgnProtobuf_missing_components "libprotobuf" DELIM " ") + gz_string_append(IgnProtobuf_missing_components "libprotobuf" DELIM " ") endif() endif() if((${component} STREQUAL "libprotoc") OR (${component} STREQUAL "all")) if((NOT PROTOBUF_PROTOC_LIBRARY) AND (NOT TARGET protobuf::libprotoc)) set(Protobuf_FOUND false) - ign_string_append(IgnProtobuf_missing_components "libprotoc" DELIM " ") + gz_string_append(IgnProtobuf_missing_components "libprotoc" DELIM " ") endif() endif() if((${component} STREQUAL "protoc") OR (${component} STREQUAL "all")) if((NOT PROTOBUF_PROTOC_EXECUTABLE) AND (NOT TARGET protobuf::protoc)) set(Protobuf_FOUND false) - ign_string_append(IgnProtobuf_missing_components "protoc" DELIM " ") + gz_string_append(IgnProtobuf_missing_components "protoc" DELIM " ") endif() endif() @@ -76,7 +76,7 @@ endif() if(${Protobuf_FOUND}) # If we have found Protobuf, then set the IgnProtobuf_FOUND flag to true so - # that ign_find_package(~) knows that we were successful. + # that gz_find_package(~) knows that we were successful. set(IgnProtobuf_FOUND true) # Older versions of protobuf don't create imported targets, so we will create @@ -84,14 +84,14 @@ if(${Protobuf_FOUND}) include(IgnImportTarget) if(NOT TARGET protobuf::libprotobuf) - ign_import_target(protobuf + gz_import_target(protobuf TARGET_NAME protobuf::libprotobuf LIB_VAR PROTOBUF_LIBRARY INCLUDE_VAR PROTOBUF_INCLUDE_DIR) endif() if(NOT TARGET protobuf::libprotoc) - ign_import_target(protobuf + gz_import_target(protobuf TARGET_NAME protobuf::libprotoc LIB_VAR PROTOBUF_PROTOC_LIBRARY INCLUDE_VAR PROTOBUF_INCLUDE_DIR) diff --git a/cmake/FindIgnURDFDOM.cmake b/cmake/FindIgnURDFDOM.cmake index f8d8fd4b..ac34008b 100644 --- a/cmake/FindIgnURDFDOM.cmake +++ b/cmake/FindIgnURDFDOM.cmake @@ -23,7 +23,7 @@ if(PKG_CONFIG_FOUND) else() set(signature "urdfdom") endif() - ign_pkg_check_modules(IgnURDFDOM "${signature}") + gz_pkg_check_modules(IgnURDFDOM "${signature}") else() message(VERBOSE "Unable to find pkg-config in the system, fallback to use CMake") endif() @@ -36,7 +36,7 @@ if(NOT IgnURDFDOM_FOUND) endif() # NOTE: urdfdom cmake does not support version checking - ign_find_package(urdfdom ${find_version} QUIET) + gz_find_package(urdfdom ${find_version} QUIET) if (urdfdom_FOUND) add_library(IgnURDFDOM::IgnURDFDOM INTERFACE IMPORTED) target_link_libraries(IgnURDFDOM::IgnURDFDOM diff --git a/cmake/FindJSONCPP.cmake b/cmake/FindJSONCPP.cmake index 7f5c78d9..aa80a976 100644 --- a/cmake/FindJSONCPP.cmake +++ b/cmake/FindJSONCPP.cmake @@ -36,9 +36,9 @@ else() include(IgnPkgConfig) if(JSONCPP_FOUND) - ign_pkg_config_entry(JSONCPP jsoncpp) + gz_pkg_config_entry(JSONCPP jsoncpp) else() - ign_pkg_check_modules_quiet(JSONCPP jsoncpp) + gz_pkg_check_modules_quiet(JSONCPP jsoncpp) set(JSONCPP_TARGET JSONCPP::JSONCPP) # If that failed, then fall back to manual detection. @@ -68,7 +68,7 @@ else() if(JSONCPP_FOUND) include(IgnImportTarget) - ign_import_target(JSONCPP) + gz_import_target(JSONCPP) endif() endif() include(FindPackageHandleStandardArgs) diff --git a/cmake/FindODE.cmake b/cmake/FindODE.cmake index a13f066f..90efaa04 100644 --- a/cmake/FindODE.cmake +++ b/cmake/FindODE.cmake @@ -55,7 +55,7 @@ if(ODE_FOUND) endif() include(IgnImportTarget) - ign_import_target(ODE) + gz_import_target(ODE) if(NOT ODE_FIND_QUIETLY) message(STATUS "Found ODE: ${ODE_LIBRARIES}") diff --git a/cmake/FindOptiX.cmake b/cmake/FindOptiX.cmake index a0ca83db..a00f25ba 100644 --- a/cmake/FindOptiX.cmake +++ b/cmake/FindOptiX.cmake @@ -18,7 +18,7 @@ # Modified from NVIDIA's FindOptiX.cmake distributed in its OptiX SDK # Usage of this module as follows: # -# ign_find_package(OptiX) +# gz_find_package(OptiX) # # Variable used by this module, which needs to be set before calling # find_package: @@ -234,5 +234,5 @@ find_package_handle_standard_args( REQUIRED_VARS OptiX_FOUND) include(IgnPkgConfig) -ign_pkg_config_library_entry(OptiX OptiX) +gz_pkg_config_library_entry(OptiX OptiX) diff --git a/cmake/FindSQLite3.cmake b/cmake/FindSQLite3.cmake index 75e279ad..27431b13 100644 --- a/cmake/FindSQLite3.cmake +++ b/cmake/FindSQLite3.cmake @@ -26,9 +26,9 @@ # SQLite3_FOUND System has sqlite3 library and headers if(SQLite3_FIND_VERSION) - ign_pkg_check_modules_quiet(SQLite3 "sqlite3 >= ${SQLite3_FIND_VERSION}") + gz_pkg_check_modules_quiet(SQLite3 "sqlite3 >= ${SQLite3_FIND_VERSION}") else() - ign_pkg_check_modules_quiet(SQLite3 "sqlite") + gz_pkg_check_modules_quiet(SQLite3 "sqlite") endif() if(MSVC) @@ -51,6 +51,6 @@ if(MSVC) endif() endif() - ign_import_target(SQLite3) + gz_import_target(SQLite3) endif() diff --git a/cmake/FindSWSCALE.cmake b/cmake/FindSWSCALE.cmake index b3e62d2d..59e144a8 100644 --- a/cmake/FindSWSCALE.cmake +++ b/cmake/FindSWSCALE.cmake @@ -16,7 +16,7 @@ ######################################## # Find libswscale format include(IgnPkgConfig) -ign_pkg_check_modules_quiet(SWSCALE libswscale) +gz_pkg_check_modules_quiet(SWSCALE libswscale) if(NOT SWSCALE_FOUND) include(IgnManualSearch) diff --git a/cmake/FindTINYXML2.cmake b/cmake/FindTINYXML2.cmake index c69b147d..a20c028b 100644 --- a/cmake/FindTINYXML2.cmake +++ b/cmake/FindTINYXML2.cmake @@ -19,7 +19,7 @@ include(IgnPkgConfig) # Use pkg_check_modules to start -ign_pkg_check_modules_quiet(TINYXML2 tinyxml2) +gz_pkg_check_modules_quiet(TINYXML2 tinyxml2) # If that failed, then fall back to manual detection (necessary for MacOS) if(NOT TINYXML2_FOUND) @@ -54,7 +54,7 @@ if(NOT TINYXML2_FOUND) if(TINYXML2_FOUND) include(IgnImportTarget) - ign_import_target(TINYXML2) + gz_import_target(TINYXML2) endif() include(FindPackageHandleStandardArgs) diff --git a/cmake/FindUUID.cmake b/cmake/FindUUID.cmake index 225cc3a6..b499f425 100644 --- a/cmake/FindUUID.cmake +++ b/cmake/FindUUID.cmake @@ -18,7 +18,7 @@ if (UNIX) if(NOT APPLE) include(IgnPkgConfig) - ign_pkg_check_modules_quiet(UUID uuid) + gz_pkg_check_modules_quiet(UUID uuid) if(NOT UUID_FOUND) include(IgnManualSearch) diff --git a/cmake/FindYAML.cmake b/cmake/FindYAML.cmake index f081d1af..54950aa9 100644 --- a/cmake/FindYAML.cmake +++ b/cmake/FindYAML.cmake @@ -52,7 +52,7 @@ if(YAML_FIND_VERSION AND NOT YAML_FIND_VERSION VERSION_EQUAL "0.1") "but you requested version ${YAML_FIND_VERSION}.") else() include(IgnPkgConfig) - ign_pkg_check_modules_quiet(YAML yaml-0.1) + gz_pkg_check_modules_quiet(YAML yaml-0.1) # If that failed, then fall back to manual detection. if(NOT YAML_FOUND) @@ -81,7 +81,7 @@ else() if(YAML_FOUND) include(IgnImportTarget) - ign_import_target(YAML) + gz_import_target(YAML) message(STATUS "Assuming libyaml is static, defining YAML_DECLARE_STATIC") set_target_properties(YAML::YAML PROPERTIES INTERFACE_COMPILE_DEFINITIONS "YAML_DECLARE_STATIC" diff --git a/cmake/FindZIP.cmake b/cmake/FindZIP.cmake index 2c2cd76a..c12c4395 100644 --- a/cmake/FindZIP.cmake +++ b/cmake/FindZIP.cmake @@ -27,7 +27,7 @@ # ZIP_LIBRARIES The ZIP libraries include(IgnPkgConfig) -ign_pkg_check_modules_quiet(ZIP libzip) +gz_pkg_check_modules_quiet(ZIP libzip) # If that failed, then fall back to manual detection. if(NOT ZIP_FOUND) @@ -56,7 +56,7 @@ if(NOT ZIP_FOUND) if(ZIP_FOUND) include(IgnImportTarget) - ign_import_target(ZIP) + gz_import_target(ZIP) endif() endif() diff --git a/cmake/FindZeroMQ.cmake b/cmake/FindZeroMQ.cmake index 46389486..e18eb1d0 100644 --- a/cmake/FindZeroMQ.cmake +++ b/cmake/FindZeroMQ.cmake @@ -68,7 +68,7 @@ if (ZeroMQ_FOUND) set(ZeroMQ_TARGET libzmq) # Make sure to fill out the pkg-config information before quitting - ign_pkg_config_entry(ZeroMQ "libzmq >= ${ZeroMQ_FIND_VERSION}") + gz_pkg_config_entry(ZeroMQ "libzmq >= ${ZeroMQ_FIND_VERSION}") return() @@ -80,6 +80,6 @@ if (UNIX) message(STATUS "Config-file not installed for ZeroMQ -- checking for pkg-config") endif() - ign_pkg_check_modules(ZeroMQ "libzmq >= ${ZeroMQ_FIND_VERSION}") + gz_pkg_check_modules(ZeroMQ "libzmq >= ${ZeroMQ_FIND_VERSION}") endif() diff --git a/cmake/IgnConfigureProject.cmake b/cmake/IgnConfigureProject.cmake index 46434fe9..58a8f1ea 100644 --- a/cmake/IgnConfigureProject.cmake +++ b/cmake/IgnConfigureProject.cmake @@ -2,7 +2,7 @@ # IgnConfigureProject # ------------------- # -# ign_configure_project([VERSION_SUFFIX ]) +# gz_configure_project([VERSION_SUFFIX ]) # # Sets up an ignition library project. # @@ -31,17 +31,32 @@ ################################################# # Initialize the ignition project macro(ign_configure_project) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_configure_project is deprecated, use gz_configure_project instead.") - #------------------------------------ - # Define the expected arguments set(options NO_IGNITION_PREFIX) set(oneValueArgs REPLACE_IGNITION_INCLUDE_PATH VERSION_SUFFIX) set(multiValueArgs) # We are not using multiValueArgs yet - - #------------------------------------ - # Parse the arguments _gz_cmake_parse_arguments(gz_configure_project "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + set(gz_configure_project_skip_parsing true) + gz_configure_project() +endmacro() +macro(gz_configure_project) + + # Deprecated, remove skip parsing logic in version 4 + if (NOT gz_configure_project_skip_parsing) + #------------------------------------ + # Define the expected arguments + set(options NO_IGNITION_PREFIX) + set(oneValueArgs REPLACE_IGNITION_INCLUDE_PATH VERSION_SUFFIX) + set(multiValueArgs) # We are not using multiValueArgs yet + + #------------------------------------ + # Parse the arguments + _gz_cmake_parse_arguments(gz_configure_project "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + endif() + # Note: The following are automatically defined by project(~) in cmake v3: # PROJECT_NAME # PROJECT_VERSION_MAJOR @@ -120,7 +135,7 @@ macro(ign_configure_project) #============================================================================ # Identify the operating system - ign_check_os() + gz_check_os() #============================================================================ # Create package information @@ -182,6 +197,11 @@ endmacro() ################################################# # Check the OS type. macro(ign_check_os) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_check_os is deprecated, use gz_check_os instead.") + gz_check_os() +endmacro() +macro(gz_check_os) # CMake does not distinguish Linux from other Unices. string(REGEX MATCH "Linux" PLAYER_OS_LINUX ${CMAKE_SYSTEM_NAME}) diff --git a/cmake/IgnCreateDocs.cmake b/cmake/IgnCreateDocs.cmake index 418f3db4..757a6058 100644 --- a/cmake/IgnCreateDocs.cmake +++ b/cmake/IgnCreateDocs.cmake @@ -140,19 +140,19 @@ function(gz_create_docs) set(IGNITION_DOXYGEN_TAGFILES " ") foreach(tagfile ${gz_create_docs_TAGFILES}) - ign_string_append(IGNITION_DOXYGEN_TAGFILES "\"${tagfile}\"" DELIM " \\\\\\\\\n ") + gz_string_append(IGNITION_DOXYGEN_TAGFILES "\"${tagfile}\"" DELIM " \\\\\\\\\n ") endforeach() set(IGNITION_DOXYGEN_ADDITIONAL_INPUT_DIRS " ") foreach(dir ${gz_create_docs_ADDITIONAL_INPUT_DIRS}) - ign_string_append(IGNITION_DOXYGEN_ADDITIONAL_INPUT_DIRS "${dir}") + gz_string_append(IGNITION_DOXYGEN_ADDITIONAL_INPUT_DIRS "${dir}") endforeach() set(IGNITION_DOXYGEN_IMAGE_PATH " ") foreach(dir ${gz_create_docs_IMAGE_PATH_DIRS}) - ign_string_append(IGNITION_DOXYGEN_IMAGE_PATH "${dir}") + gz_string_append(IGNITION_DOXYGEN_IMAGE_PATH "${dir}") endforeach() find_package(Doxygen) diff --git a/cmake/IgnImportTarget.cmake b/cmake/IgnImportTarget.cmake index 8a2abdb2..3ebe2a0e 100644 --- a/cmake/IgnImportTarget.cmake +++ b/cmake/IgnImportTarget.cmake @@ -14,7 +14,7 @@ # limitations under the License. # ######################################## -# ign_import_target( [INTERFACE] +# gz_import_target( [INTERFACE] # [TARGET_NAME ] # [LIB_VAR ] # [INCLUDE_VAR ] @@ -44,17 +44,31 @@ # this package. Default is _CFLAGS. # macro(ign_import_target package) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_import_target is deprecated, use gz_import_target instead.") - #------------------------------------ - # Define the expected arguments set(options "INTERFACE") set(oneValueArgs "TARGET_NAME" "LIB_VAR" "INCLUDE_VAR" "CFLAGS_VAR") set(multiValueArgs) # We are not using multiValueArgs yet - - #------------------------------------ - # Parse the arguments _gz_cmake_parse_arguments(gz_import_target "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + set(gz_import_target_skip_parsing true) + gz_import_target(${package}) +endmacro() +macro(gz_import_target package) + + if (NOT gz_import_target_skip_parsing) + #------------------------------------ + # Define the expected arguments + set(options "INTERFACE") + set(oneValueArgs "TARGET_NAME" "LIB_VAR" "INCLUDE_VAR" "CFLAGS_VAR") + set(multiValueArgs) # We are not using multiValueArgs yet + + #------------------------------------ + # Parse the arguments + _gz_cmake_parse_arguments(gz_import_target "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + endif() + #------------------------------------ # Check if a target name has been provided, otherwise use # ${package}::{$package} as the target name. diff --git a/cmake/IgnManualSearch.cmake b/cmake/IgnManualSearch.cmake index 363ee3e7..644b806f 100644 --- a/cmake/IgnManualSearch.cmake +++ b/cmake/IgnManualSearch.cmake @@ -23,7 +23,7 @@ # This macro will find a library based on the name of one of its headers, # and the library name. # It is used inside Find***.cmake scripts, typicall as fallback for a -# ign_pkg_check_modules_quiet call. +# gz_pkg_check_modules_quiet call. # It will create an imported target for the library # # INTERFACE: Optional. Use INTERFACE when the target does not actually provide @@ -108,8 +108,8 @@ macro(gz_manual_search PACKAGE_NAME) if(${package}_FOUND) include(IgnImportTarget) - ign_import_target(${package} ${_gz_pkg_check_modules_interface_option} - TARGET_NAME ${ign_pkg_check_modules_TARGET_NAME}) + gz_import_target(${package} ${_gz_pkg_check_modules_interface_option} + TARGET_NAME ${gz_pkg_check_modules_TARGET_NAME}) endif() endmacro() diff --git a/cmake/IgnPackaging.cmake b/cmake/IgnPackaging.cmake index 2fad5d1d..ed06a4ce 100644 --- a/cmake/IgnPackaging.cmake +++ b/cmake/IgnPackaging.cmake @@ -7,7 +7,7 @@ # Sets up package information for an ignition library project. # This function is internal to gz-cmake. # -# gz_create_packages +# gz_create_package # # Creates a package for an ignition library project # diff --git a/cmake/IgnPkgConfig.cmake b/cmake/IgnPkgConfig.cmake index aba024b9..327c191e 100644 --- a/cmake/IgnPkgConfig.cmake +++ b/cmake/IgnPkgConfig.cmake @@ -20,29 +20,35 @@ # NOTE: This macro assumes that pkg-config is the only means by which you will # be searching for the package. If you intend to continue searching in the # event that pkg-config fails (or is unavailable), then you should instead -# call ign_pkg_check_modules_quiet(~). +# call gz_pkg_check_modules_quiet(~). # # NOTE: If you need to specify a version comparison for pkg-config, then your # second argument must be wrapped in quotes. E.g. if you want to find # version greater than or equal to 3.2.1 of a package called SomePackage # which is known to pkg-config as libsomepackage, then you should call -# ign_pkg_check_modules as follows: +# gz_pkg_check_modules as follows: # -# ign_pkg_check_modules(SomePackage "libsomepackage >= 3.2.1") +# gz_pkg_check_modules(SomePackage "libsomepackage >= 3.2.1") # # The quotes and spaces in the second argument are all very important in # order to ensure that our auto-generated *.pc file gets filled in # correctly. If you do not have any version requirements, then you can # simply leave all of that out: # -# ign_pkg_check_modules(SomePackage libsomepackage) +# gz_pkg_check_modules(SomePackage libsomepackage) # # Without the version comparison, the quotes and spacing are irrelevant. -# This usage note applies to ign_pkg_check_modules_quiet(~) as well. +# This usage note applies to gz_pkg_check_modules_quiet(~) as well. # macro(ign_pkg_check_modules package signature) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_pkg_check_modules is deprecated, use gz_pkg_check_modules instead.") - ign_pkg_check_modules_quiet(${package} "${signature}" ${ARGN}) + gz_pkg_check_modules(${package} ${signature}) +endmacro() +macro(gz_pkg_check_modules package signature) + + gz_pkg_check_modules_quiet(${package} "${signature}" ${ARGN}) if(NOT PKG_CONFIG_FOUND) message(WARNING "The package [${package}] requires pkg-config in order to be found. " @@ -56,24 +62,39 @@ macro(ign_pkg_check_modules package signature) endmacro() -# This is an alternative to ign_pkg_check_modules(~) which you can use if you +# This is an alternative to gz_pkg_check_modules(~) which you can use if you # have an alternative way to look for the package if pkg-config is not available # or cannot find the requested package. This will still setup the pkg-config # variables for you, whether or not pkg-config is available. # -# For usage instructions, see ign_pkg_check_modules(~) above. +# For usage instructions, see gz_pkg_check_modules(~) above. macro(ign_pkg_check_modules_quiet package signature) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_pkg_check_modules_quiet is deprecated, use gz_pkg_check_modules_quiet instead.") - #------------------------------------ - # Define the expected arguments set(options INTERFACE NO_CMAKE_ENVIRONMENT_PATH QUIET) set(oneValueArgs "TARGET_NAME") set(multiValueArgs) - - #------------------------------------ - # Parse the arguments _gz_cmake_parse_arguments(gz_pkg_check_modules "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + set(gz_pkg_check_modules_quiet_skip_parsing true) + gz_pkg_check_modules_quiet(${package} ${signature}) +endmacro() +macro(gz_pkg_check_modules_quiet package signature) + + # Deprecated, remove skip parsing logic in version 4 + if (NOT gz_pkg_check_modules_quiet_skip_parsing) + #------------------------------------ + # Define the expected arguments + set(options INTERFACE NO_CMAKE_ENVIRONMENT_PATH QUIET) + set(oneValueArgs "TARGET_NAME") + set(multiValueArgs) + + #------------------------------------ + # Parse the arguments + _gz_cmake_parse_arguments(gz_pkg_check_modules "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + endif() + if(gz_pkg_check_modules_INTERFACE) set(_gz_pkg_check_modules_interface_option INTERFACE) else() @@ -86,7 +107,7 @@ macro(ign_pkg_check_modules_quiet package signature) find_package(PkgConfig QUIET) - ign_pkg_config_entry(${package} "${signature}") + gz_pkg_config_entry(${package} "${signature}") if(PKG_CONFIG_FOUND) @@ -149,7 +170,7 @@ macro(ign_pkg_check_modules_quiet package signature) # For some reason, pkg_check_modules does not provide complete paths to the # libraries it returns, even though find_package is conventionally supposed # to provide complete library paths. Having only the library name is harmful - # to the ign_create_imported_target macro, so we will change the variable to + # to the gz_create_imported_target macro, so we will change the variable to # give it complete paths. # # TODO: How would we deal with multiple modules that are in different @@ -161,7 +182,7 @@ macro(ign_pkg_check_modules_quiet package signature) "${${package}_LIBRARY_DIRS}") include(IgnImportTarget) - ign_import_target(${package} ${_gz_pkg_check_modules_interface_option} + gz_import_target(${package} ${_gz_pkg_check_modules_interface_option} TARGET_NAME ${gz_pkg_check_modules_TARGET_NAME}) endif() @@ -170,24 +191,36 @@ macro(ign_pkg_check_modules_quiet package signature) endmacro() -# This creates variables which inform ign_find_package(~) that your package +# This creates variables which inform gz_find_package(~) that your package # should be found as a module by pkg-config. In most cases, this will be called -# implicitly by ign_pkg_check_modules[_quiet], but if a package provides both a +# implicitly by gz_pkg_check_modules[_quiet], but if a package provides both a # cmake config-file (*-config.cmake) and a pkg-config file (*.pc), then you can # use the cmake config-file to retrieve the package information, and then use # this macro to generate the relevant pkg-config information. macro(ign_pkg_config_entry package string) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_pkg_config_entry is deprecated, use gz_pkg_config_entry instead.") + + gz_pkg_config_entry(${package} ${string}) +endmacro() +macro(gz_pkg_config_entry package string) set(${package}_PKGCONFIG_ENTRY "${string}") set(${package}_PKGCONFIG_TYPE PKGCONFIG_REQUIRES) endmacro() -# This creates variables which inform ign_find_package(~) that your package must +# This creates variables which inform gz_find_package(~) that your package must # be found as a plain library by pkg-config. This should be used in any # find-module that handles a library package which does not install a pkg-config # .pc file. macro(ign_pkg_config_library_entry package lib_name) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_pkg_config_library_entry is deprecated, use gz_pkg_config_library_entry instead.") + + gz_pkg_config_library_entry(${package} ${lib_name}) +endmacro() +macro(gz_pkg_config_library_entry package lib_name) set(${package}_PKGCONFIG_ENTRY "-l${lib_name}") set(${package}_PKGCONFIG_TYPE PKGCONFIG_LIBS) diff --git a/cmake/IgnUtils.cmake b/cmake/IgnUtils.cmake index 82b7903e..cbc142ea 100644 --- a/cmake/IgnUtils.cmake +++ b/cmake/IgnUtils.cmake @@ -1,6 +1,6 @@ ################################################# -# ign_find_package( +# gz_find_package( # [REQUIRED] [PRIVATE] [EXACT] [QUIET] [CONFIG] [BUILD_ONLY] [PKGCONFIG_IGNORE] # [COMPONENTS ] # [OPTIONAL_COMPONENTS ] @@ -113,7 +113,7 @@ # for your dependency. However, if your package gets distributed with its own # cmake config-file or find-module, then it might not automatically set this # information. Therefore, we provide the ability to set it through your call to -# ign_find_package(~). These arguments can also be used to overwrite the +# gz_find_package(~). These arguments can also be used to overwrite the # pkg-config entries that get generated by the ign-cmake find-module for the # package. Do not hesitate to ask for help if you need to use these arguments. # @@ -139,17 +139,32 @@ # out, whether or not it is provided. # macro(ign_find_package PACKAGE_NAME) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_find_package is deprecated, use gz_find_package instead.") - #------------------------------------ - # Define the expected arguments set(options REQUIRED PRIVATE EXACT QUIET CONFIG BUILD_ONLY PKGCONFIG_IGNORE) set(oneValueArgs VERSION PRETTY PURPOSE EXTRA_ARGS PKGCONFIG PKGCONFIG_LIB PKGCONFIG_VER_COMPARISON) set(multiValueArgs REQUIRED_BY PRIVATE_FOR COMPONENTS OPTIONAL_COMPONENTS) - - #------------------------------------ - # Parse the arguments _gz_cmake_parse_arguments(gz_find_package "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + set(gz_find_package_skip_parsing true) + gz_find_package(${PACKAGE_NAME}) +endmacro() +macro(gz_find_package PACKAGE_NAME) + + # Deprecated, remove skip parsing logic in version 4 + if (NOT gz_find_package_skip_parsing) + #------------------------------------ + # Define the expected arguments + set(options REQUIRED PRIVATE EXACT QUIET CONFIG BUILD_ONLY PKGCONFIG_IGNORE) + set(oneValueArgs VERSION PRETTY PURPOSE EXTRA_ARGS PKGCONFIG PKGCONFIG_LIB PKGCONFIG_VER_COMPARISON) + set(multiValueArgs REQUIRED_BY PRIVATE_FOR COMPONENTS OPTIONAL_COMPONENTS) + + #------------------------------------ + # Parse the arguments + _gz_cmake_parse_arguments(gz_find_package "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + endif() + #------------------------------------ # Construct the arguments to pass to find_package set(${PACKAGE_NAME}_find_package_args ${PACKAGE_NAME}) @@ -222,7 +237,7 @@ macro(ign_find_package PACKAGE_NAME) if(gz_find_package_REQUIRED) # If it was required by the project, we will create an error. - ign_build_error(${${PACKAGE_NAME}_msg}) + gz_build_error(${${PACKAGE_NAME}_msg}) elseif(gz_find_package_REQUIRED_BY) @@ -232,20 +247,20 @@ macro(ign_find_package PACKAGE_NAME) # Otherwise, if it was only required by some of the components, create # a warning about which components will not be available, unless the # user explicitly requested that it be skipped - ign_build_warning("Skipping component [${component}]: ${${PACKAGE_NAME}_msg}.\n ^~~~~ Set SKIP_${component}=true in cmake to suppress this warning.\n ") + gz_build_warning("Skipping component [${component}]: ${${PACKAGE_NAME}_msg}.\n ^~~~~ Set SKIP_${component}=true in cmake to suppress this warning.\n ") # Create a variable to indicate that we need to skip the component set(INTERNAL_SKIP_${component} true) # Track the missing dependencies - ign_string_append(${component}_MISSING_DEPS "${${PACKAGE_NAME}_pretty}" DELIM ", ") + gz_string_append(${component}_MISSING_DEPS "${${PACKAGE_NAME}_pretty}" DELIM ", ") endif() endforeach() else() if(NOT gz_find_package_QUIET) - ign_build_warning(${${PACKAGE_NAME}_msg}) + gz_build_warning(${${PACKAGE_NAME}_msg}) endif() endif() @@ -275,17 +290,17 @@ macro(ign_find_package PACKAGE_NAME) # If a version is provided here, we should pass that as well. if(gz_find_package_VERSION) - ign_string_append(${PACKAGE_NAME}_dependency_args ${gz_find_package_VERSION}) + gz_string_append(${PACKAGE_NAME}_dependency_args ${gz_find_package_VERSION}) endif() # If we have specified the exact version, we should provide that as well. if(gz_find_package_EXACT) - ign_string_append(${PACKAGE_NAME}_dependency_args EXACT) + gz_string_append(${PACKAGE_NAME}_dependency_args EXACT) endif() # If we have specified to use CONFIG mode, we should provide that as well. if(gz_find_package_CONFIG) - ign_string_append(${PACKAGE_NAME}_dependency_args CONFIG) + gz_string_append(${PACKAGE_NAME}_dependency_args CONFIG) endif() # NOTE (MXG): 7 seems to be the number of escapes required to get @@ -294,17 +309,17 @@ macro(ign_find_package PACKAGE_NAME) # escapes get collapsed exactly three times, so it is possible that any # changes to this script could cause a different number of escapes to be # necessary. Please use caution when modifying this script. - ign_string_append(${PACKAGE_NAME}_dependency_args "\\\\\\\${ign_package_quiet} \\\\\\\${ign_package_required}") + gz_string_append(${PACKAGE_NAME}_dependency_args "\\\\\\\${ign_package_quiet} \\\\\\\${ign_package_required}") # If we have specified components of the dependency, mention those. if(gz_find_package_COMPONENTS) - ign_string_append(${PACKAGE_NAME}_dependency_args "COMPONENTS ${gz_find_package_COMPONENTS}") + gz_string_append(${PACKAGE_NAME}_dependency_args "COMPONENTS ${gz_find_package_COMPONENTS}") endif() # If there are any additional arguments for the find_package(~) command, # forward them along. if(gz_find_package_EXTRA_ARGS) - ign_string_append(${PACKAGE_NAME}_dependency_args "${gz_find_package_EXTRA_ARGS}") + gz_string_append(${PACKAGE_NAME}_dependency_args "${gz_find_package_EXTRA_ARGS}") endif() # TODO: When we migrate to cmake-3.9+ bring back find_dependency(~) because @@ -316,7 +331,7 @@ macro(ign_find_package PACKAGE_NAME) if(gz_find_package_REQUIRED) # If this is REQUIRED, add it to PROJECT_CMAKE_DEPENDENCIES - ign_string_append(PROJECT_CMAKE_DEPENDENCIES "${${PACKAGE_NAME}_find_dependency}" DELIM "\n") + gz_string_append(PROJECT_CMAKE_DEPENDENCIES "${${PACKAGE_NAME}_find_dependency}" DELIM "\n") endif() if(gz_find_package_REQUIRED_BY) @@ -331,7 +346,7 @@ macro(ign_find_package PACKAGE_NAME) # componenets foreach(component ${gz_find_package_REQUIRED_BY}) if(NOT ${component}_${PACKAGE_NAME}_PRIVATE) - ign_string_append(${component}_CMAKE_DEPENDENCIES "${${PACKAGE_NAME}_find_dependency}" DELIM "\n") + gz_string_append(${component}_CMAKE_DEPENDENCIES "${${PACKAGE_NAME}_find_dependency}" DELIM "\n") endif() endforeach() @@ -348,8 +363,8 @@ macro(ign_find_package PACKAGE_NAME) # ign_pkg_config_library_entry. However, that will not be performed by # third-party dependencies that provide their own find-module or their own # cmake config-module. Therefore, we provide the option of specifying - # pkgconfig information through the call to ign_find_package. This also - # allows callers of ign_find_package(~) to overwrite the default + # pkgconfig information through the call to gz_find_package. This also + # allows callers of gz_find_package(~) to overwrite the default # pkg-config entry that gets generated by the ign-cmake find-modules. # If the caller has specified the arguments PKGCONFIG_LIB or PKGCONFIG, @@ -389,7 +404,7 @@ macro(ign_find_package PACKAGE_NAME) if(NOT ${PACKAGE_NAME}_PKGCONFIG_ENTRY) # The find-module has not provided a default pkg-config entry for this - # package, and the caller of ign_find_package(~) has not explicitly + # package, and the caller of gz_find_package(~) has not explicitly # provided pkg-config information. The caller has also not specified # PKGCONFIG_IGNORE. This means that the requirements of this package # will be unintentionally omitted from the auto-generated @@ -400,7 +415,7 @@ macro(ign_find_package PACKAGE_NAME) " (IF YOU SEE THIS, PLEASE REPORT IT)\n" "Could not find pkg-config information for ${PACKAGE_NAME}. " "It was not provided by the find-module for the package, nor was it " - "explicitly passed into the call to ign_find_package(~). This is " + "explicitly passed into the call to gz_find_package(~). This is " "most likely an error in this project's use of ign-cmake.") else() @@ -419,7 +434,7 @@ macro(ign_find_package PACKAGE_NAME) # Append the entry as a string onto the project-wide variable for # whichever requirement type we selected - ign_string_append(PROJECT_${PROJECT_${PACKAGE_NAME}_PKGCONFIG_TYPE} ${${PACKAGE_NAME}_PKGCONFIG_ENTRY}) + gz_string_append(PROJECT_${PROJECT_${PACKAGE_NAME}_PKGCONFIG_TYPE} ${${PACKAGE_NAME}_PKGCONFIG_ENTRY}) endif() @@ -440,7 +455,7 @@ macro(ign_find_package PACKAGE_NAME) # Append the entry as a string onto the component-specific variable # for whichever required type we selected - ign_string_append(${${component}_${PACKAGE_NAME}_PKGCONFIG_TYPE} ${${PACKAGE_NAME}_PKGCONFIG_ENTRY}) + gz_string_append(${${component}_${PACKAGE_NAME}_PKGCONFIG_TYPE} ${${PACKAGE_NAME}_PKGCONFIG_ENTRY}) endforeach() @@ -455,7 +470,7 @@ macro(ign_find_package PACKAGE_NAME) endmacro() ################################################# -# ign_string_append( [DELIM ]) +# gz_string_append( [DELIM ]) # # : The name of the string variable that should be appended to # @@ -466,20 +481,39 @@ endmacro() # # Macro to append a value to a string macro(ign_string_append output_var val) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_string_append is deprecated, use gz_string_append instead.") - #------------------------------------ - # Define the expected arguments - # NOTE: options cannot be set to PARENT_SCOPE alone, so we put it explicitly - # into cmake_parse_arguments(~). We use a semicolon to concatenate it with - # this options variable, so all other options should be specified here. set(options) set(oneValueArgs DELIM) - set(multiValueArgs) # We are not using multiValueArgs yet - - #------------------------------------ - # Parse the arguments + set(multiValueArgs) _gz_cmake_parse_arguments(gz_string_append "PARENT_SCOPE;${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + set(gz_string_append_skip_parsing true) + gz_string_append(${output_var} ${val}) + + if(gz_string_append_PARENT_SCOPE) + set(${output_var} ${${output_var}} PARENT_SCOPE) + endif() +endmacro() +macro(gz_string_append output_var val) + + # Deprecated, remove skip parsing logic in version 4 + if (NOT gz_string_append_skip_parsing) + #------------------------------------ + # Define the expected arguments + # NOTE: options cannot be set to PARENT_SCOPE alone, so we put it explicitly + # into cmake_parse_arguments(~). We use a semicolon to concatenate it with + # this options variable, so all other options should be specified here. + set(options) + set(oneValueArgs DELIM) + set(multiValueArgs) # We are not using multiValueArgs yet + + #------------------------------------ + # Parse the arguments + _gz_cmake_parse_arguments(gz_string_append "PARENT_SCOPE;${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + endif() + if(gz_string_append_DELIM) set(delim "${gz_string_append_DELIM}") else() @@ -508,22 +542,22 @@ macro(_gz_list_to_string _output _input_list) set(${_output}) foreach(_item ${${_input_list}}) - # Append each item, and forward any extra options to ign_string_append, such + # Append each item, and forward any extra options to gz_string_append, such # as DELIM or PARENT_SCOPE - ign_string_append(${_output} "${_item}" ${ARGN}) + gz_string_append(${_output} "${_item}" ${ARGN}) endforeach(_item) endmacro() ################################################# -# gz_get_libsources_and_unittests( ) +# gz_get_sources_and_unittests( ) # # Grab all the files ending in "*.cc" from either the "src/" subdirectory or the # current subdirectory if "src/" does not exist. They will be collated into # library source files and unittest source files . # # These output variables can be consumed directly by gz_create_core_library(~), -# ign_add_component(~), gz_build_tests(~), and ign_build_executables(~). +# gz_add_component(~), gz_build_tests(~), and gz_build_executables(~). function(ign_get_libsources_and_unittests lib_sources_var tests_var) # TODO(chapulina) Enable warnings after all libraries have migrated. # message(WARNING "ign_get_libsources_and_unittests is deprecated, use gz_get_libsources_and_unittests instead.") @@ -584,7 +618,7 @@ endfunction() # # From the current directory, grab all the source files and place them into # . Remove their paths to make them suitable for passing into -# ign_add_[library/tests]. +# gz_add_[library/tests]. function(ign_get_sources sources_var) # TODO(chapulina) Enable warnings after all libraries have migrated. # message(WARNING "ign_get_sources is deprecated, use gz_get_sources instead.") @@ -811,21 +845,38 @@ endfunction() ################################################# -# ign_build_error macro +# gz_build_error macro macro(ign_build_error) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_build_error is deprecated, use gz_build_error instead.") + foreach(str ${ARGN}) set(msg "\t${str}") list(APPEND build_errors ${msg}) endforeach() endmacro(ign_build_error) +macro(gz_build_error) + foreach(str ${ARGN}) + set(msg "\t${str}") + list(APPEND build_errors ${msg}) + endforeach() +endmacro(gz_build_error) ################################################# -# ign_build_warning macro +# gz_build_warning macro macro(ign_build_warning) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_build_warning is deprecated, use gz_build_warning instead.") + foreach(str ${ARGN}) list(APPEND build_warnings "${str}") endforeach(str ${ARGN}) endmacro(ign_build_warning) +macro(gz_build_warning) + foreach(str ${ARGN}) + list(APPEND build_warnings "${str}") + endforeach(str ${ARGN}) +endmacro(gz_build_warning) ################################################# # _gz_check_known_cxx_standards(<11|14|17>) @@ -852,7 +903,7 @@ endfunction() # ) # # Handles the C++ standard argument for gz_create_core_library(~) and -# ign_add_component(~). +# gz_add_component(~). # # NOTE: This is only meant for internal ign-cmake use. # @@ -887,7 +938,7 @@ macro(_gz_handle_cxx_standard prefix target pkgconfig_cflags) if(${prefix}_INTERFACE_CXX_STANDARD) target_compile_features(${target} INTERFACE ${IGN_CXX_${${prefix}_INTERFACE_CXX_STANDARD}_FEATURES}) - ign_string_append(${pkgconfig_cflags} "-std=c++${${prefix}_INTERFACE_CXX_STANDARD}") + gz_string_append(${pkgconfig_cflags} "-std=c++${${prefix}_INTERFACE_CXX_STANDARD}") endif() if(${prefix}_PRIVATE_CXX_STANDARD) @@ -1060,7 +1111,7 @@ function(gz_create_core_library) endfunction() ################################################# -# ign_add_component( +# gz_add_component( # SOURCES | INTERFACE # [DEPENDS_ON_COMPONENTS ] # [INCLUDE_SUBDIR ] @@ -1120,17 +1171,37 @@ endfunction() # library, then you probably do not need to specify the standard, because it # will get inherited from the core library. function(ign_add_component component_name) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_add_component is deprecated, use gz_add_component instead.") - #------------------------------------ - # Define the expected arguments set(options INTERFACE INDEPENDENT_FROM_PROJECT_LIB PRIVATELY_DEPENDS_ON_PROJECT_LIB INTERFACE_DEPENDS_ON_PROJECT_LIB) set(oneValueArgs INCLUDE_SUBDIR GET_TARGET_NAME) set(multiValueArgs SOURCES DEPENDS_ON_COMPONENTS) - - #------------------------------------ - # Parse the arguments cmake_parse_arguments(gz_add_component "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + set(gz_add_component_skip_parsing true) + gz_add_component(${component_name}) + + # Pass the component's target name back to the caller if requested + if(gz_add_component_GET_TARGET_NAME) + set(${gz_add_component_GET_TARGET_NAME} ${${gz_add_component_GET_TARGET_NAME}} PARENT_SCOPE) + endif() +endfunction() +function(gz_add_component component_name) + + # Deprecated, remove skip parsing logic in version 4 + if (NOT gz_add_component_skip_parsing) + #------------------------------------ + # Define the expected arguments + set(options INTERFACE INDEPENDENT_FROM_PROJECT_LIB PRIVATELY_DEPENDS_ON_PROJECT_LIB INTERFACE_DEPENDS_ON_PROJECT_LIB) + set(oneValueArgs INCLUDE_SUBDIR GET_TARGET_NAME) + set(multiValueArgs SOURCES DEPENDS_ON_COMPONENTS) + + #------------------------------------ + # Parse the arguments + cmake_parse_arguments(gz_add_component "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + endif() + if(POLICY CMP0079) cmake_policy(SET CMP0079 NEW) endif() @@ -1138,7 +1209,7 @@ function(ign_add_component component_name) if(gz_add_component_SOURCES) set(sources ${gz_add_component_SOURCES}) elseif(NOT gz_add_component_INTERFACE) - message(FATAL_ERROR "You must specify SOURCES for ign_add_component(~)!") + message(FATAL_ERROR "You must specify SOURCES for gz_add_component(~)!") endif() if(gz_add_component_INCLUDE_SUBDIR) @@ -1220,7 +1291,7 @@ function(ign_add_component component_name) #------------------------------------ # Adjust variables if a specific C++ standard was requested - _gz_handle_cxx_standard(ign_add_component + _gz_handle_cxx_standard(gz_add_component ${component_target_name} ${component_name}_PKGCONFIG_CFLAGS) @@ -1255,7 +1326,7 @@ function(ign_add_component component_name) # Add the core library as a cmake dependency for this component # NOTE: It seems we need to triple-escape "${ign_package_required}" and # "${ign_package_quiet}" here. - ign_string_append(${component_name}_CMAKE_DEPENDENCIES + gz_string_append(${component_name}_CMAKE_DEPENDENCIES "if(NOT ${PKG_NAME}_CONFIG_INCLUDED)\n find_package(${PKG_NAME} ${PROJECT_VERSION_FULL_NO_SUFFIX} EXACT \\\${ign_package_quiet} \\\${ign_package_required})\nendif()" DELIM "\n") # Choose what type of pkgconfig entry the core library belongs to @@ -1265,12 +1336,12 @@ function(ign_add_component component_name) set(lib_pkgconfig_type ${lib_pkgconfig_type}_PRIVATE) endif() - ign_string_append(${lib_pkgconfig_type} "${PKG_NAME} = ${PROJECT_VERSION_FULL_NO_SUFFIX}") + gz_string_append(${lib_pkgconfig_type} "${PKG_NAME} = ${PROJECT_VERSION_FULL_NO_SUFFIX}") endif() if(gz_add_component_DEPENDS_ON_COMPONENTS) - ign_string_append(${component_name}_CMAKE_DEPENDENCIES + gz_string_append(${component_name}_CMAKE_DEPENDENCIES "find_package(${PKG_NAME} ${PROJECT_VERSION_FULL_NO_SUFFIX} EXACT \\\${ign_package_quiet} \\\${ign_package_required} COMPONENTS ${gz_add_component_DEPENDS_ON_COMPONENTS})" DELIM "\n") endif() @@ -1342,7 +1413,7 @@ function(_gz_export_target_all) if(all_known_components) foreach(component ${all_known_components}) - ign_string_append(find_all_pkg_components "find_dependency(${component} ${PROJECT_VERSION_FULL_NO_SUFFIX} EXACT)" DELIM "\n") + gz_string_append(find_all_pkg_components "find_dependency(${component} ${PROJECT_VERSION_FULL_NO_SUFFIX} EXACT)" DELIM "\n") endforeach() endif() @@ -1362,7 +1433,7 @@ endmacro() ################################################# # This is only meant for internal use by ignition-cmake. If you are a consumer # of ignition-cmake, please use gz_create_core_library(~) or -# ign_add_component(~) instead of this. +# gz_add_component(~) instead of this. # # _gz_add_library_or_component(LIB_NAME # INCLUDE_DIR @@ -1516,12 +1587,17 @@ endmacro() ################################################# macro(ign_add_executable _name) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_add_executable is deprecated, use gz_add_executable instead.") + gz_add_executable(${_name} ${ARGN}) +endmacro() +macro(gz_add_executable _name) add_executable(${_name} ${ARGN}) target_link_libraries(${_name} ${general_libraries}) endmacro() ################################################# -# ign_target_interface_include_directories( [include_targets]) +# gz_target_interface_include_directories( [include_targets]) # # Add the INTERFACE_INCLUDE_DIRECTORIES of [include_targets] to the public # INCLUDE_DIRECTORIES of . This allows us to propagate the include @@ -1530,6 +1606,12 @@ endmacro() # You MUST pass in targets to include, not directory names. We must not use # explicit directory names here if we want our package to be relocatable. function(ign_target_interface_include_directories name) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_target_interface_include_directories is deprecated, use gz_target_interface_include_directories instead.") + + gz_target_interface_include_directories(name) +endfunction() +function(gz_target_interface_include_directories name) foreach(include_target ${ARGN}) target_include_directories( @@ -1541,12 +1623,22 @@ endfunction() ################################################# macro(ign_install_includes _subdir) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_install_includes is deprecated, use gz_install_includes instead.") + gz_install_includes(${_subdir} ${ARGN}) +endmacro() +macro(gz_install_includes _subdir) install(FILES ${ARGN} DESTINATION ${IGN_INCLUDE_INSTALL_DIR}/${_subdir} COMPONENT headers) endmacro() ################################################# macro(ign_install_executable _name ) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_install_executable is deprecated, use gz_install_executable instead.") + gz_install_executable(${_name} ${ARGN}) +endmacro() +macro(gz_install_executable _name) set_target_properties(${_name} PROPERTIES VERSION ${PROJECT_VERSION_FULL}) install (TARGETS ${_name} DESTINATION ${IGN_BIN_INSTALL_DIR}) manpage(${_name} 1) @@ -1577,7 +1669,7 @@ macro(_gz_filter_valid_compiler_options var) endmacro() ################################################# -# ign_build_executables(SOURCES +# gz_build_executables(SOURCES # [PREFIX ] # [LIB_DEPS ] # [INCLUDE_DIRS ] @@ -1609,21 +1701,38 @@ endmacro() # into your executable's directory. # macro(ign_build_executables) + # TODO(chapulina) Enable warnings after all libraries have migrated. + # message(WARNING "ign_build_executables is deprecated, use gz_build_executables instead.") - #------------------------------------ - # Define the expected arguments set(options EXCLUDE_PROJECT_LIB) set(oneValueArgs PREFIX EXEC_LIST) set(multiValueArgs SOURCES LIB_DEPS INCLUDE_DIRS) - if(gz_build_executables_EXEC_LIST) set(${gz_build_executables_EXEC_LIST} "") endif() + _gz_cmake_parse_arguments(gz_build_executables "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + set(gz_build_executables_skip_parsing true) + gz_build_executables(${PACKAGE_NAME}) +endmacro() +macro(gz_build_executables) - #------------------------------------ - # Parse the arguments - _gz_cmake_parse_arguments(gz_build_executables "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + # Deprecated, remove skip parsing logic in version 4 + if (NOT gz_build_executables_skip_parsing) + #------------------------------------ + # Define the expected arguments + set(options EXCLUDE_PROJECT_LIB) + set(oneValueArgs PREFIX EXEC_LIST) + set(multiValueArgs SOURCES LIB_DEPS INCLUDE_DIRS) + + if(gz_build_executables_EXEC_LIST) + set(${gz_build_executables_EXEC_LIST} "") + endif() + + #------------------------------------ + # Parse the arguments + _gz_cmake_parse_arguments(gz_build_executables "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + endif() foreach(exec_file ${gz_build_executables_SOURCES}) @@ -1742,14 +1851,14 @@ macro(gz_build_tests) endif() if(NOT gz_build_tests_EXCLUDE_PROJECT_LIB) - ign_build_executables( + gz_build_executables( PREFIX "${TEST_TYPE}_" SOURCES ${gz_build_tests_SOURCES} LIB_DEPS gtest gtest_main ${gz_build_tests_LIB_DEPS} INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/test/gtest/include ${gz_build_tests_INCLUDE_DIRS} EXEC_LIST test_list) else() - ign_build_executables( + gz_build_executables( PREFIX "${TEST_TYPE}_" SOURCES ${gz_build_tests_SOURCES} LIB_DEPS gtest gtest_main ${gz_build_tests_LIB_DEPS} diff --git a/cmake/ignition-component-config.cmake.in b/cmake/ignition-component-config.cmake.in index 91c62de1..2977c5d8 100644 --- a/cmake/ignition-component-config.cmake.in +++ b/cmake/ignition-component-config.cmake.in @@ -111,4 +111,4 @@ set(@component_pkg_name@_LIBRARY @import_target_name@) # This macro is used by ignition-cmake to automatically configure the pkgconfig # files for ignition projects. -ign_pkg_config_entry(@component_pkg_name@ "@component_pkg_name@") +gz_pkg_config_entry(@component_pkg_name@ "@component_pkg_name@") diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 90abd1ac..93fb7537 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -23,8 +23,8 @@ set(example_directories if (NOT CMAKE_GENERATOR MATCHES "Visual Studio") list(APPEND example_directories use_component_depsA - use_component_depsB - use_component_depsC + #use_component_depsB + #use_component_depsC ) endif() @@ -169,12 +169,12 @@ foreach (build_type ${build_types}) if (TARGET use_component_depsA_${build_type}) add_dependencies(use_component_depsA_${build_type} comp_deps_${build_type}) endif() - if (TARGET use_component_depsB_${build_type}) - add_dependencies(use_component_depsB_${build_type} comp_deps_${build_type}) - endif() - if (TARGET use_component_depsC_${build_type}) - add_dependencies(use_component_depsC_${build_type} comp_deps_${build_type}) - endif() + #if (TARGET use_component_depsB_${build_type}) + # add_dependencies(use_component_depsB_${build_type} comp_deps_${build_type}) + #endif() + #if (TARGET use_component_depsC_${build_type}) + # add_dependencies(use_component_depsC_${build_type} comp_deps_${build_type}) + #endif() endforeach() # test that core_child pkg-config file requires core_nodep @@ -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 17618fb2..5668fb33 100644 --- a/examples/comp_deps/CMakeLists.txt +++ b/examples/comp_deps/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) project(ignition-component_deps VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) -ign_configure_project() +gz_configure_project() gz_configure_build(QUIT_IF_BUILD_ERRORS COMPONENTS child parent) gz_create_packages() diff --git a/examples/comp_deps/child/CMakeLists.txt b/examples/comp_deps/child/CMakeLists.txt index 657fb934..e7c94679 100644 --- a/examples/comp_deps/child/CMakeLists.txt +++ b/examples/comp_deps/child/CMakeLists.txt @@ -1,5 +1,5 @@ -ign_add_component(child INTERFACE +gz_add_component(child INTERFACE DEPENDS_ON_COMPONENTS parent GET_TARGET_NAME child) diff --git a/examples/comp_deps/parent/CMakeLists.txt b/examples/comp_deps/parent/CMakeLists.txt index 793f7ea1..f38ec3c1 100644 --- a/examples/comp_deps/parent/CMakeLists.txt +++ b/examples/comp_deps/parent/CMakeLists.txt @@ -1,5 +1,5 @@ -ign_add_component(parent INTERFACE +gz_add_component(parent INTERFACE GET_TARGET_NAME parent) install( diff --git a/examples/core_child/CMakeLists.txt b/examples/core_child/CMakeLists.txt index e7fdd805..354bf802 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) find_package(ignition-cmake3 REQUIRED) -ign_configure_project() -ign_find_package(ignition-core_no_deps REQUIRED) +gz_configure_project() +gz_find_package(ignition-core_no_deps REQUIRED) gz_configure_build(QUIT_IF_BUILD_ERRORS) gz_create_packages() gz_create_docs(TAGFILES "${IGNITION-CORE_NO_DEPS_DOXYGEN_TAGFILE} = ${IGNITION-CORE_NO_DEPS_API_URL}") diff --git a/examples/core_child_private/CMakeLists.txt b/examples/core_child_private/CMakeLists.txt index 0f6f8bd0..0c8b0c81 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) find_package(ignition-cmake3 REQUIRED) -ign_configure_project() -ign_find_package(ignition-core_no_deps PRIVATE REQUIRED) +gz_configure_project() +gz_find_package(ignition-core_no_deps PRIVATE REQUIRED) gz_configure_build(QUIT_IF_BUILD_ERRORS) gz_create_packages() gz_create_docs(TAGFILES "${IGNITION-CORE_NO_DEPS_DOXYGEN_TAGFILE} = ${IGNITION-CORE_NO_DEPS_API_URL}") diff --git a/examples/core_nodep/CMakeLists.txt b/examples/core_nodep/CMakeLists.txt index e048bcd2..25f00d7e 100644 --- a/examples/core_nodep/CMakeLists.txt +++ b/examples/core_nodep/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) project(ignition-core_no_deps VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) -ign_configure_project() +gz_configure_project() gz_configure_build(QUIT_IF_BUILD_ERRORS) gz_create_packages() gz_create_docs() diff --git a/examples/core_nodep_static/CMakeLists.txt b/examples/core_nodep_static/CMakeLists.txt index c6802ebd..75361f28 100644 --- a/examples/core_nodep_static/CMakeLists.txt +++ b/examples/core_nodep_static/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) project(ignition-core_no_deps_static VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) -ign_configure_project() +gz_configure_project() OPTION(BUILD_SHARED_LIBS OFF) gz_configure_build(QUIT_IF_BUILD_ERRORS) gz_create_packages() diff --git a/examples/core_static_child/CMakeLists.txt b/examples/core_static_child/CMakeLists.txt index 86632107..693290c6 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) find_package(ignition-cmake3 REQUIRED) -ign_configure_project() -ign_find_package(ignition-core_no_deps_static REQUIRED) +gz_configure_project() +gz_find_package(ignition-core_no_deps_static REQUIRED) gz_configure_build(QUIT_IF_BUILD_ERRORS) gz_create_packages() gz_create_docs(TAGFILES "${IGNITION-CORE_NO_DEPS_STATIC_DOXYGEN_TAGFILE} = ${IGNITION-CORE_NO_DEPS_STATIC_API_URL}") diff --git a/examples/find_ogre2/ogre-2.1/CMakeLists.txt b/examples/find_ogre2/ogre-2.1/CMakeLists.txt index a465a5cf..9a3e67b7 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(ignition-cmake3 REQUIRED) message(STATUS "Finding OGRE 2.1") -ign_find_package(IgnOGRE2 VERSION 2.1.0 +gz_find_package(IgnOGRE2 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 7e1044eb..69a4b39c 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(ignition-cmake3 REQUIRED) message(STATUS "Finding OGRE 2.2") -ign_find_package(IgnOGRE2 VERSION 2.2.0 +gz_find_package(IgnOGRE2 VERSION 2.2.0 COMPONENTS HlmsPbs HlmsUnlit Overlay) message(STATUS "OGRE2_FOUND: " ${OGRE2_FOUND}) diff --git a/examples/ign_conf/CMakeLists.txt b/examples/ign_conf/CMakeLists.txt index 372304ef..91530c0a 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) find_package(ignition-cmake3 REQUIRED) -ign_configure_project() +gz_configure_project() gz_configure_build(QUIT_IF_BUILD_ERRORS) diff --git a/examples/no_ignition_prefix/CMakeLists.txt b/examples/no_ignition_prefix/CMakeLists.txt index 092a6114..5c71cfaf 100644 --- a/examples/no_ignition_prefix/CMakeLists.txt +++ b/examples/no_ignition_prefix/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) project(no_ignition_prefix VERSION 0.1.0) find_package(ignition-cmake3 REQUIRED) -ign_configure_project( +gz_configure_project( NO_IGNITION_PREFIX REPLACE_IGNITION_INCLUDE_PATH no_ign) gz_configure_build(QUIT_IF_BUILD_ERRORS) diff --git a/examples/no_ignition_prefix/README.md b/examples/no_ignition_prefix/README.md index 85c07d37..e1d59f7f 100644 --- a/examples/no_ignition_prefix/README.md +++ b/examples/no_ignition_prefix/README.md @@ -2,7 +2,7 @@ ## Configuring project name -This package uses the `NO_IGNITION_PREFIX` option in `ign_configure_project` +This package uses the `NO_IGNITION_PREFIX` option in `gz_configure_project` to allow a cmake package name without the `ignition-` prefix. To confirm, configure this package and `package_source` and then observe that the tarball, @@ -21,7 +21,7 @@ make package_source ## Configuring include directory names -This package uses the `REPLACE_IGNITION_INCLUDE_PATH` option in `ign_configure_project` +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 confirm, build the package and observe that `AlmostEmpty.cc` compiles successfully while including `no_ign/Export.hh`: diff --git a/examples/prerelease/CMakeLists.txt b/examples/prerelease/CMakeLists.txt index 8aed12f3..f081646a 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) find_package(ignition-cmake3 REQUIRED) -ign_configure_project(VERSION_SUFFIX pre1) +gz_configure_project(VERSION_SUFFIX pre1) gz_configure_build(QUIT_IF_BUILD_ERRORS) diff --git a/examples/sanitizers/CMakeLists.txt b/examples/sanitizers/CMakeLists.txt index 9071c98f..f581e9b8 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) find_package(ignition-cmake3 REQUIRED) -ign_configure_project() +gz_configure_project() gz_configure_build(QUIT_IF_BUILD_ERRORS) diff --git a/examples/sanitizers/src/CMakeLists.txt b/examples/sanitizers/src/CMakeLists.txt index 7de535cc..e7fb9923 100644 --- a/examples/sanitizers/src/CMakeLists.txt +++ b/examples/sanitizers/src/CMakeLists.txt @@ -1,3 +1,3 @@ gz_get_libsources_and_unittests(sources gtest_sources) -ign_add_executable(asanfail ${sources}) +gz_add_executable(asanfail ${sources}) add_test(asan asanfail) diff --git a/examples/use_component_depsA/CMakeLists.txt b/examples/use_component_depsA/CMakeLists.txt index 7b499fdd..9ac3fc09 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) find_package(ignition-cmake3 REQUIRED) -ign_configure_project() -ign_find_package(ignition-component_deps REQUIRED COMPONENTS parent child) +gz_configure_project() +gz_find_package(ignition-component_deps REQUIRED COMPONENTS parent child) gz_configure_build(QUIT_IF_BUILD_ERRORS) gz_create_packages() gz_create_docs() diff --git a/examples/use_component_depsA/README.md b/examples/use_component_depsA/README.md index dc3e774e..165323aa 100644 --- a/examples/use_component_depsA/README.md +++ b/examples/use_component_depsA/README.md @@ -1,5 +1,5 @@ # use\_component\_depsA This package uses the `child` and `parent` components of `component\_deps` -and calls `ign_find_package` with the components specified +and calls `gz_find_package` with the components specified in the order `parent child`. diff --git a/examples/use_component_depsB/CMakeLists.txt b/examples/use_component_depsB/CMakeLists.txt index f73038bc..d9e3fdb8 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) find_package(ignition-cmake3 REQUIRED) -ign_configure_project() -ign_find_package(ignition-component_deps REQUIRED COMPONENTS child parent) +gz_configure_project() +gz_find_package(ignition-component_deps REQUIRED COMPONENTS child parent) gz_configure_build(QUIT_IF_BUILD_ERRORS) gz_create_packages() gz_create_docs() diff --git a/examples/use_component_depsB/README.md b/examples/use_component_depsB/README.md index 5102107a..641122a2 100644 --- a/examples/use_component_depsB/README.md +++ b/examples/use_component_depsB/README.md @@ -1,7 +1,7 @@ # use\_component\_depsB This package uses the `child` and `parent` components of `component\_deps` -and calls `ign_find_package` with the components specified +and calls `gz_find_package` with the components specified in the order `child parent`. Aside from the order in which the components are specified, this package is identical to `use_component_depsA`. diff --git a/examples/use_component_depsC/CMakeLists.txt b/examples/use_component_depsC/CMakeLists.txt index 380da940..66cf25e5 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) find_package(ignition-cmake3 REQUIRED) -ign_configure_project() -ign_find_package(ignition-component_deps REQUIRED COMPONENTS child) +gz_configure_project() +gz_find_package(ignition-component_deps REQUIRED COMPONENTS child) gz_configure_build(QUIT_IF_BUILD_ERRORS) gz_create_packages() gz_create_docs() diff --git a/examples/use_config_ifp/CMakeLists.txt b/examples/use_config_ifp/CMakeLists.txt index fff895e4..30b982d4 100644 --- a/examples/use_config_ifp/CMakeLists.txt +++ b/examples/use_config_ifp/CMakeLists.txt @@ -3,20 +3,20 @@ project(ignition-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) +#gz_find_package(ignition-find_config) will search for Findignition-find_config.cmake before ignition-find_configConfig.cmake +gz_find_package(ignition-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") + message(SEND_ERROR "Couldn't find correct package in MODULE mode.\ngz_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) +#After CONFIG arguemnt gz_find_package will skip MODULE mode and search for ignition-find_configConfig.cmake directly +gz_find_package(ignition-find_config CONFIG) if(CONFIG_TEST MATCHES "The package was found using CONFIG mode") message(STATUS "The package was found using CONFIG mode") else() - message(SEND_ERROR "Couldn't find correct package in CONFIG mode.\nign_find_package CONFIG test failed") + message(SEND_ERROR "Couldn't find correct package in CONFIG mode.\ngz_find_package CONFIG test failed") endif() -ign_configure_project() +gz_configure_project() gz_configure_build(QUIT_IF_BUILD_ERRORS) gz_create_packages()