Improved CMake script for 64-bit builds on MS Windows

This commit is contained in:
Bill Somerville 2019-03-25 18:02:50 +00:00
parent 40e710d7f8
commit 303ff7da5f

View File

@ -181,7 +181,11 @@ attach a debugger which will then receive the console output inside its console.
set (PROJECT_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}") set (PROJECT_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
if (NOT PROJECT_ARCHITECTURE) if (NOT PROJECT_ARCHITECTURE)
# This is supposed to happen already on Windows # This is supposed to happen already on Windows
set (PROJECT_ARCHITECTURE "$ENV{PROCESSOR_ARCHITECTURE}") if (CMAKE_SIZEOF_VOID_P MATCHES 8)
set (PROJECT_ARCHITECTURE "x64")
else ()
set (PROJECT_ARCHITECTURE "$ENV{PROCESSOR_ARCHITECTURE}")
endif ()
endif (NOT PROJECT_ARCHITECTURE) endif (NOT PROJECT_ARCHITECTURE)
message (STATUS "******************************************************") message (STATUS "******************************************************")
message (STATUS "Building for for: ${CMAKE_SYSTEM_NAME}-${PROJECT_ARCHITECTURE}") message (STATUS "Building for for: ${CMAKE_SYSTEM_NAME}-${PROJECT_ARCHITECTURE}")
@ -808,7 +812,7 @@ if (WIN32)
endif (NOT AXSERVER) endif (NOT AXSERVER)
string (REPLACE "\"" "" AXSERVER ${AXSERVER}) string (REPLACE "\"" "" AXSERVER ${AXSERVER})
file (TO_CMAKE_PATH ${AXSERVER} AXSERVERSRCS) file (TO_CMAKE_PATH ${AXSERVER} AXSERVERSRCS)
endif (WIN32) endif ()
# #
@ -1632,6 +1636,7 @@ if (NOT is_debug_build)
install ( install (
DIRECTORY DIRECTORY
${QT_PLUGINS_DIR}/platforms ${QT_PLUGINS_DIR}/platforms
${QT_PLUGINS_DIR}/styles
${QT_PLUGINS_DIR}/accessible ${QT_PLUGINS_DIR}/accessible
${QT_PLUGINS_DIR}/audio ${QT_PLUGINS_DIR}/audio
${QT_PLUGINS_DIR}/imageformats ${QT_PLUGINS_DIR}/imageformats