Skip to content
Snippets Groups Projects
Commit c8e8b0fc authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

Revert "PKG: XDK: fix is executable2 function for windows (check .exe and .dll)"

This reverts commit 133cbd1a.
parent 133cbd1a
No related branches found
No related tags found
No related merge requests found
......@@ -266,20 +266,23 @@ function(func_is_file_a_symbolic_link file result_var1 result_var2)
get_filename_component(file_full "${file}" ABSOLUTE)
string(TOLOWER "${file_full}" file_full_lower)
# If file name ends in .exe on Windows, *assume* executable.
# And If file name ends in .dll on Windows, *assume* libary.
# If file name ends in .exe on Windows, *assume* executable:
#
if(WIN32 AND NOT UNIX)
if("${file_full_lower}" MATCHES "(\\.exe|\\.dll)$")
set(${result_var} 1 PARENT_SCOPE)
if("${file_full_lower}" MATCHES "\\.lnk$")
set(${result_var1} 1 PARENT_SCOPE)
#Assuming the file is linked to a file with same name without .lnk extension
get_filename_component(name_we_lnk "${file_full_lower}" NAME_WE)
set(${result_var2} "${name_we_lnk}" PARENT_SCOPE)
return()
endif()
# A clause could be added here that uses output or return value of dumpbin
# to determine ${result_var}. In 99%+? practical cases, the exe name
# match will be sufficient...
#
endif()
# Use the information returned from the Unix shell command "file" to
# determine if ${file_full} should be considered an executable file...
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment