build: Fixed more SDK errors
This commit is contained in:
parent
8b6eab401e
commit
84954cd2f1
@ -12,7 +12,7 @@ endif()
|
||||
|
||||
function(getTarget target type)
|
||||
get_target_property(IMPORTED_TARGET ${target} IMPORTED)
|
||||
if (${IMPORTED_TARGET})
|
||||
if (IMPORTED_TARGET)
|
||||
set(${type} INTERFACE PARENT_SCOPE)
|
||||
else()
|
||||
set(${type} PRIVATE PARENT_SCOPE)
|
||||
@ -46,6 +46,15 @@ function(addObjCFlag)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(addLinkerFlag)
|
||||
if (ARGC EQUAL 1)
|
||||
add_link_options(${ARGV0})
|
||||
elseif (ARGC EQUAL 2)
|
||||
getTarget(${ARGV1} TYPE)
|
||||
target_link_options(${ARGV1} ${TYPE} ${ARGV0})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(addCCXXFlag)
|
||||
addCFlag(${ARGV0} ${ARGV1})
|
||||
addCXXFlag(${ARGV0} ${ARGV1})
|
||||
@ -641,7 +650,7 @@ macro(setupCompilerFlags target)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
if (WIN32)
|
||||
target_link_options(${target} PUBLIC "-Wa,mbig-obj")
|
||||
addLinkerFlag("-Wa,mbig-obj" ${target})
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user