0000667: Patch for using system installed zipios++
This commit is contained in:
parent
e919076823
commit
5b5d16c6c6
|
@ -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)
|
||||
|
||||
# ==============================================================================
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user