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

[ign -> gz] CMake functions #422

Merged
merged 1 commit into from
Jun 17, 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
28 changes: 14 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ find_package(ignition-cmake3 REQUIRED)
#============================================================================
# Configure the project
#============================================================================
ign_configure_project(
gz_configure_project(
REPLACE_IGNITION_INCLUDE_PATH gz/gui
VERSION_SUFFIX pre1)

Expand All @@ -30,48 +30,48 @@ message(STATUS "\n\n-- ====== Finding Dependencies ======")
#--------------------------------------
# Find Protobuf
set(REQ_PROTOBUF_VER 3)
ign_find_package(IgnProtobuf
gz_find_package(IgnProtobuf
VERSION ${REQ_PROTOBUF_VER}
REQUIRED
PRETTY Protobuf)

#--------------------------------------
# Find Tinyxml2
ign_find_package(TINYXML2 REQUIRED PRIVATE PRETTY tinyxml2)
gz_find_package(TINYXML2 REQUIRED PRIVATE PRETTY tinyxml2)

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

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

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

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

#--------------------------------------
# Find ignition-rendering
ign_find_package(ignition-rendering7 REQUIRED)
gz_find_package(ignition-rendering7 REQUIRED)
set(IGN_RENDERING_VER ${ignition-rendering7_VERSION_MAJOR})

#--------------------------------------
# Find ignition-msgs
ign_find_package(ignition-msgs9 REQUIRED)
gz_find_package(ignition-msgs9 REQUIRED)
set(IGN_MSGS_VER ${ignition-msgs9_VERSION_MAJOR})

#--------------------------------------
Expand All @@ -80,7 +80,7 @@ find_program(HAVE_IGN_TOOLS ign)

#--------------------------------------
# Find QT
ign_find_package (Qt5
gz_find_package (Qt5
COMPONENTS
Core
Quick
Expand All @@ -97,7 +97,7 @@ set(GZ_GUI_PLUGIN_INSTALL_DIR
#============================================================================
# Configure the build
#============================================================================
ign_configure_build(QUIT_IF_BUILD_ERRORS)
gz_configure_build(QUIT_IF_BUILD_ERRORS)

#============================================================================
# ign command line support
Expand All @@ -107,12 +107,12 @@ add_subdirectory(conf)
#============================================================================
# Create package information
#============================================================================
ign_create_packages()
gz_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"
ADDITIONAL_INPUT_DIRS "${CMAKE_SOURCE_DIR}/src/plugins"
Expand Down
4 changes: 2 additions & 2 deletions conf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(ign_library_path "${CMAKE_BINARY_DIR}/src/cmd/cmdgui${PROJECT_VERSION_MAJOR}")
set(gz_library_path "${CMAKE_BINARY_DIR}/src/cmd/cmdgui${PROJECT_VERSION_MAJOR}")

# Generate a configuration file for internal testing.
# Note that the major version of the library is included in the name.
Expand All @@ -7,7 +7,7 @@ configure_file(
"gui.yaml.in"
"${CMAKE_BINARY_DIR}/test/conf/gui${PROJECT_VERSION_MAJOR}.yaml" @ONLY)

set(ign_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/ignition/cmdgui${PROJECT_VERSION_MAJOR}")
set(gz_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/ignition/cmdgui${PROJECT_VERSION_MAJOR}")

# Generate a configuration file.
# Note that the major version of the library is included in the name.
Expand Down
2 changes: 1 addition & 1 deletion conf/gui.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -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:
- gui : Launch graphical interfaces.
---
4 changes: 2 additions & 2 deletions include/gz/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ set (resources resources.qrc)
QT5_WRAP_CPP(headers_MOC ${qt_headers})
QT5_ADD_RESOURCES(resources_RCC ${resources})

ign_create_core_library(SOURCES
gz_create_core_library(SOURCES
${sources}
${headers_MOC}
${resources_RCC}
Expand All @@ -67,5 +67,5 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
TINYXML2::TINYXML2
)

ign_install_all_headers()
gz_install_all_headers()

2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if (NOT HAVE_IGN_TOOLS OR APPLE)
list(REMOVE_ITEM gtest_sources ign_TEST.cc)
endif()

ign_build_tests(TYPE UNIT
gz_build_tests(TYPE UNIT
SOURCES
${gtest_sources}
LIB_DEPS
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function(gz_gui_add_plugin plugin_name)
)

if(gz_gui_add_plugin_TEST_SOURCES)
ign_build_tests(TYPE UNIT
gz_build_tests(TYPE UNIT
SOURCES
${gz_gui_add_plugin_TEST_SOURCES}
LIB_DEPS
Expand Down
4 changes: 2 additions & 2 deletions test/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ign_get_sources(tests)
gz_get_sources(tests)

find_package(Qt5Test REQUIRED)

ign_build_tests(
gz_build_tests(
TYPE INTEGRATION
SOURCES ${tests}
LIB_DEPS
Expand Down
4 changes: 2 additions & 2 deletions test/performance/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ign_get_sources(tests)
gz_get_sources(tests)

ign_build_tests(TYPE PERFORMANCE SOURCES ${tests})
gz_build_tests(TYPE PERFORMANCE SOURCES ${tests})
4 changes: 2 additions & 2 deletions test/regression/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ign_get_sources(tests)
gz_get_sources(tests)

ign_build_tests(TYPE REGRESSION SOURCES ${tests})
gz_build_tests(TYPE REGRESSION SOURCES ${tests})