Skip to content

Commit

Permalink
Fix cmake install (#20)
Browse files Browse the repository at this point in the history
# Description
Add missing version file for main eolo project

## Type of change
Please delete options that are not relevant.

- Bug fix (non-breaking change which fixes an issue)

## Checklist before requesting a review
- [ ] I have performed a self-review of my code.
- [ ] If it is a core feature, I have added thorough tests.
- [ ] If this is a new component I have added examples.
- [ ] I updated the README and related documentation.
  • Loading branch information
filippobrizzi authored Feb 12, 2024
1 parent 285dbe4 commit 58aee73
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions cmake/02_build_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,15 @@ configure_package_config_file(
PATH_VARS CMAKE_INSTALL_FULL_INCLUDEDIR CMAKE_INSTALL_FULL_LIBDIR
NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO)

write_basic_package_version_file(
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/${CMAKE_PROJECT_NAME}-config-version.cmake
VERSION ${VERSION}
COMPATIBILITY AnyNewerVersion)

install(
FILES
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/${CMAKE_PROJECT_NAME}/${CMAKE_PROJECT_NAME}-config.cmake
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/${CMAKE_PROJECT_NAME}-config-version.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME})

# print summary
Expand Down
5 changes: 3 additions & 2 deletions cmake/05_modules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,9 @@ macro(define_module_proto_library)
SYSTEM # for clang-tidy to ignore header files from this directory
BEFORE
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<INSTALL_INTERFACE:include>)
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<INSTALL_INTERFACE:install>
)

# Register protobuf library as a dependency for the module.
set(MODULE_${MODULE_NAME}_LIB_TARGETS
Expand Down
1 change: 0 additions & 1 deletion modules/examples/examples/zenoh_pub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//=================================================================================================

#include <cstdlib>
#include <print>
#include <thread>

#include <fmt/core.h>
Expand Down
6 changes: 3 additions & 3 deletions modules/utils/src/version_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ namespace eolo::utils

static constexpr std::uint8_t VERSION_MAJOR = 0;
static constexpr std::uint8_t VERSION_MINOR = 0;
static constexpr std::uint16_t VERSION_PATCH = 0;
static constexpr std::uint16_t VERSION_PATCH = 1;

static constexpr std::string_view REPO_BRANCH = "examples_module";
static constexpr std::string_view REPO_BRANCH = "fix_cmake_install";
static constexpr std::string_view BUILD_PROFILE = "Release";
static constexpr std::string_view REPO_HASH = "a1ef6c5";
static constexpr std::string_view REPO_HASH = "443061b";

} // namespace eolo::utils

0 comments on commit 58aee73

Please sign in to comment.