forked from enlightenment/efl
cmake: handle support libraries in .pc
support libraries (src/static_libs), such as rg_etc, must not be handled as a regular target, after all these are usually not shared library and if they are, they have no .pc associated, then we use "-l" as for system libraries, but using the installation path.
This commit is contained in:
parent
592f356fe5
commit
b6ded79240
|
@ -596,9 +596,17 @@ eolian_flags=-I\${pc_sysrootdir}\${eoincludedir}/${EFL_LIB_CURRENT}-${PROJECT_VE
|
||||||
|
|
||||||
foreach(_e ${LIBRARIES})
|
foreach(_e ${LIBRARIES})
|
||||||
if(TARGET ${_e})
|
if(TARGET ${_e})
|
||||||
get_target_property(_sub_pc_name ${_e} PKG_CONFIG_NAME)
|
if(NOT _e MATCHES "^support-")
|
||||||
get_target_property(_sub_version ${_e} VERSION)
|
get_target_property(_sub_pc_name ${_e} PKG_CONFIG_NAME)
|
||||||
set(_pkg_config_requires_private "${_pkg_config_requires_private} ${_sub_pc_name}>=${_sub_version}")
|
get_target_property(_sub_version ${_e} VERSION)
|
||||||
|
set(_pkg_config_requires_private "${_pkg_config_requires_private} ${_sub_pc_name}>=${_sub_version}")
|
||||||
|
else()
|
||||||
|
get_target_property(_type ${_e} TYPE)
|
||||||
|
if(_type STREQUAL SHARED_LIBRARY)
|
||||||
|
get_target_property(_oname ${_e} OUTPUT_NAME)
|
||||||
|
set(_libraries "${_libraries} -l${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/efl/support/v-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}/${CMAKE_SHARED_LIBRARY_PREFIX}${_oname}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(_libraries "${_libraries} -l${_e}")
|
set(_libraries "${_libraries} -l${_e}")
|
||||||
endif()
|
endif()
|
||||||
|
@ -892,9 +900,10 @@ function(EFL_SUPPORT_LIB _target)
|
||||||
target_compile_definitions(support-${_target} PRIVATE ${DEFINITIONS})
|
target_compile_definitions(support-${_target} PRIVATE ${DEFINITIONS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(OUTPUT_NAME)
|
if(NOT OUTPUT_NAME)
|
||||||
set_target_properties(support-${_target} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
|
set(OUTPUT_NAME "support-${_target}")
|
||||||
endif()
|
endif()
|
||||||
|
set_target_properties(support-${_target} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
|
||||||
|
|
||||||
if(VERSION AND SOVERSION)
|
if(VERSION AND SOVERSION)
|
||||||
set_target_properties(support-${_target} PROPERTIES
|
set_target_properties(support-${_target} PROPERTIES
|
||||||
|
|
Loading…
Reference in New Issue