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