File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,8 +148,12 @@ endif(MINGW)
148148
149149### Define library
150150add_library(zlibstat STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
151- if (MSVC AND CMAKE_CL_64)
152- set_target_properties (zlibstat PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
151+ if (MSVC)
152+ if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(AMD64|x86_64)$")
153+ set_target_properties(${ZLIB_LIB_TARGET} PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
154+ elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
155+ set_target_properties(${ZLIB_LIB_TARGET} PROPERTIES STATIC_LIBRARY_FLAGS "/machine:ARM64")
156+ endif()
153157endif ()
154158set_target_properties(zlibstat PROPERTIES
155159 PUBLIC_HEADER ""
Original file line number Diff line number Diff line change @@ -146,8 +146,12 @@ set (LZF_SRCS
146146
147147add_library (${LZF_LIB_TARGET} STATIC ${LZF_SRCS} ${LZF_HDRS} ${LZF_PUBLIC_HEADERS} )
148148
149- if (MSVC AND CMAKE_CL_64 )
150- set_target_properties (${LZF_LIB_TARGET} PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64" )
149+ if (MSVC )
150+ if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(AMD64|x86_64)$" )
151+ set_target_properties (${ZLIB_LIB_TARGET} PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64" )
152+ elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" )
153+ set_target_properties (${ZLIB_LIB_TARGET} PROPERTIES STATIC_LIBRARY_FLAGS "/machine:ARM64" )
154+ endif ()
151155endif ()
152156TARGET_C_PROPERTIES (${LZF_LIB_TARGET} STATIC )
153157target_link_libraries (${LZF_LIB_TARGET} ${H5PL_LINK_LIBS} )
You can’t perform that action at this time.
0 commit comments