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 #414

Merged
merged 8 commits into from
Jun 26, 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
58 changes: 29 additions & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(ignition-gui7 VERSION 7.0.0)
project(gz-gui7 VERSION 7.0.0)

#============================================================================
# Find ignition-cmake
# Find gz-cmake
#============================================================================
find_package(ignition-cmake3 REQUIRED)
find_package(gz-cmake3 REQUIRED)

#============================================================================
# Configure the project
Expand Down Expand Up @@ -40,39 +40,39 @@ gz_find_package(IgnProtobuf
gz_find_package(TINYXML2 REQUIRED PRIVATE PRETTY tinyxml2)

#--------------------------------------
# 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 ignition-math
gz_find_package(ignition-math7 REQUIRED)
set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR})
# Find gz-math
gz_find_package(gz-math7 REQUIRED)
set(GZ_MATH_VER ${gz-math7_VERSION_MAJOR})

#--------------------------------------
# Find ignition-common
gz_find_package(ignition-common5 REQUIRED COMPONENTS profiler)
set(IGN_COMMON_VER ${ignition-common5_VERSION_MAJOR})
# Find gz-common
gz_find_package(gz-common5 REQUIRED COMPONENTS profiler)
set(GZ_COMMON_VER ${gz-common5_VERSION_MAJOR})

#--------------------------------------
# Find ignition-plugin
gz_find_package(ignition-plugin2 REQUIRED COMPONENTS loader register)
set(IGN_PLUGIN_VER ${ignition-plugin2_VERSION_MAJOR})
# Find gz-plugin
gz_find_package(gz-plugin2 REQUIRED COMPONENTS loader register)
set(GZ_PLUGIN_VER ${gz-plugin2_VERSION_MAJOR})

#--------------------------------------
# Find ignition-transport
gz_find_package(ignition-transport12 REQUIRED)
set(IGN_TRANSPORT_VER ${ignition-transport12_VERSION_MAJOR})
# Find gz-transport
gz_find_package(gz-transport12 REQUIRED)
set(GZ_TRANSPORT_VER ${gz-transport12_VERSION_MAJOR})

#--------------------------------------
# Find ignition-rendering
gz_find_package(ignition-rendering7 REQUIRED)
set(IGN_RENDERING_VER ${ignition-rendering7_VERSION_MAJOR})
# Find gz-rendering
gz_find_package(gz-rendering7 REQUIRED)
set(GZ_RENDERING_VER ${gz-rendering7_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 if gz command is available
Expand Down Expand Up @@ -119,11 +119,11 @@ gz_create_docs(
IMAGE_PATH_DIRS "${CMAKE_SOURCE_DIR}/tutorials/images"
TAGFILES
"${CMAKE_SOURCE_DIR}/doc/qt.tag.xml=http://doc.qt.io/qt-5/"
"${IGNITION-MATH_DOXYGEN_TAGFILE} = ${IGNITION-MATH_API_URL}"
"${IGNITION-MSGS_DOXYGEN_TAGFILE} = ${IGNITION-MSGS_API_URL}"
"${IGNITION-RENDERING_DOXYGEN_TAGFILE} = ${IGNITION-RENDERING_API_URL}"
"${IGNITION-TRANSPORT_DOXYGEN_TAGFILE} = ${IGNITION-TRANSPORT_API_URL}"
"${IGNITION-COMMON_DOXYGEN_TAGFILE} = ${IGNITION-COMMON_API_URL}"
"${GZ-MATH_DOXYGEN_TAGFILE} = ${GZ-MATH_API_URL}"
"${GZ-MSGS_DOXYGEN_TAGFILE} = ${GZ-MSGS_API_URL}"
"${GZ-RENDERING_DOXYGEN_TAGFILE} = ${GZ-RENDERING_API_URL}"
"${GZ-TRANSPORT_DOXYGEN_TAGFILE} = ${GZ-TRANSPORT_API_URL}"
"${GZ-COMMON_DOXYGEN_TAGFILE} = ${GZ-COMMON_API_URL}"
)

if(TARGET doc)
Expand Down
8 changes: 4 additions & 4 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ find_package(Doxygen)

set(IGNITION_DOXYGEN_TAGFILES
"\"${CMAKE_SOURCE_DIR}/doc/qt.tag.xml=http://doc.qt.io/qt-5/\" \
\"${IGNITION-MATH_DOXYGEN_TAGFILE} = ${IGNITION-MATH_API_URL}\" \
\"${IGNITION-MSGS_DOXYGEN_TAGFILE} = ${IGNITION-MSGS_API_URL}\" \
\"${IGNITION-TRANSPORT_DOXYGEN_TAGFILE} = ${IGNITION-TRANSPORT_API_URL}\" \
\"${IGNITION-COMMON_DOXYGEN_TAGFILE} = ${IGNITION-COMMON_API_URL}\""
\"${GZ-MATH_DOXYGEN_TAGFILE} = ${GZ-MATH_API_URL}\" \
\"${GZ-MSGS_DOXYGEN_TAGFILE} = ${GZ-MSGS_API_URL}\" \
\"${GZ-TRANSPORT_DOXYGEN_TAGFILE} = ${GZ-TRANSPORT_API_URL}\" \
\"${GZ-COMMON_DOXYGEN_TAGFILE} = ${GZ-COMMON_API_URL}\""
)

if (DOXYGEN_FOUND)
Expand Down
24 changes: 5 additions & 19 deletions examples/plugin/custom_context_menu/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)

project(ignition-gui-custom-context-menu)
project(gz-gui-custom-context-menu)

if(POLICY CMP0100)
cmake_policy(SET CMP0100 NEW)
Expand All @@ -18,34 +18,20 @@ find_package (Qt5
)

# Find the Gazebo GUI library
find_package(ignition-gui7 REQUIRED)
find_package(ignition-common5 REQUIRED)
find_package(gz-gui7 REQUIRED)
set(GZ_GUI_VER ${gz-gui7_VERSION_MAJOR})

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IGNITION-GUI_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GZ-GUI_CXX_FLAGS}")

QT5_ADD_RESOURCES(resources_RCC CustomContext.qrc)

include_directories(SYSTEM
${IGNITION-COMMON_INCLUDE_DIRS}
${IGNITION-GUI_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Qml_INCLUDE_DIRS}
${Qt5Quick_INCLUDE_DIRS}
${Qt5QuickControls2_INCLUDE_DIRS}
)

link_directories(
${IGNITION-COMMON_LIBRARY_DIRS}
${IGNITION-GUI_LIBRARY_DIRS}
)

# Generate examples
add_library(CustomContext SHARED ${headers_MOC}
CustomContext.cc
${resources_RCC}
)
target_link_libraries(CustomContext
${IGNITION-GUI_LIBRARIES}
gz-gui${GZ_GUI_VER}::gz-gui${GZ_GUI_VER}
${Qt5Core_LIBRARIES}
${Qt5Qml_LIBRARIES}
${Qt5Quick_LIBRARIES}
Expand Down
24 changes: 5 additions & 19 deletions examples/plugin/dialog_from_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)

project(ignition-gui-dialog-from-plugin)
project(gz-gui-dialog-from-plugin)

if(POLICY CMP0100)
cmake_policy(SET CMP0100 NEW)
Expand All @@ -18,34 +18,20 @@ find_package (Qt5
)

# Find the Gazebo GUI library
find_package(ignition-gui7 REQUIRED)
find_package(ignition-common5 REQUIRED)
find_package(gz-gui7 REQUIRED)
set(GZ_GUI_VER ${gz-gui7_VERSION_MAJOR})

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IGNITION-GUI_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GZ-GUI_CXX_FLAGS}")

QT5_ADD_RESOURCES(resources_RCC DialogFromPlugin.qrc)

include_directories(SYSTEM
${IGNITION-COMMON_INCLUDE_DIRS}
${IGNITION-GUI_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Qml_INCLUDE_DIRS}
${Qt5Quick_INCLUDE_DIRS}
${Qt5QuickControls2_INCLUDE_DIRS}
)

link_directories(
${IGNITION-COMMON_LIBRARY_DIRS}
${IGNITION-GUI_LIBRARY_DIRS}
)

# Generate examples
add_library(DialogFromPlugin SHARED ${headers_MOC}
DialogFromPlugin.cc
${resources_RCC}
)
target_link_libraries(DialogFromPlugin
${IGNITION-GUI_LIBRARIES}
gz-gui${GZ_GUI_VER}::gz-gui${GZ_GUI_VER}
${Qt5Core_LIBRARIES}
${Qt5Qml_LIBRARIES}
${Qt5Quick_LIBRARIES}
Expand Down
20 changes: 5 additions & 15 deletions examples/plugin/gz_components/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)

project(ignition-gui-ign-components)
project(gz-gui-gz-components)

if(POLICY CMP0100)
cmake_policy(SET CMP0100 NEW)
Expand All @@ -16,30 +16,20 @@ find_package (Qt5
REQUIRED
)

find_package(ignition-gui7 REQUIRED)
find_package(ignition-common5 REQUIRED)
find_package(gz-gui7 REQUIRED)
set(GZ_GUI_VER ${gz-gui7_VERSION_MAJOR})

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IGNITION-GUI_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GZ-GUI_CXX_FLAGS}")

QT5_ADD_RESOURCES(resources_RCC GzComponents.qrc)

include_directories(SYSTEM
${IGNITION-COMMON_INCLUDE_DIRS}
${IGNITION-GUI_INCLUDE_DIRS}
)

link_directories(
${IGNITION-COMMON_LIBRARY_DIRS}
${IGNITION-GUI_LIBRARY_DIRS}
)

# Generate examples
add_library(GzComponents SHARED ${headers_MOC}
GzComponents.cc
${resources_RCC}
)
target_link_libraries(GzComponents
${IGNITION-GUI_LIBRARIES}
gz-gui${GZ_GUI_VER}::gz-gui${GZ_GUI_VER}
${Qt5Core_LIBRARIES}
${Qt5Qml_LIBRARIES}
${Qt5Quick_LIBRARIES}
Expand Down
24 changes: 5 additions & 19 deletions examples/plugin/hello_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)

project(ignition-gui-hello-plugin)
project(gz-gui-hello-plugin)

if(POLICY CMP0100)
cmake_policy(SET CMP0100 NEW)
Expand All @@ -18,34 +18,20 @@ find_package (Qt5
)

# Find the Gazebo GUI library
find_package(ignition-gui7 REQUIRED)
find_package(ignition-common5 REQUIRED)
find_package(gz-gui7 REQUIRED)
set(GZ_GUI_VER ${gz-gui7_VERSION_MAJOR})

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IGNITION-GUI_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GZ-GUI_CXX_FLAGS}")

QT5_ADD_RESOURCES(resources_RCC hello.qrc)

include_directories(SYSTEM
${IGNITION-COMMON_INCLUDE_DIRS}
${IGNITION-GUI_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Qml_INCLUDE_DIRS}
${Qt5Quick_INCLUDE_DIRS}
${Qt5QuickControls2_INCLUDE_DIRS}
)

link_directories(
${IGNITION-COMMON_LIBRARY_DIRS}
${IGNITION-GUI_LIBRARY_DIRS}
)

# Generate examples
add_library(HelloPlugin SHARED ${headers_MOC}
HelloPlugin.cc
${resources_RCC}
)
target_link_libraries(HelloPlugin
${IGNITION-GUI_LIBRARIES}
gz-gui${GZ_GUI_VER}::gz-gui${GZ_GUI_VER}
${Qt5Core_LIBRARIES}
${Qt5Qml_LIBRARIES}
${Qt5Quick_LIBRARIES}
Expand Down
24 changes: 5 additions & 19 deletions examples/plugin/multiple_qml/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)

project(ignition-gui-multiple-qml)
project(gz-gui-multiple-qml)

if(POLICY CMP0100)
cmake_policy(SET CMP0100 NEW)
Expand All @@ -18,34 +18,20 @@ find_package (Qt5
)

# Find the Gazebo GUI library
find_package(ignition-gui7 REQUIRED)
find_package(ignition-common5 REQUIRED)
find_package(gz-gui7 REQUIRED)
set(GZ_GUI_VER ${gz-gui7_VERSION_MAJOR})

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IGNITION-GUI_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GZ-GUI_CXX_FLAGS}")

QT5_ADD_RESOURCES(resources_RCC MultipleQml.qrc)

include_directories(SYSTEM
${IGNITION-COMMON_INCLUDE_DIRS}
${IGNITION-GUI_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Qml_INCLUDE_DIRS}
${Qt5Quick_INCLUDE_DIRS}
${Qt5QuickControls2_INCLUDE_DIRS}
)

link_directories(
${IGNITION-COMMON_LIBRARY_DIRS}
${IGNITION-GUI_LIBRARY_DIRS}
)

# Generate examples
add_library(MultipleQml SHARED ${headers_MOC}
MultipleQml.cc
${resources_RCC}
)
target_link_libraries(MultipleQml
${IGNITION-GUI_LIBRARIES}
gz-gui${GZ_GUI_VER}::gz-gui${GZ_GUI_VER}
${Qt5Core_LIBRARIES}
${Qt5Qml_LIBRARIES}
${Qt5Quick_LIBRARIES}
Expand Down
21 changes: 5 additions & 16 deletions examples/standalone/custom_drawer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)

project(ignition-gui-custom-drawer)
project(gz-gui-custom-drawer)

if(POLICY CMP0100)
cmake_policy(SET CMP0100 NEW)
Expand All @@ -18,31 +18,20 @@ find_package (Qt5
)

# Find the Gazebo GUI library
find_package(ignition-gui7 REQUIRED)
find_package(gz-gui7 REQUIRED)
set(GZ_GUI_VER ${gz-gui7_VERSION_MAJOR})

QT5_ADD_RESOURCES(resources_RCC custom_drawer.qrc)

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IGNITION-GUI_CXX_FLAGS}")

include_directories(SYSTEM
${IGNITION-GUI_INCLUDE_DIRS}
${Qt5Core_INCLUDE_DIRS}
${Qt5Qml_INCLUDE_DIRS}
${Qt5Quick_INCLUDE_DIRS}
${Qt5QuickControls2_INCLUDE_DIRS}
)

link_directories(
${IGNITION-GUI_LIBRARY_DIRS}
)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GZ-GUI_CXX_FLAGS}")

# Generate example
add_executable(custom_drawer
custom_drawer.cc
${resources_RCC}
)
target_link_libraries(custom_drawer
${IGNITION-GUI_LIBRARIES}
gz-gui${GZ_GUI_VER}::gz-gui${GZ_GUI_VER}
${Qt5Core_LIBRARIES}
${Qt5Qml_LIBRARIES}
${Qt5Quick_LIBRARIES}
Expand Down
Loading