[Raytracing] remove Python.h and Xerces
This commit is contained in:
@@ -20,11 +20,7 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <Python.h>
|
||||
#endif
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/PyObjectBase.h>
|
||||
@@ -36,6 +32,7 @@
|
||||
#include "LuxFeature.h"
|
||||
#include "LuxProject.h"
|
||||
|
||||
|
||||
namespace Raytracing {
|
||||
extern PyObject* initModule();
|
||||
}
|
||||
|
||||
@@ -21,11 +21,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include <CXX/Extensions.hxx>
|
||||
#include <CXX/Objects.hxx>
|
||||
@@ -41,6 +36,7 @@
|
||||
#include <Mod/Part/App/TopoShapePy.h>
|
||||
#include <App/Application.h>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
@@ -1,68 +1,67 @@
|
||||
if(MSVC)
|
||||
add_definitions(-DFCAppRaytracing -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH)
|
||||
else(MSVC)
|
||||
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
|
||||
endif(MSVC)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${OCC_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
|
||||
|
||||
set(Raytracing_LIBS
|
||||
Part
|
||||
${OCC_LIBRARIES}
|
||||
${OCC_DEBUG_LIBRARIES}
|
||||
FreeCADApp
|
||||
)
|
||||
|
||||
macro(generate_from_py2 BASE_NAME OUTPUT_FILE)
|
||||
file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR}/src/Tools/PythonToCPP.py TOOL_PATH)
|
||||
file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME} SOURCE_PATH)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${TOOL_PATH} ${SOURCE_PATH} ${OUTPUT_FILE}
|
||||
MAIN_DEPENDENCY ${BASE_NAME}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT Building files out of ${BASE_NAME}.py)
|
||||
endmacro(generate_from_py2)
|
||||
|
||||
generate_from_py2(FreeCADpov FreeCADpov.h)
|
||||
|
||||
SET(Raytracing_SRCS
|
||||
AppRaytracing.cpp
|
||||
AppRaytracingPy.cpp
|
||||
FreeCADpov
|
||||
PovTools.cpp
|
||||
PovTools.h
|
||||
LuxTools.cpp
|
||||
LuxTools.h
|
||||
PreCompiled.cpp
|
||||
PreCompiled.h
|
||||
RayFeature.cpp
|
||||
RayFeature.h
|
||||
RayProject.cpp
|
||||
RayProject.h
|
||||
RaySegment.cpp
|
||||
RaySegment.h
|
||||
LuxFeature.h
|
||||
LuxFeature.cpp
|
||||
LuxProject.h
|
||||
LuxProject.cpp
|
||||
)
|
||||
|
||||
add_library(Raytracing SHARED ${Raytracing_SRCS})
|
||||
target_link_libraries(Raytracing ${Raytracing_LIBS})
|
||||
|
||||
SET_BIN_DIR(Raytracing Raytracing /Mod/Raytracing)
|
||||
SET_PYTHON_PREFIX_SUFFIX(Raytracing)
|
||||
|
||||
INSTALL(TARGETS Raytracing DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
if(MSVC)
|
||||
add_definitions(-DFCAppRaytracing -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH)
|
||||
else(MSVC)
|
||||
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
|
||||
endif(MSVC)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${OCC_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
|
||||
|
||||
set(Raytracing_LIBS
|
||||
Part
|
||||
${OCC_LIBRARIES}
|
||||
${OCC_DEBUG_LIBRARIES}
|
||||
FreeCADApp
|
||||
)
|
||||
|
||||
macro(generate_from_py2 BASE_NAME OUTPUT_FILE)
|
||||
file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR}/src/Tools/PythonToCPP.py TOOL_PATH)
|
||||
file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME} SOURCE_PATH)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${TOOL_PATH} ${SOURCE_PATH} ${OUTPUT_FILE}
|
||||
MAIN_DEPENDENCY ${BASE_NAME}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT Building files out of ${BASE_NAME}.py)
|
||||
endmacro(generate_from_py2)
|
||||
|
||||
generate_from_py2(FreeCADpov FreeCADpov.h)
|
||||
|
||||
SET(Raytracing_SRCS
|
||||
AppRaytracing.cpp
|
||||
AppRaytracingPy.cpp
|
||||
FreeCADpov
|
||||
PovTools.cpp
|
||||
PovTools.h
|
||||
LuxTools.cpp
|
||||
LuxTools.h
|
||||
PreCompiled.cpp
|
||||
PreCompiled.h
|
||||
RayFeature.cpp
|
||||
RayFeature.h
|
||||
RayProject.cpp
|
||||
RayProject.h
|
||||
RaySegment.cpp
|
||||
RaySegment.h
|
||||
LuxFeature.h
|
||||
LuxFeature.cpp
|
||||
LuxProject.h
|
||||
LuxProject.cpp
|
||||
)
|
||||
|
||||
add_library(Raytracing SHARED ${Raytracing_SRCS})
|
||||
target_link_libraries(Raytracing ${Raytracing_LIBS})
|
||||
|
||||
SET_BIN_DIR(Raytracing Raytracing /Mod/Raytracing)
|
||||
SET_PYTHON_PREFIX_SUFFIX(Raytracing)
|
||||
|
||||
INSTALL(TARGETS Raytracing DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
@@ -14,7 +14,6 @@ include_directories(
|
||||
${OCC_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
)
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef __PRECOMPILED_GUI__
|
||||
#define __PRECOMPILED_GUI__
|
||||
|
||||
@@ -118,10 +117,6 @@
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <GCPnts_UniformDeflection.hxx>
|
||||
|
||||
|
||||
// Python
|
||||
#include <Python.h>
|
||||
|
||||
// Qt Toolkit
|
||||
#ifndef __QtAll__
|
||||
# include <Gui/QtAll.h>
|
||||
@@ -132,7 +127,6 @@
|
||||
# include <Gui/InventorAll.h>
|
||||
#endif
|
||||
|
||||
|
||||
#endif //_PreComp_
|
||||
|
||||
#endif // __PRECOMPILED_GUI__
|
||||
|
||||
Reference in New Issue
Block a user