Commit aeb44f09 authored by Rashad Kanavath's avatar Rashad Kanavath

PKG: loader regex EOL char must be global or redudant

parent 75ca48d6
......@@ -27,8 +27,8 @@ include(CMakeDetermineSystem)
include(GetPrerequisites)
include(CTest)
#setting this variable prints a lot of debug information
set(PKG_DEBUG OFF)
#setting this variable. prints a lot of debug information
#set( PKG_DEBUG 1)
set(CMAKE_BUILD_TYPE Release)
......
......@@ -18,6 +18,7 @@
# limitations under the License.
#
set(LOADER_REGEX_EOL "E")
set(DEST_BIN_DIR bin)
set(DEST_APP_DIR lib/otb/applications)
......
function(configure_loader loader_pgm_result loader_args_result loader_regex_result)
set(loader_PATHS)
set(eol_char "E")
if(MSVC)
set(loader_PATHS)
set(loader_names "dumpbin")
set(loader_args "/DEPENDENTS")
set(loader_regex "^ ([^ ].*[Dd][Ll][Ll])${eol_char}$")
set(loader_regex "^ ([^ ].*[Dd][Ll][Ll])${LOADER_REGEX_EOL}$")
elseif(APPLE)
set(loader_PATHS)
set(loader_names otool)
set(loader_args "-l" )
set(loader_regex ".*name.*([ ].*dylib ).*${eol_char}$")
set(loader_regex ".*name.*([ ].*dylib ).*${LOADER_REGEX_EOL}$")
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
set(loader_PATHS)
set(loader_names objdump)
set(loader_args "-p" )
set(loader_regex "^..NEEDED.*([ ].*so.*)${eol_char}$")
set(loader_regex "^..NEEDED.*([ ].*so.*)${LOADER_REGEX_EOL}$")
else()
message(FATAL_ERROR "find_loader_and_args: Unknown platform")
endif()
......
......@@ -115,7 +115,7 @@ macro(installer_files)
#install all required files to perform uninstall
install(FILES
Files/uninstall_otb.${SCRIPT_EXT}
Files/uninstall_otb${SCRIPT_EXT}
${CMAKE_BINARY_DIR}/install_manifest_otb.txt
${CMAKE_BINARY_DIR}/cmake_uninstall_otb.cmake
DESTINATION ${PKG_STAGE_DIR})
......
......@@ -2,7 +2,6 @@ function(process_file_recurse input_file)
set(input_file_full_path)
search_library(${input_file} PKG_SEARCHDIRS input_file_full_path)
if(NOT input_file_full_path)
if(LINUX)
setif_value_in_list(is_gtk_lib "${input_file}" ALLOWED_SYSTEM_DLLS)
......@@ -23,7 +22,6 @@ function(process_file_recurse input_file)
message("Processing ${input_file_full_path}")
endif()
install_rule(${input_file_full_path})
set(raw_items)
......@@ -40,7 +38,7 @@ function(process_file_recurse input_file)
endif()
string(REPLACE ";" "\\;" candidates "${loader_ov}")
string(REPLACE "\n" "${eol_char};" candidates "${candidates}")
string(REPLACE "\n" "${LOADER_REGEX_EOL};" candidates "${candidates}")
get_filename_component(bn_name ${input_file_full_path} NAME)
set(${bn_name}_USED TRUE CACHE INTERNAL "")
......@@ -57,7 +55,6 @@ function(process_file_recurse input_file)
if(NOT "${candidate}" MATCHES "${LOADER_REGEX}")
continue()
endif()
string(REGEX REPLACE "${LOADER_REGEX}" "\\1" raw_item "${candidate}")
if(NOT raw_item)
......@@ -67,7 +64,6 @@ function(process_file_recurse input_file)
string(STRIP ${raw_item} raw_item)
set(is_system FALSE)
setif_value_in_list(is_system "${raw_item}" SYSTEM_DLLS)
if(APPLE AND NOT is_system)
if("${raw_item}" MATCHES "@rpath")
string(REGEX REPLACE "@rpath." "" raw_item "${raw_item}")
......
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