Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from choreonoid:master #108

Merged
merged 15 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 27 additions & 38 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ set(CNOID_BINARY_SHARE_DIR ${CHOREONOID_BINARY_SHARE_DIR})
set(CMAKE_CXX_EXTENSIONS OFF)

# C++ version
if(NOT CMAKE_CXX_STANDARD)
if(CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING "C++ version number. Specify either 17 or 14.")
else()
set(cxx_standard 11)
if(NOT CMAKE_VERSION VERSION_LESS 3.8.0) # CMake 3.8 or later is required to enable C++17
if(UNIX)
Expand All @@ -110,16 +112,16 @@ if(NOT CMAKE_CXX_STANDARD)
endif()
endif()
if(NOT has_cpp17)
if(UNIX)
check_cxx_compiler_flag("-std=c++14" has_cpp14)
elseif(MSVC)
check_cxx_compiler_flag("-std=c++14" has_cpp14)
endif()
check_cxx_compiler_flag("-std=c++14" has_cpp14)
if(has_cpp14)
set(cxx_standard 14)
endif()
endif()
set(CMAKE_CXX_STANDARD ${cxx_standard} CACHE STRING "C++ version number. Specify either 17, 14 or 11.")
set(CMAKE_CXX_STANDARD ${cxx_standard} CACHE STRING "C++ version number. Specify either 17, 14.")
endif()

if(CMAKE_CXX_STANDARD LESS 14)
message(FATAL_ERROR "Choreonoid requires C++14 or higher.")
endif()

if(UNIX)
Expand Down Expand Up @@ -423,9 +425,6 @@ if(ENABLE_PYTHON)
set(init_py "${PROJECT_BINARY_DIR}/${CHOREONOID_PYTHON_SUBDIR}/cnoid/__init__.py")
file(WRITE ${init_py} "")
install(FILES ${init_py} DESTINATION ${CHOREONOID_PYTHON_SUBDIR}/cnoid)
if(MSVC)
add_definitions(-DHAVE_SNPRINTF)
endif()

if(NOT USE_BUNDLED_PYBIND11)
find_package(pybind11 2.6 QUIET)
Expand Down Expand Up @@ -475,35 +474,25 @@ if(ENABLE_LUA)
set(CHOREONOID_LUA_SUBDIR ${CHOREONOID_PLUGIN_SUBDIR}/lua)
endif()

# boost
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_ADDITIONAL_VERSIONS "1.62" "1.63" "1.64" "1.65" "1.66" "1.67" "1.68" "1.69" "1.70" "1.71" "1.72" "1.73" "1.74" "1.75")
set(boost_packages iostreams system)
if(CMAKE_CXX_STANDARD LESS 17)
set(boost_packages ${boost_packages} filesystem)
endif()
if(MSVC)
find_package(Boost 1.58.0 REQUIRED COMPONENTS ${boost_packages} OPTIONAL_COMPONENTS bzip2 zlib)
if(CMAKE_CXX_STANDARD GREATER_EQUAL 17)
if(UNIX)
set(FILESYSTEM_LIBRARY stdc++fs)
endif()
set(has_boost_libs_for_util_libs false)
else()
find_package(Boost 1.58.0 REQUIRED COMPONENTS ${boost_packages})
endif()

if(CMAKE_CXX_STANDARD LESS 17)
set(FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY})
elseif(UNIX)
set(FILESYSTEM_LIBRARY stdc++fs)
endif()

include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
list(APPEND CHOREONOID_SDK_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
list(APPEND CHOREONOID_SDK_LIBRARY_DIRS ${Boost_LIBRARY_DIRS})

if(MSVC)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS BOOST_ALL_DYN_LINK ${BOOST_LIB_DIAGNOSTIC})
install_runtime_dlls(${Boost_LIBRARY_DIRS}
${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
${Boost_IOSTREAMS_LIBRARY} ${Boost_ZLIB_LIBRARY})
# boost
set(Boost_USE_STATIC_LIBS OFF)
find_package(Boost REQUIRED COMPONENTS system filesystem)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
list(APPEND CHOREONOID_SDK_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
list(APPEND CHOREONOID_SDK_LIBRARY_DIRS ${Boost_LIBRARY_DIRS})
set(FILESYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
if(MSVC)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS BOOST_ALL_DYN_LINK ${BOOST_LIB_DIAGNOSTIC})
install_runtime_dlls(${Boost_LIBRARY_DIRS} ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
endif()
set(has_boost_libs_for_util_libs true)
endif()

# Eigen
Expand Down
53 changes: 30 additions & 23 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Choreonoid - An integrated graphical robotics software framework

Copyright (c) 2019-2023 Choreonoid Inc.
Copyright (c) 2019-2024 Choreonoid Inc.

Copyright (c) 2007-2019
Shin'ichiro Nakaoka and the Choreonoid development team,
Expand Down Expand Up @@ -56,57 +56,64 @@ copyrighted by other developers.
This software also includes the following software components which are
copyrighted by other developers.

* CLI11 (https://github.com/CLIUtils/CLI11)
see thirdparty/CLI11/LICENSE

* Eigen (http://eigen.tuxfamily.org)
see thirdparty/eigen/COPYING.README
see thirdparty/eigen-3.2.10/COPYING.README

* fast_float (https://github.com/fastfloat/fast_float)
see thirdparty/fast_float-0.8.0/LICENSE.rst

* fmt (http://fmtlib.net)
see thirdparty/fmt-7.1.3/LICENSE.rst

* FreeType (http://freetype.org/)
see thirdparty/freetype-2.13.0/LICENSE.TXT

* gettext (http://www.gnu.org/software/gettext)
see thirdparty/gettext-0.21/include/libintl.h

* IJG JPEG Library (http://www.ijg.org)
see thirdparty/Jpeg-6b/README
see thirdparty/Jpeg-9c/README

* libpng (http://www.libpng.org/pub/png/libpng.html)
see thirdparty/lpng1232/LICENSE

* LibYAML (http://pyyaml.org/wiki/LibYAML)
MIT license (see thirdparty/yaml-0.1.7/LICENSE)

* zlib (https://zlib.net/)
see thirdparty/zlib-1.2.13/LICENSE

* libzip (https://libzip.org/)
see thirdparty/libzip-1.9.2/LICENSE

* LibYAML (http://pyyaml.org/wiki/LibYAML)
MIT license (see thirdparty/yaml-0.2.5/LICENSE)

* OPCODE (http://www.codercorner.com/Opcode.htm)
see src/AISTCollisionDetector/Opcode/ReadMe.txt

* gettext (http://www.gnu.org/software/gettext)
see thirdparty/gettext-0.21/include/libintl.h
* Pugixml (https://pugixml.org)
see thirdparty/pugixml-1.11/readme.txt

* pybind11 (https://github.com/pybind/pybind11)
see thirdparty/pybind11-2.1.1/LICENSE
see thirdparty/pybind11-2.10.3/LICENSE

* Sol (https://github.com/ThePhD/sol2)
see thirdparty/sol2/LICENSE

* Pugixml (https://pugixml.org)
see thirdparty/pugixml-1.11/readme.txt

* fmt (http://fmtlib.net)
see thirdparty/fmt-5.3.0/LICENSE.rst

* fast_float (https://github.com/fastfloat/fast_float)
see thirdparty/fast_float-0.8.0/LICENSE.rst

* Xacro (https://github.com/ros/xacro)
sett thirdparty/xacro-1.14.10/package.xml

* zlib (https://zlib.net/)
see thirdparty/zlib-1.2.13/LICENSE

---------------------------------------------------------------------------

Some binary distributions of Choreonoid may include the binaries of the
following libraries:

* Boost C++ Libraries (http://www.boost.org/)
* Qt (http://qt-project.org/)
* Eigen (http://eigen.tuxfamily.org/)
* Boost C++ Libraries (http://www.boost.org/)
* Assimp (https://www.assimp.org/)
* Open Dynamics Engine (http://www.ode.org/)
* Bullet Physics Library (http://bulletphysics.org/)
* FFmpeg (https://ffmpeg.org/)
* Point Cloud Library (https://pointclouds.org/)
* omniORB (http://omniorb.sourceforge.net/)
20 changes: 5 additions & 15 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,11 @@ set(modules
ChoreonoidFindQt.cmake
)

set(util_dependencies fmt)

set(has_boost_libs_for_util_libs true)
set(boost_version ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION})
# set(boost_version ${Boost_VERSION_STRING})
set(boost_components_for_util_libs system)
set(boost_libs_for_util_libs ${Boost_SYSTEM_LIBRARY})

if(CMAKE_CXX_STANDARD LESS 17)
list(APPEND boost_components_for_util_libs filesystem)
list(APPEND boost_libs_for_util_libs ${Boost_FILESYSTEM_LIBRARY})
else() # C++17
if(UNIX)
list(APPEND util_dependencies stdc++fs)
endif()
set(util_dependencies fmt ${FILESYSTEM_LIBRARY})

if(has_boost_libs_for_util_libs)
set(boost_version ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION})
set(boost_components_for_util_libs system filesystem)
endif()

if(UNIX)
Expand Down
14 changes: 9 additions & 5 deletions cmake/ChoreonoidConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ set(CHOREONOID_LIBRARY_DIRS "@library_dirs@")

if(@has_boost_libs_for_util_libs@)
find_package(Boost @boost_version@ EXACT COMPONENTS @boost_components_for_util_libs@)
list(APPEND CHOREONOID_UTIL_LIBRARIES @boost_libs_for_util_libs@)
endif()

add_library(Choreonoid::CnoidUtil SHARED IMPORTED GLOBAL)
Expand All @@ -72,13 +71,18 @@ endif()
# to specify INTERFACE for an imported library, and it is supported in CMake 3.11 and later.
# To be able to use CMake 3.10, the following alternative descriptions with the set_property command are used.
#target_compile_definitions(Choreonoid::CnoidUtil INTERFACE ${CHOREONOID_COMPILE_DEFINITIONS})
#target_include_directories(Choreonoid::CnoidUtil INTERFACE ${CHOREONOID_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
#target_include_directories(Choreonoid::CnoidUtil INTERFACE ${CHOREONOID_INCLUDE_DIRS})
set_property(TARGET Choreonoid::CnoidUtil APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS
${CHOREONOID_COMPILE_DEFINITIONS})
set_property(TARGET Choreonoid::CnoidUtil APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${CHOREONOID_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
if(@has_boost_libs_for_util_libs@)
set_property(TARGET Choreonoid::CnoidUtil APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${CHOREONOID_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
else()
set_property(TARGET Choreonoid::CnoidUtil APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${CHOREONOID_INCLUDE_DIRS})
endif()

target_link_libraries(Choreonoid::CnoidUtil INTERFACE @util_dependencies@;${Boost_LIBRARIES})
target_link_libraries(Choreonoid::CnoidUtil INTERFACE @util_dependencies@)
set(CHOREONOID_UTIL_LIBRARIES Choreonoid::CnoidUtil)

add_library(Choreonoid::CnoidBase SHARED IMPORTED GLOBAL)
Expand Down
1 change: 0 additions & 1 deletion include/cnoid/Exception

This file was deleted.

4 changes: 0 additions & 4 deletions misc/script/install-requisites-ubuntu-20.04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ sudo --preserve-env=DEBIAN_FRONTEND,TZ \
apt-get -y install \
build-essential \
cmake-curses-gui \
libboost-dev \
libboost-system-dev \
libboost-iostreams-dev \
libboost-filesystem-dev \
libeigen3-dev \
uuid-dev \
libxfixes-dev \
Expand Down
3 changes: 0 additions & 3 deletions misc/script/install-requisites-ubuntu-22.04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ sudo --preserve-env=DEBIAN_FRONTEND,TZ \
apt-get -y install \
build-essential \
cmake-curses-gui \
libboost-dev \
libboost-system-dev \
libboost-iostreams-dev \
libeigen3-dev \
uuid-dev \
libxfixes-dev \
Expand Down
5 changes: 3 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>

<package format="2">
<package format="3">

<name>choreonoid</name>
<version>1.7.0</version>
Expand All @@ -14,7 +14,8 @@
<url type="repository">https://github.com/choreonoid/choreonoid/</url>
<url type="bugtracker">https://github.com/choreonoid/choreonoid/issues</url>

<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend condition="$ROS_VERSION == 1">catkin</buildtool_depend>
<buildtool_depend condition="$ROS_VERSION == 2">ament_cmake</buildtool_depend>

<depend>boost</depend>
<build_export_depend>eigen</build_export_depend>
Expand Down
1 change: 1 addition & 0 deletions sample/GRobotPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
option(BUILD_GROBOT_PLUGIN "Building GRobotPlugin" OFF)
mark_as_advanced(BUILD_GROBOT_PLUGIN)

if(NOT BUILD_GROBOT_PLUGIN)
return()
Expand Down
1 change: 0 additions & 1 deletion src/AssimpSceneLoader/AssimpSceneLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <cnoid/SceneDrawables>
#include <cnoid/MeshFilter>
#include <cnoid/ImageIO>
#include <cnoid/Exception>
#include <cnoid/NullOut>
#include <cnoid/UTF8>
#include <cnoid/stdx/filesystem>
Expand Down
Loading