Skip to content

Commit

Permalink
Rename CMake project to gz
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina authored and methylDragon committed Jun 20, 2022
1 parent f0ebc57 commit 682e642
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 46 deletions.
28 changes: 14 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(ignition-transport12 VERSION 12.0.0)
project(gz-transport12 VERSION 12.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)
set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR})
# If you get an error at this line, you need to install gz-cmake
find_package(gz-cmake3 REQUIRED)
set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR})

#============================================================================
# Configure the project
Expand All @@ -23,7 +23,7 @@ gz_configure_project(
# Set project-specific options
#============================================================================

# ignition-transport currently has no options that are unique to it
# gz-transport currently has no options that are unique to it

if (UNIX AND NOT APPLE)
set (EXTRA_TEST_LIB_DEPS stdc++fs)
Expand Down Expand Up @@ -77,14 +77,14 @@ else()
endif()

#--------------------------------------
# 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-msgs
gz_find_package(ignition-msgs9 REQUIRED)
set(IGN_MSGS_VER ${ignition-msgs9_VERSION_MAJOR})
# Find gz-msgs
gz_find_package(gz-msgs9 REQUIRED)
set(GZ_MSGS_VER ${gz-msgs9_VERSION_MAJOR})

#--------------------------------------
# Find ifaddrs
Expand All @@ -96,8 +96,8 @@ else ()
endif()

#--------------------------------------
# Find ignition-tools
gz_find_package(ignition-tools2 QUIET)
# Find gz-tools
gz_find_package(gz-tools2 QUIET)

#--------------------------------------
# Find SQLite3
Expand Down
56 changes: 28 additions & 28 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)

project(ignition-transport-examples)
project(gz-transport-examples)

# Find the Ignition_Transport library
find_package(ignition-transport12 QUIET REQUIRED OPTIONAL_COMPONENTS log)
set(IGN_TRANSPORT_VER ${ignition-transport12_VERSION_MAJOR})
find_package(gz-transport12 QUIET REQUIRED OPTIONAL_COMPONENTS log)
set(GZ_TRANSPORT_VER ${gz-transport12_VERSION_MAJOR})

if (EXISTS "${CMAKE_SOURCE_DIR}/msgs/")
# Message generation. Only required when using custom Protobuf messages.
Expand All @@ -27,96 +27,96 @@ if (EXISTS "${CMAKE_SOURCE_DIR}/bench.cc")
include_directories(SYSTEM ${gflags_INCLUDE_DIRS})
add_executable(bench bench.cc)
target_link_libraries(bench
ignition-transport${IGN_TRANSPORT_VER}::core
gz-transport${GZ_TRANSPORT_VER}::core
${gflags_LIBRARIES}
pthread)
endif()
endif()

if (NOT MSVC AND EXISTS "${CMAKE_SOURCE_DIR}/publisher_c.cc")
add_executable(publisher_c publisher_c.cc)
target_link_libraries(publisher_c ignition-transport${IGN_TRANSPORT_VER}::core)
target_link_libraries(publisher_c gz-transport${GZ_TRANSPORT_VER}::core)
endif()
if (NOT MSVC AND EXISTS "${CMAKE_SOURCE_DIR}/publisher_c_fast.cc")
add_executable(publisher_c_fast publisher_c_fast.cc)
target_link_libraries(publisher_c_fast ignition-transport${IGN_TRANSPORT_VER}::core)
target_link_libraries(publisher_c_fast gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/subscriber_c.cc")
add_executable(subscriber_c subscriber_c.cc)
target_link_libraries(subscriber_c ignition-transport${IGN_TRANSPORT_VER}::core)
target_link_libraries(subscriber_c gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (NOT MSVC AND EXISTS "${CMAKE_SOURCE_DIR}/subscriber_c_slow.cc")
add_executable(subscriber_c_slow subscriber_c_slow.cc)
target_link_libraries(subscriber_c_slow ignition-transport${IGN_TRANSPORT_VER}::core)
target_link_libraries(subscriber_c_slow gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/subscriber_stats.cc")
add_executable(subscriber_stats subscriber_stats.cc)
target_link_libraries(subscriber_stats ignition-transport${IGN_TRANSPORT_VER}::core)
target_link_libraries(subscriber_stats gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/publisher.cc")
add_executable(publisher publisher.cc)
target_link_libraries(publisher ignition-transport${IGN_TRANSPORT_VER}::core)
target_link_libraries(publisher gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/subscriber.cc")
add_executable(subscriber subscriber.cc)
target_link_libraries(subscriber ignition-transport${IGN_TRANSPORT_VER}::core)
target_link_libraries(subscriber gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/subscriber_generic.cc")
add_executable(subscriber_generic subscriber_generic.cc)
target_link_libraries(subscriber_generic
ignition-transport${IGN_TRANSPORT_VER}::core)
gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/responser.cc")
add_executable(responser responser.cc)
target_link_libraries(responser ignition-transport${IGN_TRANSPORT_VER}::core)
target_link_libraries(responser gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/requester.cc")
add_executable(requester requester.cc)
target_link_libraries(requester ignition-transport${IGN_TRANSPORT_VER}::core)
target_link_libraries(requester gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/requester_async.cc")
add_executable(requester_async requester_async.cc)
target_link_libraries(requester_async
ignition-transport${IGN_TRANSPORT_VER}::core)
gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/responser_oneway.cc")
add_executable(responser_oneway responser_oneway.cc)
target_link_libraries(responser_oneway
ignition-transport${IGN_TRANSPORT_VER}::core)
gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/requester_oneway.cc")
add_executable(requester_oneway requester_oneway.cc)
target_link_libraries(requester_oneway
ignition-transport${IGN_TRANSPORT_VER}::core)
gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/responser_no_input.cc")
add_executable(responser_no_input responser_no_input.cc)
target_link_libraries(responser_no_input
ignition-transport${IGN_TRANSPORT_VER}::core)
gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/requester_no_input.cc")
add_executable(requester_no_input requester_no_input.cc)
target_link_libraries(requester_no_input
ignition-transport${IGN_TRANSPORT_VER}::core)
gz-transport${GZ_TRANSPORT_VER}::core)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/requester_async_no_input.cc")
add_executable(requester_async_no_input requester_async_no_input.cc)
target_link_libraries(requester_async_no_input
ignition-transport${IGN_TRANSPORT_VER}::core)
gz-transport${GZ_TRANSPORT_VER}::core)
endif()

# FIXME(chapulina) Linking failure on Windows:
Expand All @@ -125,7 +125,7 @@ if (NOT MSVC AND TARGET protobuf_compilation AND
EXISTS "${CMAKE_SOURCE_DIR}/publisher_custom_msg.cc")
add_executable(publisher_custom_msg publisher_custom_msg.cc)
target_link_libraries(publisher_custom_msg
ignition-transport${IGN_TRANSPORT_VER}::core
gz-transport${GZ_TRANSPORT_VER}::core
${PROTO_SRC}
)
add_dependencies(publisher_custom_msg protobuf_compilation)
Expand All @@ -137,7 +137,7 @@ if (NOT MSVC AND TARGET protobuf_compilation AND
EXISTS "${CMAKE_SOURCE_DIR}/subscriber_custom_msg.cc")
add_executable(subscriber_custom_msg subscriber_custom_msg.cc)
target_link_libraries(subscriber_custom_msg
ignition-transport${IGN_TRANSPORT_VER}::core
gz-transport${GZ_TRANSPORT_VER}::core
${PROTO_SRC}
)
add_dependencies(subscriber_custom_msg protobuf_compilation)
Expand All @@ -146,38 +146,38 @@ endif()
if (EXISTS "${CMAKE_SOURCE_DIR}/publisher_raw.cc")
add_executable(publisher_raw publisher_raw.cc)
target_link_libraries(publisher_raw
ignition-transport${IGN_TRANSPORT_VER}::core
gz-transport${GZ_TRANSPORT_VER}::core
)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/subscriber_raw.cc")
add_executable(subscriber_raw subscriber_raw.cc)
target_link_libraries(subscriber_raw
ignition-transport${IGN_TRANSPORT_VER}::core
gz-transport${GZ_TRANSPORT_VER}::core
)
endif()

# Logging examples.
if (TARGET ignition-transport${IGN_TRANSPORT_VER}::log)
if (TARGET gz-transport${GZ_TRANSPORT_VER}::log)

if (EXISTS "${CMAKE_SOURCE_DIR}/record.cc")
add_executable(log_record record.cc)
target_link_libraries(log_record
ignition-transport${IGN_TRANSPORT_VER}::log
gz-transport${GZ_TRANSPORT_VER}::log
)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/playback.cc")
add_executable(log_playback playback.cc)
target_link_libraries(log_playback
ignition-transport${IGN_TRANSPORT_VER}::log
gz-transport${GZ_TRANSPORT_VER}::log
)
endif()

if (EXISTS "${CMAKE_SOURCE_DIR}/custom_query.cc")
add_executable(log_custom_query custom_query.cc)
target_link_libraries(log_custom_query
ignition-transport${IGN_TRANSPORT_VER}::log
gz-transport${GZ_TRANSPORT_VER}::log
)
endif()

Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ gz_create_core_library(SOURCES ${sources} CXX_STANDARD 17)
# Link the libraries that we always need.
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PUBLIC
ignition-utils${IGN_UTILS_VER}::ignition-utils${IGN_UTILS_VER}
ignition-msgs${IGN_MSGS_VER}::ignition-msgs${IGN_MSGS_VER}
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
gz-msgs${GZ_MSGS_VER}::gz-msgs${GZ_MSGS_VER}
CPPZMQ::CPPZMQ
PRIVATE
${ZeroMQ_TARGET}
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set(topic_executable ign-transport-topic)
add_executable(${topic_executable} topic_main.cc)
target_link_libraries(${topic_executable}
ign
ignition-utils${IGN_UTILS_VER}::cli
gz-utils${GZ_UTILS_VER}::cli
${PROJECT_LIBRARY_TARGET_NAME}
)
install(TARGETS ${topic_executable} DESTINATION ${IGN_LIB_INSTALL_DIR}/ignition/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}/)
Expand All @@ -29,7 +29,7 @@ set(service_executable ign-transport-service)
add_executable(${service_executable} service_main.cc)
target_link_libraries(${service_executable}
ign
ignition-utils${IGN_UTILS_VER}::cli
gz-utils${GZ_UTILS_VER}::cli
${PROJECT_LIBRARY_TARGET_NAME}
)
install(TARGETS ${service_executable} DESTINATION ${IGN_LIB_INSTALL_DIR}/ignition/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}/)
Expand Down

0 comments on commit 682e642

Please sign in to comment.