0000667: Patch for using system installed zipios++

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

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)