File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,12 @@ if (POLICY CMP0135)
3636 cmake_policy (SET CMP0135 NEW ) # 3.24
3737endif ()
3838
39+ if (POLICY CMP0114)
40+ cmake_policy (SET CMP0114 NEW ) # 3.19
41+ endif ()
42+
3943include (ExternalProject )
44+ set_property (DIRECTORY PROPERTY EP_STEP_TARGETS download) # parallel downloads
4045include (GNUInstallDirs )
4146include (ProcessorCount )
4247
Original file line number Diff line number Diff line change @@ -68,17 +68,17 @@ else()
6868 INSTALL_COMMAND "${CMAKE_COMMAND } "
6969 -DSRC=<SOURCE_DIR >
7070 -DDST=${COMPONENT_PATH}
71- -DMANIFEST=<BINARY_DIR >/install_manifest .txt
71+ -DMANIFEST=<BINARY_DIR >/package_manifest .txt
7272 -P ${CMAKE_CURRENT_LIST_DIR } /package_install.cmake
7373 BUILD_ALWAYS OFF
7474 )
7575
76- # the package bundles TBB, install after ours to keep it
77- ExternalProject_Add_StepDependencies (${COMPONENT_NAME}
78- install
79- $<$<BOOL :${BUILD_TBB} >:tbb >
80- )
81-
76+ if ( NOT INSTALL_IN_SEPARATE_DIRECTORIES) # bundled deps must not win
77+ ExternalProject_Add_StepDependencies (${COMPONENT_NAME}
78+ install
79+ $<$<BOOL :${BUILD_TBB} >:tbb >
80+ )
81+ endif ()
8282endif ()
8383
8484add_to_prefix_path (${COMPONENT_PATH} )
Original file line number Diff line number Diff line change @@ -42,9 +42,10 @@ ExternalProject_Add(${COMPONENT_NAME}
4242 BUILD_ALWAYS ${ALWAYS_REBUILD}
4343)
4444
45- if (BUILD_TBB)
46- ExternalProject_Add_StepDependencies (${COMPONENT_NAME} configure tbb)
47- endif ()
45+ ExternalProject_Add_StepDependencies (${COMPONENT_NAME}
46+ configure
47+ $<$<BOOL :${BUILD_TBB} >:tbb >
48+ )
4849
4950add_to_prefix_path (${COMPONENT_PATH} )
5051
Original file line number Diff line number Diff line change 33
44# Installs an unpacked pre-built package into DST, keeping files another
55# component installed there already: the packages bundle their dependencies,
6- # which the superbuild builds first, thus first writer wins. Files of the
7- # previous install are removed, thus version bumps still replace them.
6+ # which the superbuild installs first, thus first writer wins. Files of the
7+ # previous install (MANIFEST) are removed first, so version bumps replace them.
88#
99# cmake -DSRC=<dir> -DDST=<dir> -DMANIFEST=<file> -P <this file>
1010
1111cmake_minimum_required (VERSION 3.10 )
1212
13- foreach (ARG SRC DST MANIFEST)
14- if (NOT ${ARG} )
15- message (FATAL_ERROR "package_install.cmake: ${ARG} not set" )
16- endif ()
17- endforeach ()
18-
1913if (EXISTS "${MANIFEST} " )
2014 file (STRINGS "${MANIFEST} " PREVIOUS )
2115 foreach (FILE IN LISTS PREVIOUS)
@@ -26,7 +20,7 @@ endif()
2620file (GLOB_RECURSE FILES RELATIVE "${SRC} " "${SRC} /*" )
2721set (INSTALLED "" )
2822foreach (FILE IN LISTS FILES)
29- if (NOT EXISTS "${DST} /${FILE} " )
23+ if (NOT EXISTS "${DST} /${FILE} " AND NOT IS_SYMLINK " ${DST} / ${FILE} " )
3024 get_filename_component (DIR "${FILE} " DIRECTORY )
3125 file (COPY "${SRC} /${FILE} " DESTINATION "${DST} /${DIR} " )
3226 list (APPEND INSTALLED "${FILE} " )
You can’t perform that action at this time.
0 commit comments