Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Ruslan Baratov
CMake
Commits
e93a4b4d
Commit
e93a4b4d
authored
Sep 07, 2010
by
David Cole
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid adding self as prerequisite. (#10417)
Thanks to Clinton Stimpson for the patch.
parent
409c936f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
Modules/BundleUtilities.cmake
Modules/BundleUtilities.cmake
+1
-1
Modules/GetPrerequisites.cmake
Modules/GetPrerequisites.cmake
+23
-2
No files found.
Modules/BundleUtilities.cmake
View file @
e93a4b4d
...
...
@@ -412,7 +412,7 @@ function(get_bundle_keys app libs dirs keys_var)
# but that do not show up in otool -L output...)
#
foreach
(
lib
${
libs
}
)
set_bundle_key_values
(
${
keys_var
}
"
${
lib
}
"
"
${
lib
}
"
"
${
exepath
}
"
"
${
dirs
}
"
1
)
set_bundle_key_values
(
${
keys_var
}
"
${
lib
}
"
"
${
lib
}
"
"
${
exepath
}
"
"
${
dirs
}
"
0
)
set
(
prereqs
""
)
get_prerequisites
(
"
${
lib
}
"
prereqs 1 1
"
${
exepath
}
"
"
${
dirs
}
"
)
...
...
Modules/GetPrerequisites.cmake
View file @
e93a4b4d
...
...
@@ -634,6 +634,23 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
string
(
REGEX REPLACE
";"
"
\\\\
;"
candidates
"
${
gp_cmd_ov
}
"
)
string
(
REGEX REPLACE
"
\n
"
"
${
eol_char
}
;"
candidates
"
${
candidates
}
"
)
# check for install id and remove it from list, since otool -L can include a
# reference to itself
set
(
gp_install_id
)
if
(
"
${
gp_tool
}
"
STREQUAL
"otool"
)
execute_process
(
COMMAND otool -D
${
target
}
OUTPUT_VARIABLE gp_install_id_ov
)
# second line is install name
string
(
REGEX REPLACE
".*:
\n
"
""
gp_install_id
"
${
gp_install_id_ov
}
"
)
if
(
gp_install_id
)
# trim
string
(
REGEX MATCH
"[^
\n
].*[^
\n
]"
gp_install_id
"
${
gp_install_id
}
"
)
#message("INSTALL ID is \"${gp_install_id}\"")
endif
(
gp_install_id
)
endif
(
"
${
gp_tool
}
"
STREQUAL
"otool"
)
# Analyze each line for file names that match the regular expression:
#
foreach
(
candidate
${
candidates
}
)
...
...
@@ -670,14 +687,18 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
#
set
(
add_item 1
)
if
(
${
exclude_system
}
)
if
(
"
${
item
}
"
STREQUAL
"
${
gp_install_id
}
"
)
set
(
add_item 0
)
endif
(
"
${
item
}
"
STREQUAL
"
${
gp_install_id
}
"
)
if
(
add_item AND
${
exclude_system
}
)
set
(
type
""
)
gp_resolved_file_type
(
"
${
target
}
"
"
${
item
}
"
"
${
exepath
}
"
"
${
dirs
}
"
type
)
if
(
"
${
type
}
"
STREQUAL
"system"
)
set
(
add_item 0
)
endif
(
"
${
type
}
"
STREQUAL
"system"
)
endif
(
${
exclude_system
}
)
endif
(
add_item AND
${
exclude_system
}
)
if
(
add_item
)
list
(
LENGTH
${
prerequisites_var
}
list_length_before_append
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment