]> Creatis software - cpPlugins.git/blob - lib/cpInstances/CMakeLists.txt
eac073aa8eb411da12cb07163f9920cd1b0f6653
[cpPlugins.git] / lib / cpInstances / CMakeLists.txt
1
2 SET(
3   _definitions
4   BaseObjects
5   Transforms
6   BoundingBox
7   Mesh
8   ScalarImages
9   ComplexImages
10   ColorImages
11   VectorImages
12   MatrixImages
13   Image
14   ImageIterators
15   ImageInterpolators
16   NeighborhoodImageIterators
17   BaseImageFilters
18   ComplexImageFilters
19   ImagesIO
20   UnaryFunctorFilters
21   BinaryFunctorFilters
22   DistanceMapFilters
23   ImageSliceFilters
24   ImageSeparableFilters
25   ExtractImageFilters
26   PolyLineParametricPath
27   Simple3DCurve
28   Skeleton
29   )
30
31 ## =======================
32 ## == Compile instances ==
33 ## =======================
34
35 SET(_all_libs)
36 FOREACH(_d ${_definitions})
37   FILE(GLOB _files ${CMAKE_CURRENT_SOURCE_DIR}/${_d}.*)
38   CreateLib(cpInstances${_d} SHARED ${_files})
39   TARGET_LINK_LIBRARIES(
40     cpInstances${_d}
41     ${ITK_LIBRARIES} ${VTK_LIBRARIES}
42     )
43   LIST(APPEND _all_libs cpInstances${_d})
44 ENDFOREACH(_d)
45
46 ## =====================
47 ## == Further linking ==
48 ## =====================
49
50 SET(_pfx cpInstances)
51 TARGET_LINK_LIBRARIES(${_pfx}BoundingBox ${_pfx}BaseObjects cpPlugins)
52 TARGET_LINK_LIBRARIES(${_pfx}Transforms ${_pfx}BaseObjects)
53 TARGET_LINK_LIBRARIES(${_pfx}Mesh ${_pfx}BoundingBox)
54 TARGET_LINK_LIBRARIES(${_pfx}ScalarImages ${_pfx}BaseObjects)
55 TARGET_LINK_LIBRARIES(${_pfx}ComplexImages ${_pfx}ScalarImages)
56 TARGET_LINK_LIBRARIES(${_pfx}ColorImages ${_pfx}ScalarImages)
57 TARGET_LINK_LIBRARIES(${_pfx}VectorImages ${_pfx}ScalarImages)
58 TARGET_LINK_LIBRARIES(${_pfx}MatrixImages ${_pfx}ScalarImages)
59 TARGET_LINK_LIBRARIES(
60   ${_pfx}Image
61   ${_pfx}ScalarImages
62   ${_pfx}ComplexImages
63   ${_pfx}ColorImages
64   ${_pfx}VectorImages
65   ${_pfx}MatrixImages
66   cpPlugins
67   )
68 TARGET_LINK_LIBRARIES(${_pfx}ImageIterators ${_pfx}Image)
69 TARGET_LINK_LIBRARIES(${_pfx}ImageInterpolators ${_pfx}Image)
70 TARGET_LINK_LIBRARIES(${_pfx}NeighborhoodImageIterators ${_pfx}Image)
71 TARGET_LINK_LIBRARIES(${_pfx}BaseImageFilters ${_pfx}ImageIterators)
72 TARGET_LINK_LIBRARIES(${_pfx}ComplexImageFilters ${_pfx}ImageIterators)
73 TARGET_LINK_LIBRARIES(
74   ${_pfx}ImagesIO
75   ${_pfx}ScalarImages
76   ${_pfx}ColorImages
77   ${_pfx}VectorImages
78   ${_pfx}Image
79   ${_pfx}ImageIterators
80   ${_pfx}BaseImageFilters
81   )
82 TARGET_LINK_LIBRARIES(
83   ${_pfx}UnaryFunctorFilters
84   ${_pfx}Image
85   ${_pfx}ImageIterators
86   ${_pfx}BaseImageFilters
87   )
88 TARGET_LINK_LIBRARIES(
89   ${_pfx}BinaryFunctorFilters
90   ${_pfx}Image
91   ${_pfx}ImageIterators
92   ${_pfx}BaseImageFilters
93   )
94 TARGET_LINK_LIBRARIES(
95   ${_pfx}DistanceMapFilters
96   ${_pfx}UnaryFunctorFilters
97   ${_pfx}Image
98   ${_pfx}ImageIterators
99   ${_pfx}NeighborhoodImageIterators
100   ${_pfx}BaseImageFilters
101   )
102 TARGET_LINK_LIBRARIES(
103   ${_pfx}PolyLineParametricPath
104   ${_pfx}BaseObjects
105   cpPlugins
106   )
107 TARGET_LINK_LIBRARIES(
108   ${_pfx}Simple3DCurve
109   cpExtensions
110   cpPlugins
111   )
112 TARGET_LINK_LIBRARIES(
113   ${_pfx}Skeleton
114   ${_pfx}PolyLineParametricPath
115   )
116 TARGET_LINK_LIBRARIES(
117   ${_pfx}ImageSliceFilters
118   ${_pfx}Image
119   ${_pfx}ImageIterators
120   ${_pfx}NeighborhoodImageIterators
121   ${_pfx}ImageInterpolators
122   ${_pfx}BaseImageFilters
123   ${_pfx}ComplexImageFilters
124   ${_pfx}ExtractImageFilters
125   ${_pfx}Transforms
126   ${_pfx}Simple3DCurve
127   )
128 TARGET_LINK_LIBRARIES(
129   ${_pfx}ImageSeparableFilters
130   ${_pfx}Image
131   ${_pfx}BaseImageFilters
132   ${_pfx}UnaryFunctorFilters
133   )
134 TARGET_LINK_LIBRARIES(
135   ${_pfx}ExtractImageFilters
136   ${_pfx}Image
137   ${_pfx}BaseImageFilters
138   ${_pfx}ComplexImageFilters
139   )
140
141 ## ===================================================
142 ## == Keep track of all created instances libraries ==
143 ## ===================================================
144
145 SET(
146   cpPlugins_AllInstances ${_all_libs}
147   CACHE INTERNAL "All valid instances." FORCE
148   )
149
150 ## eof - $RCSfile$