Skip to content

Commit bf3df60

Browse files
committed
Don't special case PATCH in the dependencies
Got bitten with winflexbison, so that's a good hint to do what's cleaner in the first place - treat patch the way we do any other subproject.
1 parent d34700b commit bf3df60

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+193
-268
lines changed

CMakeLists.txt

+9-5
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,7 @@ endif (USE_OSPRAY)
288288
# this. We need to address the patch build tool first thing, since any of the
289289
# other ExternalProject_Add builds that follow may depend on it.
290290
###############################################################################
291-
add_subdirectory(patch)
292-
291+
add_project(patch)
293292

294293
###############################################################################
295294
# Although we have bundled flex and bison programs, they can be problematic to
@@ -335,15 +334,20 @@ add_project(astyle GROUPS "BRLCAD")
335334
add_project(lemon GROUPS "BRLCAD")
336335
add_project(re2c GROUPS "BRLCAD")
337336
add_project(perplex GROUPS "BRLCAD")
338-
#add_project(patchelf GROUPS "BRLCAD")
339337
add_project(strclear GROUPS "BRLCAD")
340338
add_project(xmltools GROUPS "BRLCAD") # Used for Docbook building
341339

342-
# This is intended to replace patchelf, but we are currently still
343-
# testing it out
340+
# RPATH editing - LIEF has the core capabilities, and plief exposes them via
341+
# a command line utility with patchelf compatible options, so we can drop
342+
# either patchelf or plief into our upstream workflows.
344343
add_project(lief GROUPS "BRLCAD")
345344
add_project(plief GROUPS "BRLCAD")
346345

346+
# Keeping this set up for easy turn-on until we're confident plief+LIEF has
347+
# all of our use cases covered - plief is preferred, but we've already hit
348+
# one case where a bug in LIEF had to be fixed.
349+
#add_project(patchelf GROUPS "BRLCAD")
350+
347351
###############################################################################
348352
# Build logic is broken out per-library, but the ordering is important. Some
349353
# libraries will depend on others listed here (for example, we want openNURBS

appleseed/CMakeLists.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (ENABLE_APPLESEED)
2020

2121
# git_submodule_init(appleseed CMakeLists.txt)
2222

23-
set(APPLESEED_DEPENDS BOOST EMBREE ONETBB JPEG PNG TIFF LLVM LZ4 OPENCOLORIO OPENEXR OPENIMAGEIO OSL XERCES_C ZLIB)
23+
set(APPLESEED_DEPENDS BOOST EMBREE ONETBB JPEG PATCH PNG TIFF LLVM LZ4 OPENCOLORIO OPENEXR OPENIMAGEIO OSL XERCES_C ZLIB)
2424
TargetVars(APPLESEED_DEPENDS)
2525
if (TARGET ZLIB_BLD)
2626
set(Z_PREFIX_STR "brl_")
@@ -72,10 +72,6 @@ if (ENABLE_APPLESEED)
7272

7373
TargetInstallDeps(APPLESEED APPLESEED_DEPENDS)
7474

75-
if (TARGET PATCH_BLD)
76-
ExternalProject_Add_StepDependencies(APPLESEED_BLD configure PATCH_BLD-install)
77-
endif (TARGET PATCH_BLD)
78-
7975
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
8076
file(MAKE_DIRECTORY ${CMAKE_BUNDLE_INSTALL_PREFIX}/doc/legal/other)
8177
configure_file(

assetimport/CMakeLists.txt

+2-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (ENABLE_ASSETIMPORT)
1919

2020
git_submodule_init(assimp CMakeLists.txt)
2121

22-
set(ASSETIMPORT_DEPENDS ZLIB)
22+
set(ASSETIMPORT_DEPENDS PATCH PUGIXML ZLIB)
2323
TargetVars(ASSETIMPORT_DEPENDS)
2424

2525
if (TARGET ZLIB_BLD)
@@ -35,6 +35,7 @@ if (ENABLE_ASSETIMPORT)
3535
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX=ON>
3636
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX_STR=${Z_PREFIX_STR}>
3737
-DZLIB_ROOT=$<$<BOOL:${ZLIB_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
38+
-DPUGIXML_ROOT=$<$<BOOL:${PUGIXML_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
3839
-DBIN_DIR=${BIN_DIR}
3940
-DLIB_DIR=${LIB_DIR}
4041
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
@@ -58,10 +59,6 @@ if (ENABLE_ASSETIMPORT)
5859

5960
TargetInstallDeps(ASSETIMPORT ASSETIMPORT_DEPENDS)
6061

61-
if (TARGET PATCH_BLD)
62-
ExternalProject_Add_StepDependencies(ASSETIMPORT_BLD configure PATCH_BLD-install)
63-
endif (TARGET PATCH_BLD)
64-
6562
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
6663
file(MAKE_DIRECTORY ${CMAKE_BUNDLE_INSTALL_PREFIX}/doc/legal/other)
6764
configure_file(

astyle/CMakeLists.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ if (ENABLE_ASTYLE)
2020

2121
git_submodule_init(astyle CMakeLists.txt)
2222

23+
set(ASTYLE_DEPENDS PATCH)
24+
TargetVars(ASTYLE_DEPENDS)
25+
2326
ExternalProject_Add(ASTYLE_BLD
2427
URL "${CMAKE_CURRENT_SOURCE_DIR}/astyle"
2528
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
@@ -41,9 +44,7 @@ if (ENABLE_ASTYLE)
4144
STEP_TARGETS install
4245
)
4346

44-
if (TARGET PATCH_BLD)
45-
ExternalProject_Add_StepDependencies(ASTYLE_BLD configure PATCH_BLD-install)
46-
endif (TARGET PATCH_BLD)
47+
TargetInstallDeps(ASTYLE ASTYLE_DEPENDS)
4748

4849
endif (ENABLE_ASTYLE)
4950

boost/CMakeLists.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (ENABLE_BOOST)
1919

2020
git_submodule_init(boost CMakeLists.txt)
2121

22-
set(BOOST_DEPENDS ICU ZLIB ZSTD)
22+
set(BOOST_DEPENDS ICU PATCH ZLIB ZSTD)
2323
TargetVars(BOOST_DEPENDS)
2424

2525
if (TARGET ZLIB_BLD)
@@ -55,9 +55,7 @@ if (ENABLE_BOOST)
5555
STEP_TARGETS install
5656
)
5757

58-
if (TARGET PATCH_BLD)
59-
ExternalProject_Add_StepDependencies(BOOST_BLD configure PATCH_BLD-install)
60-
endif (TARGET PATCH_BLD)
58+
TargetInstallDeps(BOOST BOOST_DEPENDS)
6159

6260
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
6361
file(MAKE_DIRECTORY ${CMAKE_BUNDLE_INSTALL_PREFIX}/doc/legal/other)

deflate/CMakeLists.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ if (ENABLE_DEFLATE)
1919

2020
git_submodule_init(libdeflate CMakeLists.txt)
2121

22+
set(DEFLATE_DEPENDS PATCH)
23+
TargetVars(DEFLATE_DEPENDS)
24+
2225
ExternalProject_Add(DEFLATE_BLD
2326
URL "${CMAKE_CURRENT_SOURCE_DIR}/libdeflate"
2427
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
@@ -40,9 +43,7 @@ if (ENABLE_DEFLATE)
4043
STEP_TARGETS install
4144
)
4245

43-
if (TARGET PATCH_BLD)
44-
ExternalProject_Add_StepDependencies(DEFLATE_BLD configure PATCH_BLD-install)
45-
endif (TARGET PATCH_BLD)
46+
TargetInstallDeps(DEFLATE DEFLATE_DEPENDS)
4647

4748
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
4849
file(MAKE_DIRECTORY ${CMAKE_BUNDLE_INSTALL_PREFIX}/doc/legal/other)

eigen/CMakeLists.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ if (ENABLE_EIGEN)
2020

2121
git_submodule_init(eigen CMakeLists.txt)
2222

23+
set(EIGEN_DEPENDS PATCH)
24+
TargetVars(EIGEN_DEPENDS)
25+
2326
ExternalProject_Add(EIGEN_BLD
2427
URL "${CMAKE_CURRENT_SOURCE_DIR}/eigen"
2528
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
@@ -44,9 +47,7 @@ if (ENABLE_EIGEN)
4447
STEP_TARGETS install
4548
)
4649

47-
if (TARGET PATCH_BLD)
48-
ExternalProject_Add_StepDependencies(EIGEN_BLD configure PATCH_BLD-install)
49-
endif (TARGET PATCH_BLD)
50+
TargetInstallDeps(EIGEN EIGEN_DEPENDS)
5051

5152
endif (ENABLE_EIGEN)
5253

embree/CMakeLists.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (ENABLE_EMBREE)
1919

2020
git_submodule_init(embree CMakeLists.txt)
2121

22-
set(EMBREE_DEPENDS BOOST ISPC ONETBB ZLIB)
22+
set(EMBREE_DEPENDS BOOST ISPC ONETBB PATCH ZLIB)
2323
TargetVars(EMBREE_DEPENDS)
2424
if (TARGET ZLIB_BLD)
2525
set(Z_PREFIX_STR "brl_")
@@ -55,10 +55,6 @@ if (ENABLE_EMBREE)
5555

5656
TargetInstallDeps(EMBREE EMBREE_DEPENDS)
5757

58-
if (TARGET PATCH_BLD)
59-
ExternalProject_Add_StepDependencies(EMBREE_BLD configure PATCH_BLD-install)
60-
endif (TARGET PATCH_BLD)
61-
6258
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
6359
file(MAKE_DIRECTORY ${CMAKE_BUNDLE_INSTALL_PREFIX}/doc/legal/other)
6460
configure_file(

expat/CMakeLists.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ if (ENABLE_EXPAT)
1919

2020
git_submodule_init(libexpat CMakeLists.txt)
2121

22+
set(EXPAT_DEPENDS PATCH)
23+
TargetVars(EXPAT_DEPENDS)
24+
2225
ExternalProject_Add(EXPAT_BLD
2326
URL "${CMAKE_CURRENT_SOURCE_DIR}/libexpat"
2427
SOURCE_SUBDIR expat
@@ -40,9 +43,7 @@ if (ENABLE_EXPAT)
4043
STEP_TARGETS install
4144
)
4245

43-
if (TARGET PATCH_BLD)
44-
ExternalProject_Add_StepDependencies(EXPAT_BLD configure PATCH_BLD-install)
45-
endif (TARGET PATCH_BLD)
46+
TargetInstallDeps(EXPAT EXPAT_DEPENDS)
4647

4748
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
4849
file(MAKE_DIRECTORY ${CMAKE_BUNDLE_INSTALL_PREFIX}/doc/legal/other)

flexbison/CMakeLists.txt

+18-7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ if (WIN32 AND ENABLE_FLEX)
1313

1414
git_submodule_init(winflexbison CMakeLists.txt)
1515

16+
set(FLEX_DEPENDS PATCH)
17+
TargetVars(FLEX_DEPENDS)
18+
1619
ExternalProject_Add(FLEX_BLD
1720
URL "${CMAKE_CURRENT_SOURCE_DIR}/winflexbison"
1821
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
@@ -31,13 +34,19 @@ if (WIN32 AND ENABLE_FLEX)
3134
LOG_OUTPUT_ON_FAILURE ${EXT_BUILD_QUIET}
3235
STEP_TARGETS install
3336
)
37+
38+
TargetInstallDeps(FLEX FLEX_DEPENDS)
39+
3440
endif (WIN32 AND ENABLE_FLEX)
3541

3642
if (NOT WIN32)
3743
if (ENABLE_FLEX)
3844

3945
git_submodule_init(flex configure)
4046

47+
set(FLEX_DEPENDS PATCH)
48+
TargetVars(FLEX_DEPENDS)
49+
4150
set(FLEX_SRC_DIR "${CMAKE_CURRENT_BINARY_DIR}/FLEX_BLD-prefix/src/FLEX_BLD")
4251

4352
ExternalProject_Add(FLEX_BLD
@@ -56,11 +65,17 @@ if (NOT WIN32)
5665
LOG_OUTPUT_ON_FAILURE ${EXT_BUILD_QUIET}
5766
STEP_TARGETS install
5867
)
68+
69+
TargetInstallDeps(FLEX FLEX_DEPENDS)
70+
5971
endif (ENABLE_FLEX)
6072
if (ENABLE_BISON)
6173

6274
git_submodule_init(bison configure)
6375

76+
set(BISON_DEPENDS PATCH)
77+
TargetVars(BISON_DEPENDS)
78+
6479
set(BISON_SRC_DIR "${CMAKE_CURRENT_BINARY_DIR}/BISON_BLD-prefix/src/BISON_BLD")
6580

6681
ExternalProject_Add(BISON_BLD
@@ -80,17 +95,13 @@ if (NOT WIN32)
8095
LOG_OUTPUT_ON_FAILURE ${EXT_BUILD_QUIET}
8196
STEP_TARGETS install
8297
)
98+
99+
TargetInstallDeps(BISON BISON_DEPENDS)
100+
83101
endif (ENABLE_BISON)
84102

85103
endif (NOT WIN32)
86104

87-
if (TARGET PATCH_BLD AND TARGET FLEX_BLD)
88-
ExternalProject_Add_StepDependencies(FLEX_BLD configure PATCH_BLD-install)
89-
endif (TARGET PATCH_BLD AND TARGET FLEX_BLD)
90-
if (TARGET PATCH_BLD AND TARGET BISON_BLD)
91-
ExternalProject_Add_StepDependencies(BISON_BLD configure PATCH_BLD-install)
92-
endif (TARGET PATCH_BLD AND TARGET BISON_BLD)
93-
94105
# Local Variables:
95106
# tab-width: 8
96107
# mode: cmake

fmt/CMakeLists.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ if (ENABLE_FMT)
1919

2020
git_submodule_init(fmt CMakeLists.txt)
2121

22+
set(FMT_DEPENDS PATCH)
23+
TargetVars(FMT_DEPENDS)
24+
2225
ExternalProject_Add(FMT_BLD
2326
URL "${CMAKE_CURRENT_SOURCE_DIR}/fmt"
2427
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
@@ -41,9 +44,7 @@ if (ENABLE_FMT)
4144
STEP_TARGETS install
4245
)
4346

44-
if (TARGET PATCH_BLD)
45-
ExternalProject_Add_StepDependencies(FMT_BLD configure PATCH_BLD-install)
46-
endif (TARGET PATCH_BLD)
47+
TargetInstallDeps(FMT FMT_DEPENDS)
4748

4849
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
4950
file(MAKE_DIRECTORY ${CMAKE_BUNDLE_INSTALL_PREFIX}/doc/legal/other)

gdal/CMakeLists.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (ENABLE_GDAL)
1919

2020
git_submodule_init(gdal CMakeLists.txt)
2121

22-
set(GDAL_DEPENDS PNG PROJ SQLITE3 ZLIB)
22+
set(GDAL_DEPENDS PATCH PNG PROJ SQLITE3 ZLIB)
2323
TargetVars(GDAL_DEPENDS)
2424

2525
if (TARGET ZLIB_BLD)
@@ -177,10 +177,6 @@ if (ENABLE_GDAL)
177177

178178
TargetInstallDeps(GDAL GDAL_DEPENDS)
179179

180-
if (TARGET PATCH_BLD)
181-
ExternalProject_Add_StepDependencies(GDAL_BLD configure PATCH_BLD-install)
182-
endif (TARGET PATCH_BLD)
183-
184180
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
185181
file(MAKE_DIRECTORY ${CMAKE_BUNDLE_INSTALL_PREFIX}/doc/legal/other)
186182
configure_file(

icu/CMakeLists.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ if (NOT WIN32 AND NOT APPLE)
2222

2323
git_submodule_init(icu icu4c/source/configure)
2424

25+
set(ICU_DEPENDS PATCH)
26+
TargetVars(ICU_DEPENDS)
27+
2528
ExternalProject_Add(ICU_BLD
2629
URL "${CMAKE_CURRENT_SOURCE_DIR}/icu"
2730
SOURCE_SUBDIR icu4c/source
@@ -37,9 +40,7 @@ if (NOT WIN32 AND NOT APPLE)
3740
STEP_TARGETS install
3841
)
3942

40-
if (TARGET PATCH_BLD)
41-
ExternalProject_Add_StepDependencies(ICU_BLD configure PATCH_BLD-install)
42-
endif (TARGET PATCH_BLD)
43+
TargetInstallDeps(FMT FMT_DEPENDS)
4344

4445
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
4546
file(MAKE_DIRECTORY ${CMAKE_BUNDLE_INSTALL_PREFIX}/doc/legal/other)

ispc/CMakeLists.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if (ENABLE_ISPC)
2525

2626
git_submodule_init(ispc CMakeLists.txt)
2727

28-
set(ISPC_DEPENDS BISON FLEX LLVM NCURSES ZLIB)
28+
set(ISPC_DEPENDS BISON FLEX PATCH LLVM NCURSES ZLIB)
2929
TargetVars(ISPC_DEPENDS)
3030
if (TARGET ZLIB_BLD)
3131
set(Z_PREFIX_STR "brl_")
@@ -70,10 +70,6 @@ if (ENABLE_ISPC)
7070

7171
TargetInstallDeps(ISPC ISPC_DEPENDS)
7272

73-
if (TARGET PATCH_BLD)
74-
ExternalProject_Add_StepDependencies(ISPC_BLD configure PATCH_BLD-install)
75-
endif (TARGET PATCH_BLD)
76-
7773
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
7874
file(MAKE_DIRECTORY ${CMAKE_BUNDLE_INSTALL_PREFIX}/doc/legal/other)
7975
configure_file(

itcl/CMakeLists.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if (ENABLE_ITCL)
1717

1818
git_submodule_init(itcl CMakeLists.txt)
1919

20-
set(ITCL_DEPENDS TCL)
20+
set(ITCL_DEPENDS PATCH TCL)
2121
TargetVars(ITCL_DEPENDS)
2222

2323
# If we're building ITCL, it's path setup must take into account the
@@ -50,10 +50,6 @@ if (ENABLE_ITCL)
5050

5151
TargetInstallDeps(ITCL ITCL_DEPENDS)
5252

53-
if (TARGET PATCH_BLD)
54-
ExternalProject_Add_StepDependencies(ITCL_BLD configure PATCH_BLD-install)
55-
endif (TARGET PATCH_BLD)
56-
5753
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
5854
file(MAKE_DIRECTORY ${CMAKE_BUNDLE_INSTALL_PREFIX}/doc/legal/other)
5955
configure_file(

itk/CMakeLists.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if (ENABLE_ITK)
3838

3939
git_submodule_init(itk CMakeLists.txt)
4040

41-
set(ITK_DEPENDS TCL TK ITCL)
41+
set(ITK_DEPENDS PATCH TCL TK ITCL)
4242
TargetVars(ITK_DEPENDS)
4343

4444
# If we're building ITK, it's path setup must take into account the
@@ -73,10 +73,6 @@ if (ENABLE_ITK)
7373

7474
TargetInstallDeps(ITK ITK_DEPENDS)
7575

76-
if (TARGET PATCH_BLD)
77-
ExternalProject_Add_StepDependencies(ITK_BLD configure PATCH_BLD-install)
78-
endif (TARGET PATCH_BLD)
79-
8076
# Copy the license into position in CMAKE_BUNDLE_INSTALL_PREFIX
8177
file(MAKE_DIRECTORY ${CMAKE_BUNDLE_INSTALL_PREFIX}/doc/legal/other)
8278
configure_file(

0 commit comments

Comments
 (0)