summaryrefslogtreecommitdiff
path: root/cmake/helpers/EflMacros.cmake
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-02-01 12:25:08 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-02-01 12:25:08 -0200
commitb6ded792400c098dbd0c17d39a3a8fee67bedf08 (patch)
tree6005bf90d04aff376b0b0d799f101c8e481a02fe /cmake/helpers/EflMacros.cmake
parent592f356fe5cc64ac6e790d2014edfd11dcfc17a5 (diff)
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.
Diffstat (limited to '')
-rw-r--r--cmake/helpers/EflMacros.cmake19
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
596 596
597 foreach(_e ${LIBRARIES}) 597 foreach(_e ${LIBRARIES})
598 if(TARGET ${_e}) 598 if(TARGET ${_e})
599 get_target_property(_sub_pc_name ${_e} PKG_CONFIG_NAME) 599 if(NOT _e MATCHES "^support-")
600 get_target_property(_sub_version ${_e} VERSION) 600 get_target_property(_sub_pc_name ${_e} PKG_CONFIG_NAME)
601 set(_pkg_config_requires_private "${_pkg_config_requires_private} ${_sub_pc_name}>=${_sub_version}") 601 get_target_property(_sub_version ${_e} VERSION)
602 set(_pkg_config_requires_private "${_pkg_config_requires_private} ${_sub_pc_name}>=${_sub_version}")
603 else()
604 get_target_property(_type ${_e} TYPE)
605 if(_type STREQUAL SHARED_LIBRARY)
606 get_target_property(_oname ${_e} OUTPUT_NAME)
607 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}")
608 endif()
609 endif()
602 else() 610 else()
603 set(_libraries "${_libraries} -l${_e}") 611 set(_libraries "${_libraries} -l${_e}")
604 endif() 612 endif()
@@ -892,9 +900,10 @@ function(EFL_SUPPORT_LIB _target)
892 target_compile_definitions(support-${_target} PRIVATE ${DEFINITIONS}) 900 target_compile_definitions(support-${_target} PRIVATE ${DEFINITIONS})
893 endif() 901 endif()
894 902
895 if(OUTPUT_NAME) 903 if(NOT OUTPUT_NAME)
896 set_target_properties(support-${_target} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME}) 904 set(OUTPUT_NAME "support-${_target}")
897 endif() 905 endif()
906 set_target_properties(support-${_target} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
898 907
899 if(VERSION AND SOVERSION) 908 if(VERSION AND SOVERSION)
900 set_target_properties(support-${_target} PROPERTIES 909 set_target_properties(support-${_target} PROPERTIES