mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 13:30:34 +05:00
more robust macro to get WINNT version, fixes error "constant too big" in icon compilation on Windows (thx J. Schickmair)
This commit is contained in:
parent
7078fc999e
commit
ba773c5d7a
@ -110,10 +110,9 @@ add_definitions(-DHAVE_CONFIG_H)
|
||||
# platform specific definitions and flags
|
||||
macro(get_WIN32_WINNT version)
|
||||
if (WIN32 AND CMAKE_SYSTEM_VERSION)
|
||||
set(ver ${CMAKE_SYSTEM_VERSION})
|
||||
string(REPLACE "." "" ver ${ver})
|
||||
string(REGEX REPLACE "([0-9])" "0\\1" ver ${ver})
|
||||
|
||||
if("${CMAKE_SYSTEM_VERSION}" MATCHES "^([0-9]+)\\.([0-9]+)")
|
||||
math(EXPR ver "${CMAKE_MATCH_1}*100 + ${CMAKE_MATCH_2}")
|
||||
endif()
|
||||
set(${version} "0x${ver}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
Loading…
Reference in New Issue
Block a user