Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename CMake project to gz #420

Merged
merged 3 commits into from
Jun 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
load(
"//ign_bazel:build_defs.bzl",
"//gz_bazel:build_defs.bzl",
"IGNITION_FEATURES",
"IGNITION_VISIBILITY",
"cmake_configure_file",
"generate_include_header",
"ign_config_header",
"ign_export_header",
"gz_config_header",
"gz_export_header",
)

package(
Expand All @@ -17,7 +17,7 @@ licenses(["notice"])

exports_files(["LICENSE"])

PROJECT_NAME = "ignition-math"
PROJECT_NAME = "gz-math"

PROJECT_MAJOR = 7

Expand All @@ -26,15 +26,15 @@ PROJECT_MINOR = 0
PROJECT_PATCH = 0

# Generates config.hh based on the version numbers in CMake code.
ign_config_header(
gz_config_header(
name = "config",
src = "include/ignition/math/config.hh.in",
cmakelists = ["CMakeLists.txt"],
project_name = "ignition-math",
project_name = PROJECT_NAME,
project_version = (PROJECT_MAJOR, PROJECT_MINOR, PROJECT_PATCH),
)

ign_export_header(
gz_export_header(
name = "include/ignition/math/Export.hh",
export_base = "IGNITION_MATH",
lib_name = "ignition-math",
Expand Down Expand Up @@ -70,7 +70,7 @@ public_headers = public_headers_no_gen + [
]

cc_library(
name = "ign_math",
name = "gz_math",
srcs = sources + private_headers,
hdrs = public_headers,
includes = ["include"],
Expand All @@ -83,15 +83,15 @@ cc_binary(
linkopts = ["-Wl,-soname,libignition-math7.so"],
linkshared = True,
deps = [
":ign_math",
":gz_math",
],
)

[cc_test(
name = src.replace("/", "_").replace(".cc", "").replace("src_", ""),
srcs = [src],
deps = [
":ign_math",
":gz_math",
"@gtest",
"@gtest//:gtest_main",
],
Expand Down
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(ignition-math7 VERSION 7.0.0)
project(gz-math7 VERSION 7.0.0)

#============================================================================
# Find ignition-cmake
# Find gz-cmake
#============================================================================
# If you get an error at this line, you need to install ignition-cmake
find_package(ignition-cmake3 REQUIRED)
# If you get an error at this line, you need to install gz-cmake
find_package(gz-cmake3 REQUIRED)

#============================================================================
# Configure the project
Expand Down Expand Up @@ -41,9 +41,9 @@ option(USE_DIST_PACKAGES_FOR_PYTHON
#============================================================================

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

#--------------------------------------
# Find eigen3
Expand All @@ -69,7 +69,7 @@ if (SWIG_FOUND)
# Include ruby
find_package(Ruby 1.9 QUIET)
if (NOT RUBY_FOUND)
IGN_BUILD_WARNING("Ruby is missing: Install ruby-dev to enable ruby interface to ignition math.")
IGN_BUILD_WARNING("Ruby is missing: Install ruby-dev to enable ruby interfaces.")
message (STATUS "Searching for Ruby - not found.")
else()
message (STATUS "Searching for Ruby - found version ${RUBY_VERSION}.")
Expand Down
4 changes: 2 additions & 2 deletions eigen3/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load(
"//ign_bazel:build_defs.bzl",
"//gz_bazel:build_defs.bzl",
"IGNITION_ROOT",
"IGNITION_VISIBILITY",
)
Expand All @@ -21,7 +21,7 @@ cc_library(
includes = ["include"],
deps = [
"@eigen3",
IGNITION_ROOT + "ign_math",
IGNITION_ROOT + "gz_math",
],
)

Expand Down
48 changes: 24 additions & 24 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(ignition-math-examples)
project(gz-math-examples)

# Find the Ignition-Math library
find_package(ignition-math7 REQUIRED)
set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR})
find_package(gz-math7 REQUIRED)
set(GZ_MATH_VER ${gz-math7_VERSION_MAJOR})

add_executable(additively_separable_scalar_field3_example additively_separable_scalar_field3_example.cc)
target_link_libraries(additively_separable_scalar_field3_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(additively_separable_scalar_field3_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(angle_example angle_example.cc)
target_link_libraries(angle_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(angle_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(color_example color_example.cc)
target_link_libraries(color_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(color_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(diff_drive_odometry diff_drive_odometry.cc)
target_link_libraries(diff_drive_odometry ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(diff_drive_odometry gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(gauss_markov_process gauss_markov_process_example.cc)
target_link_libraries(gauss_markov_process ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(gauss_markov_process gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(graph_example graph_example.cc)
target_link_libraries(graph_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(graph_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(helpers_example helpers_example.cc)
target_link_libraries(helpers_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(helpers_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(interval_example interval_example.cc)
target_link_libraries(interval_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(interval_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(kmeans kmeans.cc)
target_link_libraries(kmeans ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(kmeans gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(matrix3_example matrix3_example.cc)
target_link_libraries(matrix3_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(matrix3_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(piecewise_scalar_field3_example piecewise_scalar_field3_example.cc)
target_link_libraries(piecewise_scalar_field3_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(piecewise_scalar_field3_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(polynomial3_example polynomial3_example.cc)
target_link_libraries(polynomial3_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(polynomial3_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(pose3_example pose3_example.cc)
target_link_libraries(pose3_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(pose3_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(quaternion_example quaternion_example.cc)
target_link_libraries(quaternion_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(quaternion_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(quaternion_from_euler quaternion_from_euler.cc)
target_link_libraries(quaternion_from_euler ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(quaternion_from_euler gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(quaternion_to_euler quaternion_to_euler.cc)
target_link_libraries(quaternion_to_euler ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(quaternion_to_euler gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(rand_example rand_example.cc)
target_link_libraries(rand_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(rand_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(region3_example region3_example.cc)
target_link_libraries(region3_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(region3_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(temperature_example temperature_example.cc)
target_link_libraries(temperature_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(temperature_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(triangle_example triangle_example.cc)
target_link_libraries(triangle_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(triangle_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})

add_executable(vector2_example vector2_example.cc)
target_link_libraries(vector2_example ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER})
target_link_libraries(vector2_example gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER})
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gz_create_core_library(SOURCES ${sources} CXX_STANDARD ${c++standard})

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

# Build the unit tests
Expand Down
3 changes: 2 additions & 1 deletion src/ruby/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ if (RUBY_FOUND)

SWIG_LINK_LIBRARIES(${SWIG_RB_LIB}
${RUBY_LIBRARY}
ignition-math${PROJECT_VERSION_MAJOR}
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
gz-math${PROJECT_VERSION_MAJOR}
)
target_compile_features(${SWIG_RB_LIB} PUBLIC ${IGN_CXX_${c++standard}_FEATURES})

Expand Down