use cmake's OBJECTS library option
This commit is contained in:
parent
b8f8d61020
commit
9c720dde7b
|
@ -252,43 +252,6 @@ SET(Python_SRCS
|
|||
)
|
||||
SOURCE_GROUP("Python" FILES ${Python_SRCS})
|
||||
|
||||
# Geom2d wrappers
|
||||
SET(Geom2dPy_SRCS
|
||||
Geom2d/ArcOfCircle2dPy.xml
|
||||
Geom2d/ArcOfCircle2dPyImp.cpp
|
||||
Geom2d/ArcOfConic2dPy.xml
|
||||
Geom2d/ArcOfConic2dPyImp.cpp
|
||||
Geom2d/ArcOfEllipse2dPy.xml
|
||||
Geom2d/ArcOfEllipse2dPyImp.cpp
|
||||
Geom2d/ArcOfHyperbola2dPy.xml
|
||||
Geom2d/ArcOfHyperbola2dPyImp.cpp
|
||||
Geom2d/ArcOfParabola2dPy.xml
|
||||
Geom2d/ArcOfParabola2dPyImp.cpp
|
||||
Geom2d/BezierCurve2dPy.xml
|
||||
Geom2d/BezierCurve2dPyImp.cpp
|
||||
Geom2d/BSplineCurve2dPy.xml
|
||||
Geom2d/BSplineCurve2dPyImp.cpp
|
||||
Geom2d/Circle2dPy.xml
|
||||
Geom2d/Circle2dPyImp.cpp
|
||||
Geom2d/Conic2dPy.xml
|
||||
Geom2d/Conic2dPyImp.cpp
|
||||
Geom2d/Ellipse2dPy.xml
|
||||
Geom2d/Ellipse2dPyImp.cpp
|
||||
Geom2d/Geometry2dPy.xml
|
||||
Geom2d/Geometry2dPyImp.cpp
|
||||
Geom2d/Curve2dPy.xml
|
||||
Geom2d/Curve2dPyImp.cpp
|
||||
Geom2d/Hyperbola2dPy.xml
|
||||
Geom2d/Hyperbola2dPyImp.cpp
|
||||
Geom2d/Line2dSegmentPy.xml
|
||||
Geom2d/Line2dSegmentPyImp.cpp
|
||||
Geom2d/OffsetCurve2dPy.xml
|
||||
Geom2d/OffsetCurve2dPyImp.cpp
|
||||
Geom2d/Parabola2dPy.xml
|
||||
Geom2d/Parabola2dPyImp.cpp
|
||||
)
|
||||
SOURCE_GROUP("Geom2d" FILES ${Geom2dPy_SRCS})
|
||||
|
||||
SET(Part_SRCS
|
||||
${Features_SRCS}
|
||||
${Properties_SRCS}
|
||||
|
@ -353,8 +316,14 @@ SET(Part_Scripts
|
|||
BOPTools/Utils.py
|
||||
)
|
||||
|
||||
add_library(Part SHARED ${Part_SRCS})
|
||||
target_link_libraries(Part ${Part_LIBS})
|
||||
# https://cmake.org/Wiki/CMake/Tutorials/Object_Library
|
||||
if(CMAKE_VERSION VERSION_LESS 2.8.8)
|
||||
add_library(Part SHARED ${Part_SRCS})
|
||||
target_link_libraries(Part ${Part_LIBS} PartGeom2dPy)
|
||||
else()
|
||||
add_library(Part SHARED ${Part_SRCS} $<TARGET_OBJECTS:PartGeom2dPy>)
|
||||
target_link_libraries(Part ${Part_LIBS})
|
||||
endif()
|
||||
|
||||
|
||||
fc_target_copy_resource(Part
|
||||
|
|
|
@ -14,3 +14,48 @@ generate_from_xml(Curve2dPy)
|
|||
generate_from_xml(Line2dSegmentPy)
|
||||
generate_from_xml(OffsetCurve2dPy)
|
||||
generate_from_xml(Parabola2dPy)
|
||||
|
||||
# Geom2d wrappers
|
||||
SET(Geom2dPy_SRCS
|
||||
ArcOfCircle2dPy.xml
|
||||
ArcOfCircle2dPyImp.cpp
|
||||
ArcOfConic2dPy.xml
|
||||
ArcOfConic2dPyImp.cpp
|
||||
ArcOfEllipse2dPy.xml
|
||||
ArcOfEllipse2dPyImp.cpp
|
||||
ArcOfHyperbola2dPy.xml
|
||||
ArcOfHyperbola2dPyImp.cpp
|
||||
ArcOfParabola2dPy.xml
|
||||
ArcOfParabola2dPyImp.cpp
|
||||
BezierCurve2dPy.xml
|
||||
BezierCurve2dPyImp.cpp
|
||||
BSplineCurve2dPy.xml
|
||||
BSplineCurve2dPyImp.cpp
|
||||
Circle2dPy.xml
|
||||
Circle2dPyImp.cpp
|
||||
Conic2dPy.xml
|
||||
Conic2dPyImp.cpp
|
||||
Ellipse2dPy.xml
|
||||
Ellipse2dPyImp.cpp
|
||||
Geometry2dPy.xml
|
||||
Geometry2dPyImp.cpp
|
||||
Curve2dPy.xml
|
||||
Curve2dPyImp.cpp
|
||||
Hyperbola2dPy.xml
|
||||
Hyperbola2dPyImp.cpp
|
||||
Line2dSegmentPy.xml
|
||||
Line2dSegmentPyImp.cpp
|
||||
OffsetCurve2dPy.xml
|
||||
OffsetCurve2dPyImp.cpp
|
||||
Parabola2dPy.xml
|
||||
Parabola2dPyImp.cpp
|
||||
)
|
||||
|
||||
SOURCE_GROUP("Geom2d" FILES ${Geom2dPy_SRCS})
|
||||
|
||||
# https://cmake.org/Wiki/CMake/Tutorials/Object_Library
|
||||
if(CMAKE_VERSION VERSION_LESS 2.8.8)
|
||||
add_library(PartGeom2dPy ${Geom2dPy_SRCS})
|
||||
else()
|
||||
add_library(PartGeom2dPy OBJECT ${Geom2dPy_SRCS})
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue
Block a user