Skip to content

Commit

Permalink
Migrate build files
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed Apr 30, 2022
1 parent 7e8460a commit 724125f
Show file tree
Hide file tree
Showing 17 changed files with 55 additions and 34 deletions.
20 changes: 10 additions & 10 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ PROJECT_PATCH = 0
# Generates config.hh based on the version numbers in CMake code.
ign_config_header(
name = "config",
src = "include/ignition/common/config.hh.in",
src = "include/gz/common/config.hh.in",
cmakelists = ["CMakeLists.txt"],
project_name = PROJECT_NAME,
project_version = (PROJECT_MAJOR, PROJECT_MINOR, PROJECT_PATCH),
)

ign_export_header(
name = "include/ignition/common/Export.hh",
name = "include/gz/common/Export.hh",
export_base = "IGNITION_COMMON",
lib_name = "ignition-common",
visibility = ["//visibility:private"],
)

public_headers_no_gen = glob([
"include/ignition/common/*.hh",
"include/ignition/common/detail/*.hh",
"include/gz/common/*.hh",
"include/gz/common/detail/*.hh",
])

private_headers = [
Expand All @@ -58,17 +58,17 @@ sources = glob(

generate_include_header(
name = "commonhh_genrule",
out = "include/ignition/common.hh",
out = "include/gz/common.hh",
hdrs = public_headers_no_gen + [
"include/ignition/common/config.hh",
"include/ignition/common/Export.hh",
"include/gz/common/config.hh",
"include/gz/common/Export.hh",
],
)

public_headers = public_headers_no_gen + [
"include/ignition/common/config.hh",
"include/ignition/common/Export.hh",
"include/ignition/common.hh",
"include/gz/common/config.hh",
"include/gz/common/Export.hh",
"include/gz/common.hh",
]

cc_library(
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR})
#============================================================================
# Configure the project
#============================================================================
ign_configure_project(VERSION_SUFFIX pre1)
ign_configure_project(
REPLACE_IGNITION_INCLUDE_PATH gz/common
VERSION_SUFFIX pre1)

#============================================================================
# Set project-specific options
Expand Down
14 changes: 7 additions & 7 deletions av/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ package(
)

public_headers_no_gen = glob([
"include/ignition/common/*.hh",
"include/ignition/common/**/*.hh",
"include/gz/common/*.hh",
"include/gz/common/**/*.hh",
])

sources = glob(
Expand All @@ -30,23 +30,23 @@ sources = glob(
test_sources = glob(["src/*_TEST.cc"])

ign_export_header(
name = "include/ignition/common/av/Export.hh",
name = "include/gz/common/av/Export.hh",
export_base = "IGNITION_COMMON_AV",
lib_name = "ignition-common-av",
visibility = ["//visibility:private"],
)

generate_include_header(
name = "eventshh_genrule",
out = "include/ignition/common/av.hh",
out = "include/gz/common/av.hh",
hdrs = public_headers_no_gen + [
"include/ignition/common/av/Export.hh",
"include/gz/common/av/Export.hh",
],
)

public_headers = public_headers_no_gen + [
"include/ignition/common/av/Export.hh",
"include/ignition/common/av.hh",
"include/gz/common/av/Export.hh",
"include/gz/common/av.hh",
]

cc_library(
Expand Down
2 changes: 2 additions & 0 deletions av/include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_subdirectory(gz)
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL} PATTERN "HWEncoder\.hh" EXCLUDE)
1 change: 1 addition & 0 deletions av/include/gz/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(common)
2 changes: 2 additions & 0 deletions events/include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_subdirectory(gz)
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
1 change: 1 addition & 0 deletions events/include/gz/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(common)
2 changes: 2 additions & 0 deletions geospatial/include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_subdirectory(gz)
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
1 change: 1 addition & 0 deletions geospatial/include/gz/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(common)
14 changes: 7 additions & 7 deletions graphics/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ package(
)

public_headers_no_gen = glob([
"include/ignition/common/*.hh",
"include/ignition/common/**/*.hh",
"include/gz/common/*.hh",
"include/gz/common/**/*.hh",
])

sources = glob(
Expand All @@ -27,23 +27,23 @@ sources = glob(
test_sources = glob(["src/*_TEST.cc"])

ign_export_header(
name = "include/ignition/common/graphics/Export.hh",
name = "include/gz/common/graphics/Export.hh",
export_base = "IGNITION_COMMON_GRAPHICS",
lib_name = "ignition-common-graphics",
visibility = ["//visibility:private"],
)

generate_include_header(
name = "graphics_hh_genrule",
out = "include/ignition/common/graphics.hh",
out = "include/gz/common/graphics.hh",
hdrs = public_headers_no_gen + [
"include/ignition/common/graphics/Export.hh",
"include/gz/common/graphics/Export.hh",
],
)

public_headers = public_headers_no_gen + [
"include/ignition/common/graphics/Export.hh",
"include/ignition/common/graphics.hh",
"include/gz/common/graphics/Export.hh",
"include/gz/common/graphics.hh",
"src/tiny_obj_loader.h",
]

Expand Down
2 changes: 2 additions & 0 deletions graphics/include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_subdirectory(gz)
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
1 change: 1 addition & 0 deletions graphics/include/gz/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(common)
3 changes: 2 additions & 1 deletion include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
add_subdirectory(ignition)
add_subdirectory(gz)
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
12 changes: 6 additions & 6 deletions profiler/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package(
)

public_headers_no_gen = [
"include/ignition/common/Profiler.hh",
"include/gz/common/Profiler.hh",
]

sources = [
Expand Down Expand Up @@ -54,24 +54,24 @@ cmake_configure_file(
)

ign_export_header(
name = "include/ignition/common/profiler/Export.hh",
name = "include/gz/common/profiler/Export.hh",
export_base = "IGNITION_COMMON_PROFILER",
lib_name = "ignition-common-profiler",
visibility = ["//visibility:private"],
)

generate_include_header(
name = "profiler_hh_genrule",
out = "include/ignition/common/profiler.hh",
out = "include/gz/common/profiler.hh",
hdrs = public_headers_no_gen + [
"include/ignition/common/profiler/Export.hh",
"include/gz/common/profiler/Export.hh",
"include/RemoteryConfig.h",
],
)

public_headers = public_headers_no_gen + [
"include/ignition/common/profiler/Export.hh",
"include/ignition/common/profiler.hh",
"include/gz/common/profiler/Export.hh",
"include/gz/common/profiler.hh",
"src/ProfilerImpl.hh",
"src/RemoteryProfilerImpl.hh",
"include/RemoteryConfig.h",
Expand Down
7 changes: 5 additions & 2 deletions profiler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@

add_subdirectory(src)
# add_subdirectory(include)

install(
DIRECTORY include/
DIRECTORY include/ignition
DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})

install(
DIRECTORY include/gz
DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
2 changes: 2 additions & 0 deletions testing/include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_subdirectory(gz)
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
1 change: 1 addition & 0 deletions testing/include/gz/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(common)

0 comments on commit 724125f

Please sign in to comment.