Skip to content

Commit

Permalink
Merge pull request #17 from scpeters/cmake_version_file
Browse files Browse the repository at this point in the history
Install cmake version config file
  • Loading branch information
isucan committed Oct 11, 2015
2 parents 5b8a9a7 + d55c892 commit eb2e40d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
17 changes: 15 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required( VERSION 2.8 FATAL_ERROR )
project (urdfdom_headers)

set (URDF_MAJOR_VERSION 0)
set (URDF_MINOR_VERSION 3)
set (URDF_MINOR_VERSION 4)
set (URDF_PATCH_VERSION 0)

set (URDF_VERSION ${URDF_MAJOR_VERSION}.${URDF_MINOR_VERSION}.${URDF_PATCH_VERSION})
Expand Down Expand Up @@ -30,7 +30,20 @@ endif()
set(PACKAGE_NAME ${PROJECT_NAME})
set(cmake_conf_file "${PROJECT_NAME}-config.cmake")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/${cmake_conf_file}.in" "${CMAKE_BINARY_DIR}/${cmake_conf_file}" @ONLY)
install(FILES "${CMAKE_BINARY_DIR}/${cmake_conf_file}" DESTINATION ${CMAKE_CONFIG_INSTALL_DIR} COMPONENT cmake)
set(cmake_conf_version_file "${PROJECT_NAME}-config-version.cmake")
# Use write_basic_package_version_file to generate a ConfigVersion file that
# allow users of gazebo to specify the API or version to depend on
# TODO: keep this instruction until deprecate Ubuntu/Precise and update with
# https://github.com/Kitware/CMake/blob/v2.8.8/Modules/CMakePackageConfigHelpers.cmake
include(WriteBasicConfigVersionFile)
write_basic_config_version_file(
${CMAKE_CURRENT_BINARY_DIR}/${cmake_conf_version_file}
VERSION "${URDF_VERSION}"
COMPATIBILITY SameMajorVersion)
install(FILES
"${CMAKE_BINARY_DIR}/${cmake_conf_file}"
"${CMAKE_BINARY_DIR}/${cmake_conf_version_file}"
DESTINATION ${CMAKE_CONFIG_INSTALL_DIR} COMPONENT cmake)

# Make the package config file
if (NOT MSVC)
Expand Down
1 change: 1 addition & 0 deletions urdf_model/include/urdf_model/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#ifndef URDF_MODEL_TYPES_H
#define URDF_MODEL_TYPES_H

#include <boost/pointer_cast.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>

Expand Down

0 comments on commit eb2e40d

Please sign in to comment.