diff options
author | Gustavo Sverzut Barbieri <barbieri@profusion.mobi> | 2017-02-01 12:25:08 -0200 |
---|---|---|
committer | Gustavo Sverzut Barbieri <barbieri@profusion.mobi> | 2017-02-01 12:25:08 -0200 |
commit | b6ded792400c098dbd0c17d39a3a8fee67bedf08 (patch) | |
tree | 6005bf90d04aff376b0b0d799f101c8e481a02fe | |
parent | 592f356fe5cc64ac6e790d2014edfd11dcfc17a5 (diff) | |
download | efl-b6ded792400c098dbd0c17d39a3a8fee67bedf08.tar.gz |
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.
-rw-r--r-- | cmake/helpers/EflMacros.cmake | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake index 3c0d7d308b..c48270e1f2 100644 --- a/cmake/helpers/EflMacros.cmake +++ b/cmake/helpers/EflMacros.cmake @@ -596,9 +596,17 @@ eolian_flags=-I\${pc_sysrootdir}\${eoincludedir}/${EFL_LIB_CURRENT}-${PROJECT_VE foreach(_e ${LIBRARIES}) if(TARGET ${_e}) - get_target_property(_sub_pc_name ${_e} PKG_CONFIG_NAME) - get_target_property(_sub_version ${_e} VERSION) - set(_pkg_config_requires_private "${_pkg_config_requires_private} ${_sub_pc_name}>=${_sub_version}") + if(NOT _e MATCHES "^support-") + get_target_property(_sub_pc_name ${_e} PKG_CONFIG_NAME) + 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() set(_libraries "${_libraries} -l${_e}") endif() @@ -892,9 +900,10 @@ function(EFL_SUPPORT_LIB _target) target_compile_definitions(support-${_target} PRIVATE ${DEFINITIONS}) endif() - if(OUTPUT_NAME) - set_target_properties(support-${_target} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME}) + if(NOT OUTPUT_NAME) + set(OUTPUT_NAME "support-${_target}") endif() + set_target_properties(support-${_target} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME}) if(VERSION AND SOVERSION) set_target_properties(support-${_target} PROPERTIES |