Skip to content

Commit

Permalink
Get zlib, libxml2 and iconv all from Conan.
Browse files Browse the repository at this point in the history
  • Loading branch information
zellski committed Jun 5, 2019
1 parent 5b47547 commit 3afd9f3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 20 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
Expand Up @@ -9,17 +9,21 @@ matrix:
- APP_NAME="FBX2glTF-linux-x64"
- CONAN_CONFIG="-s compiler.libcxx=libstdc++11"
- FBXSDK_TARBALL="https://github.com/zellski/FBXSDK-Linux/archive/2019.2.tar.gz"
- TAR_WILDCARDS="--wildcards"
- os: osx
osx_image: xcode10.2
env:
- APP_NAME="FBX2glTF-darwin-x64"
- CONAN_CONFIG="-s compiler=apple-clang -s compiler.version=10.0 -s compiler.libcxx=libc++"
- FBXSDK_TARBALL="https://github.com/zellski/FBXSDK-Darwin/archive/2019.2.tar.gz"
- TAR_WILDCARDS=""
compiler: gcc
language: generic
cache:
directories:
- ${HOME}/.conan

#disabled for now
#cache:
# directories:
# - ${HOME}/.conan

addons:
apt:
Expand All @@ -28,7 +32,7 @@ addons:
packages: zstd

install:
- curl -sL "${FBXSDK_TARBALL}" | tar xz --strip-components=1 --wildcards */sdk
- curl -sL "${FBXSDK_TARBALL}" | tar xz --strip-components=1 ${TAR_WILDCARDS} */sdk
- zstd -d -r --rm sdk
- git clone --depth 1 git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
Expand Down
27 changes: 13 additions & 14 deletions CMakeLists.txt
Expand Up @@ -41,14 +41,16 @@ include("${CMAKE_BINARY_DIR}/conan_paths.cmake")

set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
find_package(Iconv QUIET)

list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_BINARY_DIR}")

# stuff we get from Conan
find_package(boost_filesystem REQUIRED)
find_package(boost_optional REQUIRED)
find_package(libxml2 REQUIRED)
find_package(zlib REQUIRED)
find_package(fmt REQUIRED)
find_package(boost_filesystem MODULE REQUIRED)
find_package(boost_optional MODULE REQUIRED)
find_package(libxml2 MODULE REQUIRED)
find_package(zlib MODULE REQUIRED)
find_package(fmt MODULE REQUIRED)
find_package(libiconv MODULE REQUIRED)

# create a compilation database for e.g. clang-tidy
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Expand Down Expand Up @@ -202,12 +204,13 @@ target_link_libraries(libFBX2glTF
${FRAMEWORKS}
boost_filesystem::boost_filesystem
boost_optional::boost_optional
fmt::fmt
libxml2::libxml2
zlib::zlib
${DRACO_LIB}
optimized ${FBXSDK_LIBRARY}
debug ${FBXSDK_LIBRARY_DEBUG}
fmt::fmt
libxml2::libxml2
zlib::zlib
libiconv::libiconv
${CMAKE_DL_LIBS}
${CMAKE_THREAD_LIBS_INIT}
)
Expand All @@ -219,6 +222,7 @@ target_include_directories(libFBX2glTF PUBLIC
fmt::fmt
libxml2::libxml2
zlib::zlib
libiconv::libiconv
)

target_include_directories(libFBX2glTF SYSTEM PUBLIC
Expand All @@ -231,11 +235,6 @@ target_include_directories(libFBX2glTF SYSTEM PUBLIC
${CPPCODEC_INCLUDE_DIR}
)

if (Iconv_FOUND)
target_link_libraries(libFBX2glTF Iconv::Iconv)
target_include_directories(libFBX2glTF SYSTEM PUBLIC Iconv::Iconv)
endif()

target_include_directories(appFBX2glTF PUBLIC
"third_party/CLI11"
)
Expand Down
5 changes: 3 additions & 2 deletions appveyor.yml
Expand Up @@ -9,8 +9,9 @@ environment:

stack: python %PYTHON%

cache:
- C:\Users\appveyor\.conan\data -> appveyor.yml, conanfile.py
#temporarily disabled
#cache:
# - C:\Users\appveyor\.conan\data -> appveyor.yml, conanfile.py

init:
- git config --global filter.lfs.required false
Expand Down
1 change: 1 addition & 0 deletions conanfile.py
Expand Up @@ -10,6 +10,7 @@ class FBX2glTFConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
requires = (
("boost_filesystem/1.69.0@bincrafters/stable"),
("libiconv/1.15@bincrafters/stable"),
("zlib/1.2.11@conan/stable"),
("libxml2/2.9.9@bincrafters/stable"),
("fmt/5.3.0@bincrafters/stable"),
Expand Down

0 comments on commit 3afd9f3

Please sign in to comment.