From fc7df0e256d3d5ea478e67ec4e44874ba2de20d3 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Thu, 16 Jun 2022 14:20:45 -0700 Subject: [PATCH] [ign -> gz] CMake functions Signed-off-by: Louise Poubel --- CMakeLists.txt | 26 +++++++++++++------------- conf/CMakeLists.txt | 4 ++-- conf/fuel.yaml.in | 2 +- include/gz/fuel_tools/CMakeLists.txt | 2 +- src/CMakeLists.txt | 6 +++--- test/integration/CMakeLists.txt | 2 +- test/performance/CMakeLists.txt | 2 +- test/regression/CMakeLists.txt | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f226037..587ec4bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR}) #============================================================================ # Configure the project #============================================================================ -ign_configure_project( +gz_configure_project( REPLACE_IGNITION_INCLUDE_PATH gz/fuel_tools VERSION_SUFFIX pre1) @@ -29,42 +29,42 @@ ign_configure_project( #-------------------------------------- # Find Tinyxml2 -ign_find_package(TINYXML2 REQUIRED PRIVATE PRETTY tinyxml2) +gz_find_package(TINYXML2 REQUIRED PRIVATE PRETTY tinyxml2) #-------------------------------------- # Find libcurl -ign_find_package(IgnCURL REQUIRED PRIVATE PRETTY curl) +gz_find_package(IgnCURL REQUIRED PRIVATE PRETTY curl) #-------------------------------------- # Find jsoncpp -ign_find_package(JSONCPP REQUIRED PRIVATE) +gz_find_package(JSONCPP REQUIRED PRIVATE) #-------------------------------------- # Find libyaml -ign_find_package(YAML REQUIRED PRIVATE) +gz_find_package(YAML REQUIRED PRIVATE) #-------------------------------------- # Find libzip -ign_find_package(ZIP REQUIRED PRIVATE) +gz_find_package(ZIP REQUIRED PRIVATE) #-------------------------------------- # Find ignition-utils -ign_find_package(ignition-utils2 REQUIRED) +gz_find_package(ignition-utils2 REQUIRED) set(IGN_UTILS_VER ${ignition-utils2_VERSION_MAJOR}) #-------------------------------------- # Find ignition-common -ign_find_package(ignition-common5 REQUIRED PRIVATE) +gz_find_package(ignition-common5 REQUIRED PRIVATE) set(IGN_COMMON_MAJOR_VER ${ignition-common5_VERSION_MAJOR}) #-------------------------------------- # Find ignition-math -ign_find_package(ignition-math7 REQUIRED PRIVATE) +gz_find_package(ignition-math7 REQUIRED PRIVATE) set(IGN_MSGS_MAJOR_VER ${ignition-math7_VERSION_MAJOR}) #-------------------------------------- # Find ignition-msgs -ign_find_package(ignition-msgs9 REQUIRED PRIVATE) +gz_find_package(ignition-msgs9 REQUIRED PRIVATE) set(IGN_MSGS_MAJOR_VER ${ignition-msgs9_VERSION_MAJOR}) #-------------------------------------- @@ -74,7 +74,7 @@ find_program(HAVE_IGN_TOOLS ign) #============================================================================ # Configure the build #============================================================================ -ign_configure_build(QUIT_IF_BUILD_ERRORS) +gz_configure_build(QUIT_IF_BUILD_ERRORS) #============================================================================ # ign command line support @@ -84,7 +84,7 @@ add_subdirectory(conf) #============================================================================ # Create package information #============================================================================ -ign_create_packages() +gz_create_packages() #============================================================================ # Configure documentation @@ -92,7 +92,7 @@ ign_create_packages() configure_file(${CMAKE_SOURCE_DIR}/api.md.in ${CMAKE_BINARY_DIR}/api.md) configure_file(${CMAKE_SOURCE_DIR}/tutorials.md.in ${CMAKE_BINARY_DIR}/tutorials.md) -ign_create_docs( +gz_create_docs( API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md" TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md" TAGFILES diff --git a/conf/CMakeLists.txt b/conf/CMakeLists.txt index f7c8d22d..1d914cfd 100644 --- a/conf/CMakeLists.txt +++ b/conf/CMakeLists.txt @@ -1,4 +1,4 @@ -set(ign_library_path "${CMAKE_BINARY_DIR}/src/cmd/cmdfuel${PROJECT_VERSION_MAJOR}") +set(gz_library_path "${CMAKE_BINARY_DIR}/src/cmd/cmdfuel${PROJECT_VERSION_MAJOR}") # Generate a configuration file for internal testing. # Note that the major version of the library is included in the name. @@ -7,7 +7,7 @@ configure_file( "fuel.yaml.in" "${CMAKE_BINARY_DIR}/test/conf/fuel${PROJECT_VERSION_MAJOR}.yaml" @ONLY) -set(ign_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/ignition/cmdfuel${PROJECT_VERSION_MAJOR}") +set(gz_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/ignition/cmdfuel${PROJECT_VERSION_MAJOR}") # Generate a configuration file. # Note that the major version of the library is included in the name. diff --git a/conf/fuel.yaml.in b/conf/fuel.yaml.in index 42fc39c9..f6709e2a 100644 --- a/conf/fuel.yaml.in +++ b/conf/fuel.yaml.in @@ -2,7 +2,7 @@ format: 1.0.0 library_name: @PROJECT_NAME_NO_VERSION@ library_version: @PROJECT_VERSION_FULL@ -library_path: @ign_library_path@ +library_path: @gz_library_path@ commands: - fuel : Manage simulation resources. --- diff --git a/include/gz/fuel_tools/CMakeLists.txt b/include/gz/fuel_tools/CMakeLists.txt index 439642e6..bf4411e8 100644 --- a/include/gz/fuel_tools/CMakeLists.txt +++ b/include/gz/fuel_tools/CMakeLists.txt @@ -1 +1 @@ -ign_install_all_headers() +gz_install_all_headers() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 57fcb8f7..a808e6cd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,7 +43,7 @@ if (HAVE_IGN_TOOLS) endif() # Create the library target. -ign_create_core_library(SOURCES ${sources} CXX_STANDARD 17) +gz_create_core_library(SOURCES ${sources} CXX_STANDARD 17) # Link the libraries that we always need. target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} @@ -58,14 +58,14 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME} ZIP::ZIP ) -ign_target_interface_include_directories(${PROJECT_LIBRARY_TARGET_NAME} +gz_target_interface_include_directories(${PROJECT_LIBRARY_TARGET_NAME} ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER} ignition-msgs${IGN_MSGS_MAJOR_VER}::ignition-msgs${IGN_MSGS_MAJOR_VER} ) # Build the unit tests. -ign_build_tests(TYPE UNIT +gz_build_tests(TYPE UNIT SOURCES ${gtest_sources} LIB_DEPS ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER} diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt index 18a5b8ae..0020feb9 100644 --- a/test/integration/CMakeLists.txt +++ b/test/integration/CMakeLists.txt @@ -7,7 +7,7 @@ set(tests include_directories(SYSTEM ${CMAKE_BINARY_DIR}/test/) link_directories(${PROJECT_BINARY_DIR}/test) -ign_build_tests(TYPE INTEGRATION +gz_build_tests(TYPE INTEGRATION SOURCES ${tests} LIB_DEPS ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER} ) diff --git a/test/performance/CMakeLists.txt b/test/performance/CMakeLists.txt index 7cf00db6..854be5c5 100644 --- a/test/performance/CMakeLists.txt +++ b/test/performance/CMakeLists.txt @@ -5,4 +5,4 @@ set(tests link_directories(${PROJECT_BINARY_DIR}/test) -ign_build_tests(TYPE PERFORMANCE SOURCES ${tests}) +gz_build_tests(TYPE PERFORMANCE SOURCES ${tests}) diff --git a/test/regression/CMakeLists.txt b/test/regression/CMakeLists.txt index ebbc7da6..aac9ecda 100644 --- a/test/regression/CMakeLists.txt +++ b/test/regression/CMakeLists.txt @@ -5,4 +5,4 @@ set(tests link_directories(${PROJECT_BINARY_DIR}/test) -ign_build_tests(TYPE REGRESSION SOURCES ${tests}) +gz_build_tests(TYPE REGRESSION SOURCES ${tests})