0000667: Patch for using system installed zipios++

This commit is contained in:
wmayer 2012-04-10 19:03:08 +02:00
parent e919076823
commit 5b5d16c6c6
2 changed files with 22 additions and 1 deletions

View File

@ -98,6 +98,7 @@ OPTION(FREECAD_BUILD_FEM "Build the FreeCAD FEM module, be aware, unfinished cod
OPTION(FREECAD_BUILD_SANDBOX "Build the FreeCAD Sandbox module which is only for testing purposes" OFF)
OPTION(FREECAD_BUILD_TEMPLATE "Build the FreeCAD template module which is only for testing purposes" OFF)
OPTION(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
OPTION(USE_EXTERNAL_ZIPIOS "Use system installed zipios++ instead of the bundled." OFF)
# ==============================================================================

View File

@ -281,7 +281,6 @@ SET(FreeCADBase_HPP_SRCS
)
SET(FreeCADBase_SRCS
${zipios_SRCS}
${pycxx_SRCS}
${FreeCADBase_CPP_SRCS}
${FreeCADBase_HPP_SRCS}
@ -293,6 +292,27 @@ SET(FreeCADBase_SRCS
PreCompiled.h
)
# Use external zipios++ if specified.
if(USE_EXTERNAL_ZIPIOS)
find_library(ZIPIOS_LIBRARY zipios)
find_path(ZIPIOS_INCLUDES zipios++/zipios-config.h)
if(ZIPIOS_LIBRARY)
message(STATUS "Found zipios++: ${ZIPIOS}")
endif()
if(ZIPIOS_INCLUDES)
message(STATUS "Found zipios++ headers.")
endif()
if(ZIPIOS_LIBRARY AND ZIPIOS_INCLUDES)
list(APPEND FreeCADBase_LIBS ${ZIPIOS_LIBRARY})
include_directories(${ZIPIOS_INCLUDES})
else()
message(FATAL_ERROR "Using external zipios++ was specified but was not found.")
endif()
else(USE_EXTERNAL_ZIPIOS)
list(APPEND FreeCADBase_SRCS ${zipios_SRCS})
endif(USE_EXTERNAL_ZIPIOS)
if(MSVC)
add_definitions(-D_PreComp_)
ADD_MSVC_PRECOMPILED_HEADER("PreCompiled.h" "PreCompiled.cpp" FreeCADBase_CPP_SRCS)