From 91a10b464bb7a132dd7f621aed112999ea4d06ce Mon Sep 17 00:00:00 2001 From: Wang Yang Date: Sun, 21 Jul 2024 02:04:24 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=9C=80=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=B7=B2=E4=B8=8D=E5=86=8D=E9=9C=80=E8=A6=81=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?32bit/64bit=E5=8C=BA=E5=88=86=E5=BA=93=E6=96=87=E4=BB=B6,=20?= =?UTF-8?q?=E5=88=A0=E6=8E=89=E6=97=A0=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a67c094..eb13c66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,25 +117,17 @@ else () endif () # 设置库文件名 -math(EXPR TARGET_BITS "8 * ${CMAKE_SIZEOF_VOID_P}") -if (TARGET_BITS EQUAL 64) - set_property(TARGET xege PROPERTY OUTPUT_NAME graphics) -elseif (TARGET_BITS EQUAL 32) - set_property(TARGET xege PROPERTY OUTPUT_NAME graphics) -else () - # 非 32/64 位编译器 - message(FATAL_ERROR "XEGE does not support ${TARGET_BITS}bit compiler") -endif () +set_property(TARGET xege PROPERTY OUTPUT_NAME graphics) # 打印编译器信息 if (MSVC) - message(STATUS "${TARGET_BITS}bit MSVC target: MSVC ${MSVC_VERSION}") + message(STATUS "MSVC target: MSVC ${MSVC_VERSION}") target_compile_options(xege PRIVATE /MP /MT /Zl) elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") - message(STATUS "${TARGET_BITS}bit GNU target: GCC ${CMAKE_C_COMPILER_VERSION}") + message(STATUS "GNU target: GCC ${CMAKE_C_COMPILER_VERSION}") else () if (CMAKE_CXX_COMPILER_ID) message(FATAL_ERROR "Unsupported compiler: ${CMAKE_CXX_COMPILER_ID}")