GeneratePkgConfig: ignore DEBUG-only dependencies.
GitOrigin-RevId: f4c551006003879bdb079d36fdf3ef76eb553a14
This commit is contained in:
parent
885a9d8e9c
commit
cb0688d792
@ -1,13 +1,15 @@
|
||||
function(get_relative_link REL PATH)
|
||||
function(get_relative_link OUTPUT PATH)
|
||||
get_filename_component(NAME ${PATH} NAME_WE)
|
||||
if(${NAME} MATCHES "^lib")
|
||||
if (${PATH} MATCHES "^[$]<[$]<CONFIG:DEBUG>:")
|
||||
set(LINK "")
|
||||
elseif (${NAME} MATCHES "^lib")
|
||||
string(REGEX REPLACE "^lib" "-l" LINK ${NAME})
|
||||
elseif (${NAME} MATCHES "^-")
|
||||
set(LINK ${NAME})
|
||||
else()
|
||||
string(CONCAT LINK "-l" ${NAME})
|
||||
endif()
|
||||
set(${REL} ${LINK} PARENT_SCOPE)
|
||||
set(${OUTPUT} ${LINK} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(generate_pkgconfig TARGET DESCRIPTION)
|
||||
@ -24,8 +26,10 @@ function(generate_pkgconfig TARGET DESCRIPTION)
|
||||
else()
|
||||
set(HAS_LIBS 1)
|
||||
get_relative_link(LINK ${LIB})
|
||||
if (NOT LINK EQUAL "")
|
||||
list(APPEND LIBS ${LINK})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (HAS_REQS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user