修改构建配置
This commit is contained in:
@@ -19,11 +19,14 @@ add_library(Transmission
|
||||
CharBuff.cpp
|
||||
Exception/PrepareDataException.h
|
||||
)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
if(NOT DEFINED TARGET_SYSTEM_NAME)
|
||||
set(TARGET_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
|
||||
message("使用默认目标 : ${TARGET_SYSTEM_NAME}")
|
||||
endif ()
|
||||
if (${TARGET_SYSTEM_NAME} STREQUAL "Linux")
|
||||
add_definitions(-DBUILD_LINUX=1)
|
||||
message("以Linux为构建目标")
|
||||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
elseif (${TARGET_SYSTEM_NAME} STREQUAL "Windows")
|
||||
add_definitions(-DBUILD_WINDOWS=1)
|
||||
message("以Windows为构建目标")
|
||||
else ()
|
||||
|
||||
Reference in New Issue
Block a user