From 3afd9f3266c3552e934def5e97287c454c0f3abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A4r=20Winzell?= Date: Sat, 1 Jun 2019 13:02:16 -0700 Subject: [PATCH] Get zlib, libxml2 and iconv all from Conan. --- .travis.yml | 12 ++++++++---- CMakeLists.txt | 27 +++++++++++++-------------- appveyor.yml | 5 +++-- conanfile.py | 1 + 4 files changed, 25 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 412ecc6..22006d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index ef805d6..463c406 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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} ) @@ -219,6 +222,7 @@ target_include_directories(libFBX2glTF PUBLIC fmt::fmt libxml2::libxml2 zlib::zlib + libiconv::libiconv ) target_include_directories(libFBX2glTF SYSTEM PUBLIC @@ -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" ) diff --git a/appveyor.yml b/appveyor.yml index 04b4c00..4ae70e7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 diff --git a/conanfile.py b/conanfile.py index 8f5292b..be675d0 100644 --- a/conanfile.py +++ b/conanfile.py @@ -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"),