Merge topic 'fix-FindPackageMode-symlink'
0b86388
CMakeFindPackageMode: fix 32/64bit detection if 'file' is a symlink
This commit is contained in:
commit
0eb520f47c
|
@ -71,7 +71,8 @@ if(UNIX)
|
||||||
# use the file utility to check whether itself is 64 bit:
|
# use the file utility to check whether itself is 64 bit:
|
||||||
find_program(FILE_EXECUTABLE file)
|
find_program(FILE_EXECUTABLE file)
|
||||||
if(FILE_EXECUTABLE)
|
if(FILE_EXECUTABLE)
|
||||||
execute_process(COMMAND "${FILE_EXECUTABLE}" "${FILE_EXECUTABLE}" OUTPUT_VARIABLE fileOutput ERROR_QUIET)
|
get_filename_component(FILE_ABSPATH "${FILE_EXECUTABLE}" ABSOLUTE)
|
||||||
|
execute_process(COMMAND "${FILE_ABSPATH}" "${FILE_ABSPATH}" OUTPUT_VARIABLE fileOutput ERROR_QUIET)
|
||||||
if("${fileOutput}" MATCHES "64-bit")
|
if("${fileOutput}" MATCHES "64-bit")
|
||||||
set(CMAKE_SIZEOF_VOID_P 8)
|
set(CMAKE_SIZEOF_VOID_P 8)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue