Commit 529b53be authored by Guillaume Pasero's avatar Guillaume Pasero

PKG: fix detection of shared objects

parent 7bd51369
......@@ -115,10 +115,10 @@ function(detect_using_file_command input_file result_type result_dir)
# Patch file command returning shared-oject for executable on Linux when -PIE is used.
if( LINUX )
get_filename_component( input_file_DIR ${input_file} DIRECTORY )
get_filename_component( input_file_dIR ${input_file_DIR} NAME )
string( TOLOWER "${input_file_DIR}" input_file_DIR )
if( ${input_file_DIR} MATCHES "bin" )
message( WARNING "${input_file} detected as shared-object." )
get_filename_component( dir_name ${input_file_DIR} NAME )
string( TOLOWER "${dir_name}" dir_name_l )
if( "${dir_name_l}" STREQUAL "bin" )
message( STATUS "${input_file} detected as shared-object, but processed as executable" )
set(detected_type PROGRAMS)
set(detected_dir bin)
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment