Skip to content

Commit

Permalink
Update dependency CMake projects to gz (#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
chapulina authored Jun 25, 2022
1 parent aafcc64 commit 08ce894
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
22 changes: 11 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ set (BUILD_SDF ON CACHE INTERNAL "Build SDF" FORCE)

#################################################
# Find ign-cmake
find_package(ignition-cmake3 REQUIRED)
set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR})
find_package(gz-cmake3 REQUIRED)
set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR})

########################################
# Python interfaces vars
Expand Down Expand Up @@ -109,20 +109,20 @@ if (BUILD_SDF)
endif()

########################################
# Find ignition math
# Find gz math
# Set a variable for generating ProjectConfig.cmake
gz_find_package(ignition-math7 VERSION REQUIRED)
set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR})
gz_find_package(gz-math7 VERSION REQUIRED)
set(GZ_MATH_VER ${gz-math7_VERSION_MAJOR})

########################################
# Find ignition utils
gz_find_package(ignition-utils2 REQUIRED COMPONENTS cli)
set(IGN_UTILS_VER ${ignition-utils2_VERSION_MAJOR})
# Find gz utils
gz_find_package(gz-utils2 REQUIRED COMPONENTS cli)
set(GZ_UTILS_VER ${gz-utils2_VERSION_MAJOR})

########################################
# Find ignition common
gz_find_package(ignition-common5 COMPONENTS graphics REQUIRED_BY usd)
set(IGN_COMMON_VER ${ignition-common5_VERSION_MAJOR})
# Find gz common
gz_find_package(gz-common5 COMPONENTS graphics REQUIRED_BY usd)
set(GZ_COMMON_VER ${gz-common5_VERSION_MAJOR})

########################################
# Python interfaces
Expand Down
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ if (BUILD_TESTING)

target_link_libraries(sdformattest PRIVATE
${PROJECT_LIBRARY_TARGET_NAME}
ignition-utils${IGN_UTILS_VER}::ignition-utils${IGN_UTILS_VER}
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
)

set(python_tests
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ gz_create_core_library(SOURCES ${sources}

target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PUBLIC
ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER}
ignition-utils${IGN_UTILS_VER}::ignition-utils${IGN_UTILS_VER}
gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER}
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
PRIVATE
TINYXML2::TINYXML2
using_parser_urdf)
Expand Down
4 changes: 2 additions & 2 deletions usd/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ target_include_directories(${usd_target}

target_link_libraries(${usd_target}
PUBLIC
ignition-common${IGN_COMMON_VER}::ignition-common${IGN_COMMON_VER}
ignition-common${IGN_COMMON_VER}::graphics
gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER}
gz-common${GZ_COMMON_VER}::graphics
${PXR_LIBRARIES}
)

Expand Down
8 changes: 4 additions & 4 deletions usd/src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ if(TARGET ${usd_target})

target_link_libraries(sdf2usd
PUBLIC
ignition-utils${IGN_UTILS_VER}::ignition-utils${IGN_UTILS_VER}
ignition-utils${IGN_UTILS_VER}::cli
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
gz-utils${GZ_UTILS_VER}::cli
${usd_target}
)

Expand All @@ -26,8 +26,8 @@ if(TARGET ${usd_target})

target_link_libraries(usd2sdf
PUBLIC
ignition-utils${IGN_UTILS_VER}::ignition-utils${IGN_UTILS_VER}
ignition-utils${IGN_UTILS_VER}::cli
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
gz-utils${GZ_UTILS_VER}::cli
${usd_target}
)

Expand Down

0 comments on commit 08ce894

Please sign in to comment.