summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-23 17:28:48 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-23 17:28:48 -0200
commit8ae1e02f059c96d95b49cb847cc841329077389e (patch)
treead29814389efb3f43034284cb6b9e81d5772156a /cmake
parentf27323395a5b77a863716797a33dc3382c4c3a65 (diff)
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.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/helpers/EflMacros.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake
index 7abf1a9241..807da71d67 100644
--- a/cmake/helpers/EflMacros.cmake
+++ b/cmake/helpers/EflMacros.cmake
@@ -362,11 +362,19 @@ function(EFL_PKG_CONFIG_LIB_WRITE)
362 endforeach() 362 endforeach()
363 363
364 foreach(_e ${LIBRARIES}) 364 foreach(_e ${LIBRARIES})
365 set(_libraries "${_libraries} -l${_e}") 365 if(TARGET ${_e})
366 set(_pkg_config_requires_private "${_pkg_config_requires_private} ${_e}>=${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
367 else()
368 set(_libraries "${_libraries} -l${_e}")
369 endif()
366 endforeach() 370 endforeach()
367 371
368 foreach(_e ${PUBLIC_LIBRARIES}) 372 foreach(_e ${PUBLIC_LIBRARIES})
369 set(_public_libraries "${_public_libraries} -l${_e}") 373 if(TARGET ${_e})
374 set(_pkg_config_requires "${_pkg_config_requires} ${_e}>=${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
375 else()
376 set(_public_libraries "${_public_libraries} -l${_e}")
377 endif()
370 endforeach() 378 endforeach()
371 379
372 if(NOT ${EFL_LIB_CURRENT} STREQUAL "efl") 380 if(NOT ${EFL_LIB_CURRENT} STREQUAL "efl")