forked from enlightenment/efl
cmake: be smart on internal libraries in the generated .pc files.
For internal libraries (those we have a target), generate a pkg-config one instead of going with the -lNAME route.
This commit is contained in:
parent
f27323395a
commit
8ae1e02f05
|
@ -362,11 +362,19 @@ function(EFL_PKG_CONFIG_LIB_WRITE)
|
|||
endforeach()
|
||||
|
||||
foreach(_e ${LIBRARIES})
|
||||
set(_libraries "${_libraries} -l${_e}")
|
||||
if(TARGET ${_e})
|
||||
set(_pkg_config_requires_private "${_pkg_config_requires_private} ${_e}>=${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
||||
else()
|
||||
set(_libraries "${_libraries} -l${_e}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(_e ${PUBLIC_LIBRARIES})
|
||||
set(_public_libraries "${_public_libraries} -l${_e}")
|
||||
if(TARGET ${_e})
|
||||
set(_pkg_config_requires "${_pkg_config_requires} ${_e}>=${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
||||
else()
|
||||
set(_public_libraries "${_public_libraries} -l${_e}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(NOT ${EFL_LIB_CURRENT} STREQUAL "efl")
|
||||
|
|
Loading…
Reference in New Issue