Skip to content

Commit 06921ea

Browse files
committed
Migrate build files (#249)
Signed-off-by: methylDragon <methylDragon@gmail.com>
1 parent 8c77114 commit 06921ea

File tree

8 files changed

+24
-17
lines changed

8 files changed

+24
-17
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ find_package(ignition-cmake3 REQUIRED)
1414
#============================================================================
1515
# Configure the project
1616
#============================================================================
17-
ign_configure_project(VERSION_SUFFIX pre1)
17+
ign_configure_project(
18+
REPLACE_IGNITION_INCLUDE_PATH gz/msgs
19+
VERSION_SUFFIX pre1)
1820

1921
#============================================================================
2022
# Set project-specific options
@@ -115,7 +117,7 @@ configure_file(${CMAKE_SOURCE_DIR}/tutorials.md.in ${CMAKE_BINARY_DIR}/tutorials
115117
ign_create_docs(
116118
API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md"
117119
TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md"
118-
AUTOGENERATED_DOC "${CMAKE_BINARY_DIR}/include/ignition/msgs/"
120+
AUTOGENERATED_DOC "${CMAKE_BINARY_DIR}/include/gz/msgs/"
119121
TAGFILES
120122
"${IGNITION-MATH_DOXYGEN_TAGFILE} = ${IGNITION-MATH_API_URL}"
121123
)

conf/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ configure_file(
2020

2121
# Install the yaml configuration files in an unversioned location.
2222
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml
23-
DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/ignition/)
23+
DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gz/)

include/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
add_subdirectory(ignition/msgs)
1+
add_subdirectory(gz)
2+
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})

include/gz/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
add_subdirectory(msgs)

proto/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
install(
2+
DIRECTORY gz
3+
DESTINATION "${IGN_INCLUDE_INSTALL_DIR_FULL}"
4+
COMPONENT proto
5+
FILES_MATCHING PATTERN "*.proto")
16

27
install(
38
DIRECTORY ignition

src/CMakeLists.txt

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ endfunction()
100100

101101
##################################################
102102
# do the code generation
103-
file (GLOB proto_files ${PROJECT_SOURCE_DIR}/proto/ignition/msgs/*.proto)
103+
file (GLOB proto_files ${PROJECT_SOURCE_DIR}/proto/gz/msgs/*.proto)
104104

105105
foreach(proto_file ${proto_files})
106106
ign_msgs_protoc(
107107
PROTO_PACKAGE
108-
.ignition.msgs
108+
.gz.msgs
109109
GENERATE_CPP
110110
GENERATE_RUBY
111111
INPUT_PROTO
@@ -150,24 +150,22 @@ message(STATUS "Installing Ruby messages to ${CMAKE_INSTALL_PREFIX}/${IGN_LIB_IN
150150
install(FILES ${gen_ruby_scripts} DESTINATION ${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/ruby/ignition/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR})
151151

152152
ign_install_includes(
153-
"${IGN_INCLUDE_INSTALL_DIR_POSTFIX}/ignition/${IGN_DESIGNATION}"
153+
"${IGN_INCLUDE_INSTALL_DIR_POSTFIX}/gz/${IGN_DESIGNATION}"
154154
${gen_headers})
155155

156-
157156
##################################################
158-
# Generate ignition/msgs/MessageTypes.hh
157+
# Generate gz/msgs/MessageTypes.hh
159158
foreach (hdr ${gen_headers})
160159
string(REPLACE "${PROJECT_BINARY_DIR}/include/" "" hdr ${hdr})
161160
string(CONCAT ign_msgs_headers ${ign_msgs_headers} "#include <${hdr}>\n")
162161
endforeach()
163162

164163
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/MessageTypes.hh.in
165-
${PROJECT_BINARY_DIR}/include/ignition/msgs/MessageTypes.hh)
164+
${PROJECT_BINARY_DIR}/include/gz/msgs/MessageTypes.hh)
166165

167166
ign_install_includes(
168-
"${IGN_INCLUDE_INSTALL_DIR_POSTFIX}/ignition/${IGN_DESIGNATION}"
169-
"${PROJECT_BINARY_DIR}/include/ignition/${IGN_DESIGNATION}/MessageTypes.hh")
170-
167+
"${IGN_INCLUDE_INSTALL_DIR_POSTFIX}/gz/${IGN_DESIGNATION}"
168+
"${PROJECT_BINARY_DIR}/include/gz/${IGN_DESIGNATION}/MessageTypes.hh")
171169

172170
##################################################
173171
# Build the main library

test/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ MSGS_DIR = "./ign_msgs/"
2222
cmake_configure_file(
2323
name = "test_config",
2424
src = "test_config.h.in",
25-
out = "ignition/msgs/test_config.h",
25+
out = "gz/msgs/test_config.h",
2626
cmakelists = ["CMakeLists.txt"],
2727
defines = [
2828
"CMAKE_BINARY_DIR=%s" % (MSGS_DIR),
@@ -34,8 +34,8 @@ cmake_configure_file(
3434

3535
cc_library(
3636
name = "test_utils",
37-
srcs = ["ignition/msgs/test_config.h"],
38-
includes = [".", "ignition"],
37+
srcs = ["gz/msgs/test_config.h"],
38+
includes = [".", "gz"],
3939
)
4040

4141
[

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include_directories (
55
)
66

77
configure_file (test_config.h.in
8-
${PROJECT_BINARY_DIR}/include/ignition/msgs/test_config.h)
8+
${PROJECT_BINARY_DIR}/include/gz/msgs/test_config.h)
99

1010
# Build gtest
1111
add_library(gtest STATIC gtest/src/gtest-all.cc)

0 commit comments

Comments
 (0)