Skip to content

Commit

Permalink
update: 最新版本已不再需要根据32bit/64bit区分库文件, 删掉无用代码
Browse files Browse the repository at this point in the history
  • Loading branch information
wysaid committed Jul 20, 2024
1 parent 864e021 commit 91a10b4
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 91a10b4

Please sign in to comment.