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