Commit 69b46a46 authored by Sylvain Thery's avatar Sylvain Thery

bug install tinyXml2, I hope the last

parent 637f841d
......@@ -3,6 +3,8 @@ include(ExternalProject)
project(CGoGN_ThirdParty)
# for access to var CMAKE_INSTALL_LIBDIR
include(GNUInstallDirs)
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/..)
......@@ -22,15 +24,23 @@ IF(WIN32)
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/suitesparse)
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib)
set(CMAKE_CONFIGURATION_TYPES Release Debug)
# SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
# SET(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "" FORCE)
# MARK_AS_ADVANCED(CMAKE_CONFIGURATION_TYPES)
ELSE()
SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
ExternalProject_Add(
Tinyxml2
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/tinyxml2
GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
CMAKE_CACHE_ARGS "-DCMAKE_BUILD_TYPE:string=${CMAKE_BUILD_TYPE}"
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${CGoGN_ROOT_DIR}/ThirdParty/TinyXml2"
BUILD_COMMAND make
INSTALL_COMMAND make install
)
INSTALL (DIRECTORY TinyXml2/include/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include)
INSTALL (DIRECTORY TinyXml2/${CMAKE_INSTALL_LIBDIR}/ DESTINATION ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE}
PATTERN "pkgconfig" EXCLUDE )
ENDIF()
IF(WIN32)
ENDIF(WIN32)
......@@ -38,7 +48,6 @@ ENDIF(WIN32)
SET (BUILD_SHARED_LIBS OFF CACHE BOOL
"if used all library are build as shared type (.so/.dylib/.dll)")
SET (WITH_TINYXML2 ON CACHE BOOL "get & build tinyxml2")
SET (WITH_ASSIMP OFF CACHE BOOL "build with Assimp")
SET (WITH_ZINRI ON CACHE BOOL "build with Zinri libs")
SET (WITH_PYTHONQT ON CACHE BOOL "build PythonQt (for Schnapps)")
......@@ -69,21 +78,3 @@ IF (WITH_ASSIMP)
add_subdirectory(Assimp Assimp/build)
INSTALL (DIRECTORY Assimp/include/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/Assimp)
ENDIF (WITH_ASSIMP)
IF (WITH_TINYXML2)
ExternalProject_Add(
Tinyxml2
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/tinyxml2
GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
CMAKE_CACHE_ARGS "-DCMAKE_BUILD_TYPE:string=${CMAKE_BUILD_TYPE}"
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${CGoGN_ROOT_DIR}/ThirdParty/TinyXml2"
BUILD_COMMAND make
INSTALL_COMMAND make install
)
INSTALL (DIRECTORY TinyXml2/include/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include)
FILE( GLOB_RECURSE tinyLib_files
${CGoGN_ROOT_DIR}/ThirdParty/TinyXml2/lib/*.so*
${CGoGN_ROOT_DIR}/ThirdParty/TinyXml2/lib/*.a
${CGoGN_ROOT_DIR}/ThirdParty/TinyXml2/lib/*.dylib )
INSTALL (FILES ${tinyLib_files} DESTINATION ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
ENDIF (WITH_TINYXML2)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment