Skip to content

Commit

Permalink
Manual: Fix Examples
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed Apr 27, 2022
1 parent 8110dd3 commit eb3b748
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 23 deletions.
28 changes: 14 additions & 14 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (NOT WIN32 AND EXAMPLE_LCOV_PATH)
endif()

set(example_directories
ign_conf
gz_conf
no_gz_prefix
prerelease
core_nodep
Expand All @@ -31,36 +31,36 @@ endif()
foreach(example ${example_directories})
set(run_codecheck false)
if (${example} STREQUAL "gz_conf")
set(example_tarball_name gz-minimal-0.1.0.tar.bz2)
set(example_tarball_name ignition-minimal-0.1.0.tar.bz2)
elseif (${example} STREQUAL "no_gz_prefix")
set(example_tarball_name no_gz_prefix-0.1.0.tar.bz2)
elseif (${example} STREQUAL "prerelease")
set(example_tarball_name gz-minimal-1.0.0~pre1.tar.bz2)
set(example_tarball_name ignition-minimal-1.0.0~pre1.tar.bz2)
elseif (${example} STREQUAL "core_nodep")
set(example_tarball_name gz-core_no_deps-0.1.0.tar.bz2)
set(example_tarball_name ignition-core_no_deps-0.1.0.tar.bz2)
set(run_codecheck true)
elseif (${example} STREQUAL "core_nodep_static")
set(example_tarball_name gz-core_no_deps_static-0.1.0.tar.bz2)
set(example_tarball_name ignition-core_no_deps_static-0.1.0.tar.bz2)
set(run_codecheck true)
elseif (${example} STREQUAL "core_child")
set(example_tarball_name gz-core_child-0.1.0.tar.bz2)
set(example_tarball_name ignition-core_child-0.1.0.tar.bz2)
set(run_codecheck true)
elseif (${example} STREQUAL "core_child_private")
set(example_tarball_name gz-core_child_private-0.1.0.tar.bz2)
set(example_tarball_name ignition-core_child_private-0.1.0.tar.bz2)
set(run_codecheck true)
elseif (${example} STREQUAL "core_static_child")
set(example_tarball_name gz-core_static_child-0.1.0.tar.bz2)
set(example_tarball_name ignition-core_static_child-0.1.0.tar.bz2)
set(run_codecheck true)
elseif (${example} STREQUAL "comp_deps")
set(example_tarball_name gz-component_deps-0.1.0.tar.bz2)
set(example_tarball_name ignition-component_deps-0.1.0.tar.bz2)
elseif (${example} STREQUAL "use_component_depsA")
set(example_tarball_name gz-use_component_depsa-0.1.0.tar.bz2)
set(example_tarball_name ignition-use_component_depsa-0.1.0.tar.bz2)
elseif (${example} STREQUAL "use_component_depsB")
set(example_tarball_name gz-use_component_depsb-0.1.0.tar.bz2)
set(example_tarball_name ignition-use_component_depsb-0.1.0.tar.bz2)
elseif (${example} STREQUAL "use_component_depsC")
set(example_tarball_name gz-use_component_depsc-0.1.0.tar.bz2)
set(example_tarball_name ignition-use_component_depsc-0.1.0.tar.bz2)
elseif (${example} STREQUAL "use_config_ifp")
set(example_tarball_name gz-find_config-0.1.0.tar.bz2)
set(example_tarball_name ignition-find_config-0.1.0.tar.bz2)

else()
set(example_tarball_name)
Expand Down Expand Up @@ -192,7 +192,7 @@ if (UNIX)
@ONLY)
set(_env_vars)
# On Debian and if the install prefix is /usr, the default CMAKE_INSTALL_LIBDIR of this project
# as set by GNUInstallDirs will be different from the one of the example project,
# as set by GNUInstallDirs will be different from the one of the example project,
# so let's hardcode it in that case
if(EXISTS "/etc/debian_version" AND "${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$")
set(example_PKGCONFIG_INSTALL_LIBDIR "lib/pkgconfig")
Expand Down
3 changes: 2 additions & 1 deletion examples/comp_deps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-component_deps VERSION 0.1.0)
find_package(ignition-cmake3 REQUIRED)
ign_configure_project()
ign_configure_project(
REPLACE_IGNITION_INCLUDE_PATH gz/component_deps)
ign_configure_build(QUIT_IF_BUILD_ERRORS
COMPONENTS child parent)
ign_create_packages()
Expand Down
2 changes: 1 addition & 1 deletion examples/comp_deps/src/AlmostEmpty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

#include <ignition/component_deps/Export.hh>
#include <gz/component_deps/Export.hh>

namespace ignition
{
Expand Down
2 changes: 1 addition & 1 deletion examples/core_nodep/src/AlmostEmpty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

#include <ignition/core_no_deps/Export.hh>
#include <gz/core_no_deps/Export.hh>

namespace ignition
{
Expand Down
2 changes: 1 addition & 1 deletion examples/core_nodep_static/src/AlmostEmpty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

#include <ignition/core_no_deps_static/Export.hh>
#include <gz/core_no_deps_static/Export.hh>

namespace ignition
{
Expand Down
2 changes: 1 addition & 1 deletion examples/no_gz_prefix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(no_gz_prefix VERSION 0.1.0)
find_package(ignition-cmake3 REQUIRED)
ign_configure_project(
NO_IGNITION_PREFIX
REPLACE_IGNITION_INCLUDE_PATH no_ign)
REPLACE_IGNITION_INCLUDE_PATH no_gz)
ign_configure_build(QUIT_IF_BUILD_ERRORS)
ign_create_packages()
ign_create_docs()
8 changes: 4 additions & 4 deletions examples/no_gz_prefix/src/AlmostEmpty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*
*/

#include <no_ignition_prefix.hh>
#include <no_ign/config.hh>
#include <no_ign/Export.hh>
#include <no_gz_prefix.hh>
#include <no_gz/config.hh>
#include <no_gz/Export.hh>

namespace no_ignition_prefix
namespace no_gz_prefix
{
class IGNITION_NO_IGNITION_PREFIX_VISIBLE AlmostEmpty
{
Expand Down

0 comments on commit eb3b748

Please sign in to comment.