Commit e0f3db1e authored by Rashad Kanavath's avatar Rashad Kanavath

PKG: fixup mxe gcc dir and list of system dlls exceptions

parent 9808e5f6
......@@ -15,6 +15,8 @@ macro(package_mingw)
set(MXE_OBJDUMP "${PACKAGE_MXEROOT}/usr/bin/x86_64-w64-mingw32.shared-objdump")
endif()
file(GLOB MXE_GCC_LIB_DIR "${MXE_BIN_DIR}/gcc*")
list(APPEND PACKAGE_SEARCHDIRS ${MXE_GCC_LIB_DIR})
list(APPEND PACKAGE_SEARCHDIRS ${MXE_BIN_DIR})
list(APPEND PACKAGE_SEARCHDIRS "${MXE_BIN_DIR}/../qt/bin") #Qt
list(APPEND PACKAGE_SEARCHDIRS "${MXE_BIN_DIR}/../qt/lib") #Qwt
......@@ -42,39 +44,35 @@ macro(package_mingw)
endmacro(package_mingw)
SET(SYSTEM_DLLS
set(SYSTEM_DLLS
msvc.*dll
USER32.dll
GDI32.dll
SHELL32.DLL
KERNEL32.dll
ADVAPI32.dll
CRYPT32.dll
WS2_32.dll
user32.dll
gdi32.dll
shell32.dll
kernel32.dll
advapi32.dll
crypt32.dll
ws2_32.dll
wldap32.dll
ole32.dll
OPENGL32.DLL
GLU32.DLL
COMDLG32.DLL
IMM32.DLL
OLEAUT32.dll
COMCTL32.DLL
WINMM.DLL
SHELL32.dll
WLDAP32.dll
OPENGL32.dll
GLU32.dll
opengl32.dll
glu32.dll
comdlg32.dll
IMM32.dll
WINMM.dll
WINSPOOL.DRV)
## http://www.cmake.org/Wiki/CMakeMacroListOperations
macro(IS_SYSTEM_DLL matched value)
imm32.dll
oleaut32.dll
comctl32.dll
winmm.dll
shfolder.dll
secur32.dll
wsock32.dll
winspool.drv)
macro(is_system_dll matched value)
set(${matched})
string(TOLOWER ${value} value_)
foreach (pattern ${SYSTEM_DLLS})
if(${value} MATCHES ${pattern})
string(TOLOWER ${pattern} pattern_)
if(${value_} MATCHES ${pattern_})
set(${matched} TRUE)
endif()
endforeach()
......@@ -90,9 +88,7 @@ macro(list_contains var value)
endmacro()
function(process_deps infile)
get_filename_component(bn ${infile} NAME)
list_contains(contains "${bn}" "${alldlls}")
if(NOT contains)
set(DLL_FOUND FALSE)
......@@ -100,14 +96,20 @@ function(process_deps infile)
if(NOT DLL_FOUND)
if(EXISTS ${SEARCHDIR}/${infile})
set(DLL_FOUND TRUE)
else()
string(TOLOWER ${infile} infile_lower)
if(EXISTS ${SEARCHDIR}/${infile_lower})
set(DLL_FOUND TRUE)
set(infile ${infile_lower})
endif()
endif()
if(DLL_FOUND)
message(STATUS "Processing ${SEARCHDIR}/${infile}")
if(NOT "${infile}" MATCHES "otbapp")
install(
FILES "${SEARCHDIR}/${infile}"
install(FILES "${SEARCHDIR}/${infile}"
DESTINATION ${PACKAGE_PREFIX_DIR}/bin)
else()
##message(STATUS "skipping..${infile}")
endif()
if(NOT EXISTS ${MXE_OBJDUMP})
message(FATAL_ERROR "objdump executable not found. please check MXE_OBJDUMP is set to correct cross compiled executable")
......
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