From 24a8314659197b8aa544b504ce7f4fe3378f8909 Mon Sep 17 00:00:00 2001 From: Valient Gough Date: Sat, 5 Aug 2017 22:59:49 -0700 Subject: [PATCH] update tinyxml2 build rules --- CMakeLists.txt | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4829e25..27f671c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,17 +69,6 @@ add_definitions (-D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26) find_package (OpenSSL REQUIRED) include_directories (${OPENSSL_INCLUDE_DIR}) -if (USE_INTERNAL_TINYXML) - message("-- Using local TinyXML2 copy") - add_subdirectory(internal/tinyxml2-3.0.0) - include_directories(${CMAKE_CURRENT_LIST_DIR}/internal/tinyxml2-3.0.0) - link_directories(${CMAKE_BINARY_DIR}/internal/tinyxml2-3.0.0) - set(TINYXML_LIBRARIES tinyxml2) -else () - find_package (TinyXML REQUIRED) - include_directories (${TINYXML_INCLUDE_DIR}) -endif () - find_program (POD2MAN pod2man) # Check for include files and stdlib properties. @@ -151,6 +140,21 @@ if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.5) # Need 3.6 or abo endif() endif() +if (USE_INTERNAL_TINYXML) + message("-- Using local TinyXML2 copy") + set(TINYXML_DIR vendor/github.com/leethomason/tinyxml2) + set(BUILD_STATIC_LIBS ON CACHE BOOL "build static libs") + set(BUILD_SHARED_LIBS OFF CACHE BOOL "build shared libs") + set(BUILD_TESTS OFF CACHE BOOL "build tests") + add_subdirectory(${TINYXML_DIR}) + include_directories(${CMAKE_CURRENT_LIST_DIR}/${TINYXML_DIR}/) + link_directories(${CMAKE_BINARY_DIR}/${TINYXML_DIR}/) + set(TINYXML_LIBRARIES tinyxml2) +else () + find_package (TinyXML REQUIRED) + include_directories (${TINYXML_INCLUDE_DIR}) +endif () + set(SOURCE_FILES internal/easylogging++.cc encfs/autosprintf.cpp