summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/2geom/src/toys/CMakeLists.txt
blob: 949973992357716e86f6f869709a87744b79b601 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
SET(2GEOM_TOY-FRAMEWORK-2_SRC
toy-framework-2.cpp
${2GEOM_INCLUDE_DIR}/toys/toy-framework-2.h
path-cairo.cpp
${2GEOM_INCLUDE_DIR}/toys/path-cairo.h
)
SET(2GEOM_LPE_TOY_FRAMEWORK_SRC
${2GEOM_TOY-FRAMEWORK-2_SRC}
lpe-framework.cpp
${2GEOM_INCLUDE_DIR}/toys/lpe-framework.h
)

SET(2GEOM_TOYS-2_SRC
2dsb2d
aa
arc-bez
arc-length-param
boolops-toy
bound-path
bounds-test
box3d
center-warp
circle-fitting
circle-intersect
circle-line-intersect
circle-tangent-fitting
collinear-normal
conic-3
conic-4
conic-5
conic-6
conic-section-toy
convole
curvature-curve
curvature-test
curve-curve-distance
curve-curve-nearest-time
curve-intersection-by-bezier-clipping
curve-intersection-by-implicitization
cylinder3d
d2sbasis-fitting
d2sbasis-fitting-with-np
draw-toy
ellipse-area-minimizer
ellipse-bezier-intersect-toy
ellipse-fitting
ellipse-intersect-toy
ellipse-line-intersect-toy
elliptiarc-3point-center-fitting
elliptiarc-curve-fitting
elliptical-arc-toy
evolute
filet-minion
find-derivative
gear
hatches
implicit-toy
ineaa
inner-product-clip
intersect-data
inverse-test
kinematic_templates
levelsets-test
line-toy
load-svgd
match-curve
mesh-grad
metro
minsb2d-solver
#normal-bundle
offset-toy
pair-intersect
paptest
parametrics
parser
path-along-path
path-effects
pencil
pencil-2
plane3d
point-curve-nearest-time
portion-test
precise-flat
pw-compose-test
pw-funcs
pw-toy
rdm-area
rect_01
rect_02
rect_03
rect-toy
root-finder-comparer
rtree-toy
sanitize
sb1d
sb2d
sb2d-solver
sbasisdim
sbasis-fitting
sb-math-test
sb-of-interval
sb-of-sb
sb-to-bez
sb-zeros
scribble
self-intersect
sketch-fitter
smash-intersector
squiggles
sweep
sweeper-toy
# these ones have only had a trivial rewrite to toy-2
uncross
winding-test
worms
)

SET(2GEOM_LPE_TOYS_SRC
lpe-test
)

OPTION(2GEOM_TOYS_LPE
  "Build Inkscape Live Path Effect (LPE) Toy files"
  ON)
IF(2GEOM_TOYS_LPE)
    # make lib for lpetoy
    add_library(lpetoy ${LIB_TYPE} ${2GEOM_LPE_TOY_FRAMEWORK_SRC})
    target_include_directories(lpetoy PUBLIC ${GTK3_INCLUDE_DIRS})
    target_link_libraries(lpetoy 2Geom::2geom ${GTK3_LIBRARIES})
    if(NOT WIN32 AND NOT APPLE)
    	target_link_libraries(lpetoy -lrt)
    endif()

    FOREACH(source ${2GEOM_LPE_TOYS_SRC})
        add_executable(${source} ${source}.cpp)
        target_link_libraries(${source} lpetoy 2Geom::2geom)
    ENDFOREACH(source)

ENDIF(2GEOM_TOYS_LPE)

OPTION(2GEOM_TOYS
  "Build the projects Toy files"
  ON)
IF(2GEOM_TOYS)
    # make lib for toy
    ADD_LIBRARY(toy-2 ${LIB_TYPE} ${2GEOM_TOY-FRAMEWORK-2_SRC})
    target_include_directories(toy-2 PUBLIC ${GTK3_INCLUDE_DIRS})
    TARGET_LINK_LIBRARIES(toy-2 2Geom::2geom ${GTK3_LIBRARIES})
    if(NOT WIN32 AND NOT APPLE)
    	target_link_libraries(toy-2 -lrt)
    endif()

    FOREACH(source ${2GEOM_TOYS-2_SRC})
        IF(${source} STREQUAL aa)
            ADD_EXECUTABLE(${source} EXCLUDE_FROM_ALL ${source}.cpp)
            TARGET_LINK_LIBRARIES(${source} affa)
        ELSEIF(${source} STREQUAL ineaa)
            ADD_EXECUTABLE(${source} EXCLUDE_FROM_ALL ${source}.cpp)
            TARGET_LINK_LIBRARIES(${source} affa)
        ELSEIF(${source} STREQUAL implicit-toy)
            ADD_EXECUTABLE(${source} EXCLUDE_FROM_ALL ${source}.cpp)
            TARGET_LINK_LIBRARIES(${source} affa)
		ELSEIF(${source} STREQUAL boolops-cgal)
			
        ELSE(${source} STREQUAL aa)
            ADD_EXECUTABLE(${source} ${source}.cpp)
        ENDIF(${source} STREQUAL aa)
        TARGET_LINK_LIBRARIES(${source} toy-2  2Geom::2geom ${GTK3_LIBRARIES} )
    ENDFOREACH(source)
ENDIF(2GEOM_TOYS)