Skip to content

Commit

Permalink
Azure: install vcpkg dependencies for utils component (#1400)
Browse files Browse the repository at this point in the history
* azure: utils vcpkg install tinyxml2, boost headers

* utils: check for boost headers

* gui: disable win32 build

* remove target_include_directories
  • Loading branch information
scpeters authored and jslee02 committed Aug 17, 2019
1 parent 245aafb commit bd37098
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ jobs:
VCPKG_INSTALL_ROOT: $(Build.SourcesDirectory)\vcpkg
VCPKG_ARCH: 'x64-windows'
VCPKG_PACKAGES: 'assimp boost-system boost-filesystem ccd eigen3 fcl'
VCPKG_OPTIONAL_PACKAGES: 'bullet3 ode'
# utils needs tinyxml2 and boost algorithm/lexical-cast
# and also boost-math to resolve a circular dependency with lexical-cast
VCPKG_OPTIONAL_PACKAGES: 'boost-algorithm boost-lexical-cast boost-math bullet3 ode tinyxml2'
BUILD_TOOLSET_VERSION: '142'
CMAKE_GENERATOR: 'Visual Studio 16 2019'
steps:
Expand Down
24 changes: 24 additions & 0 deletions dart/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@
dart_find_package(tinyxml2)
dart_check_optional_package(TINYXML2 "dart-utils" "tinyxml2" "1.0.1")

# Test whether boost algorithm and lexical_cast headers are available.
include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_FLAGS "-w")
set(CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIRS}")
check_cxx_source_compiles(
"
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
int main()
{
return 0;
}
"
HAS_BOOST_ALGORITHM_LEXICAL_CAST
)
if(HAS_BOOST_ALGORITHM_LEXICAL_CAST)
if(DART_VERBOSE)
message(STATUS "Looking for Boost algorithm and lexical_cast headers - found")
endif()
else()
message(WARNING "Looking for Boost algorithm and lexical_cast headers - NOT found, to use dart-utils, please install missing boost headers")
return()
endif()

# Search all header and source files
file(GLOB hdrs "*.hpp")
file(GLOB srcs "*.cpp")
Expand Down

0 comments on commit bd37098

Please sign in to comment.