Commit 87cc629
committed
ENH: Use target-based includes for ITK modules
Replace directory-level include_directories() with target-based
include properties to enable modern CMake practices and support
proper transitive include propagation.
Changes:
1. Created ${itk-module}_GENEX_INCLUDE_DIRS and ${itk-module}_SYSTEM_GENEX_INCLUDE_DIRS
- Use generator expressions for BUILD_INTERFACE and INSTALL_INTERFACE paths
- Variables produced in each module's CMake configuration file
- Enables proper include path handling in build and install trees
2. Modified itk_module_add_library() to apply target properties
- Uses target_include_directories() instead of directory-level includes
- Uses target_link_directories() for system library directories
- Ensures proper PUBLIC include propagation
3. Updated ITKModuleHeaderTest.cmake
- Added module include directories to header test targets
- Fixes compilation errors for header-only modules
4. Maintain directory level include for ThirdParty modules
Compatibility Notes:
- Modules not using itk_module_add_library() may need directory-level
include_directories() added explicitly
- External modules should update to use itk_module_add_library()1 parent 32b0d07 commit 87cc629
2 files changed
+72
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
129 | 144 | | |
130 | 145 | | |
131 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
204 | 207 | | |
205 | | - | |
206 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
207 | 223 | | |
208 | 224 | | |
209 | 225 | | |
210 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
211 | 234 | | |
212 | 235 | | |
213 | 236 | | |
| |||
371 | 394 | | |
372 | 395 | | |
373 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
374 | 403 | | |
375 | 404 | | |
376 | 405 | | |
| |||
626 | 655 | | |
627 | 656 | | |
628 | 657 | | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
629 | 677 | | |
630 | 678 | | |
631 | 679 | | |
| |||
0 commit comments