优化输出目录, 增加构建脚本
This commit is contained in:
parent
2d9ae52f48
commit
9371d67b00
@ -86,15 +86,23 @@ target_link_libraries(WinDevice PRIVATE ${DirectX_LIBS})
|
|||||||
|
|
||||||
# 创建 output 目录
|
# 创建 output 目录
|
||||||
set(OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/output)
|
set(OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/output)
|
||||||
file(MAKE_DIRECTORY ${OUTPUT_DIR})
|
# 获取架构信息
|
||||||
set_target_properties(WinDevice PROPERTIES
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIR}/debug"
|
set(ARCH_DIR "x64")
|
||||||
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIR}/debug"
|
else()
|
||||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIR}/debug"
|
set(ARCH_DIR "x86")
|
||||||
|
endif()
|
||||||
|
|
||||||
ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIR}/release"
|
# 创建架构特定的输出目录
|
||||||
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIR}/release"
|
file(MAKE_DIRECTORY ${OUTPUT_DIR}/${ARCH_DIR})
|
||||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIR}/release"
|
set_target_properties(WinDevice PROPERTIES
|
||||||
|
ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIR}/${ARCH_DIR}/debug"
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIR}/${ARCH_DIR}/debug"
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIR}/${ARCH_DIR}/debug"
|
||||||
|
|
||||||
|
ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIR}/${ARCH_DIR}/release"
|
||||||
|
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIR}/${ARCH_DIR}/release"
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIR}/${ARCH_DIR}/release"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
Loading…
Reference in New Issue
Block a user