summaryrefslogtreecommitdiff
path: root/cmake/helpers/EflMacros.cmake
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-26 16:16:15 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-26 16:16:15 -0200
commit2ba33b8ff064f9c89b1febb141505f75283a549c (patch)
tree19dedbb1fd64c73ae9a575e85919dedd2e05740f /cmake/helpers/EflMacros.cmake
parentba9938b9506448bef752c3a6fe85041238f4916c (diff)
cmake: add eldbus.
Diffstat (limited to '')
-rw-r--r--cmake/helpers/EflMacros.cmake32
1 files changed, 24 insertions, 8 deletions
diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake
index 7699db348c..8b8711f522 100644
--- a/cmake/helpers/EflMacros.cmake
+++ b/cmake/helpers/EflMacros.cmake
@@ -810,6 +810,8 @@ define_property(TARGET PROPERTY EFL_EO_PUBLIC
810# - DEFINITIONS: target_compile_definitions() 810# - DEFINITIONS: target_compile_definitions()
811# - PUBLIC_EO_FILES: the eo files will be used to build that lib, and will be installed to the filesystem 811# - PUBLIC_EO_FILES: the eo files will be used to build that lib, and will be installed to the filesystem
812# - EO_FILES: the eo files will be used to build that lib but not installed. 812# - EO_FILES: the eo files will be used to build that lib but not installed.
813# - COMPILE_FLAGS: extra CFLAGS to append.
814# - LINK_FLAGS: extra LDFLAGS to append.
813# 815#
814# Defines the following variables that can be used within the included files: 816# Defines the following variables that can be used within the included files:
815# - EFL_LIB_CURRENT to ${Name} 817# - EFL_LIB_CURRENT to ${Name}
@@ -881,6 +883,8 @@ function(EFL_LIB _target)
881 set(DEFINITIONS) 883 set(DEFINITIONS)
882 set(PUBLIC_EO_FILES) 884 set(PUBLIC_EO_FILES)
883 set(EO_FILES) 885 set(EO_FILES)
886 set(COMPILE_FLAGS)
887 set(LINK_FLAGS)
884 888
885 string(TOUPPER "${_target}" _target_uc) 889 string(TOUPPER "${_target}" _target_uc)
886 890
@@ -911,8 +915,8 @@ function(EFL_LIB _target)
911 915
912 EFL_PKG_CONFIG_EVAL(${_target} "${PKG_CONFIG_REQUIRES_PRIVATE}" "${PKG_CONFIG_REQUIRES}") 916 EFL_PKG_CONFIG_EVAL(${_target} "${PKG_CONFIG_REQUIRES_PRIVATE}" "${PKG_CONFIG_REQUIRES}")
913 917
914 set(__link_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_LDFLAGS}) 918 set(__link_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_LDFLAGS} ${LINK_FLAGS})
915 set(__compile_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_CFLAGS} -DPACKAGE_DATA_DIR=\\"${CMAKE_INSTALL_FULL_DATADIR}/${_target}/\\") 919 set(__compile_flags ${${_target}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${${_target}_PKG_CONFIG_REQUIRES_CFLAGS} -DPACKAGE_DATA_DIR=\\"${CMAKE_INSTALL_FULL_DATADIR}/${_target}/\\" ${COMPILE_FLAGS})
916 920
917 set(_link_flags) 921 set(_link_flags)
918 foreach(_l ${__link_flags}) 922 foreach(_l ${__link_flags})
@@ -1031,6 +1035,8 @@ endfunction()
1031# - LIBRARIES: results in target_link_libraries() 1035# - LIBRARIES: results in target_link_libraries()
1032# - DEFINITIONS: target_compile_definitions() 1036# - DEFINITIONS: target_compile_definitions()
1033# - INSTALL_DIR: defaults to bin. If empty, won't install. 1037# - INSTALL_DIR: defaults to bin. If empty, won't install.
1038# - COMPILE_FLAGS: extra CFLAGS to append.
1039# - LINK_FLAGS: extra LDFLAGS to append.
1034# 1040#
1035# NOTE: it's meant to be called by files included by EFL_LIB() or similar, 1041# NOTE: it's meant to be called by files included by EFL_LIB() or similar,
1036# otherwise you need to prepare the environment yourself. 1042# otherwise you need to prepare the environment yourself.
@@ -1051,6 +1057,8 @@ function(EFL_BIN _binname)
1051 set(INSTALL_DIR bin) 1057 set(INSTALL_DIR bin)
1052 set(PKG_CONFIG_REQUIRES) 1058 set(PKG_CONFIG_REQUIRES)
1053 set(PKG_CONFIG_REQUIRES_PRIVATE) 1059 set(PKG_CONFIG_REQUIRES_PRIVATE)
1060 set(COMPILE_FLAGS)
1061 set(LINK_FLAGS)
1054 1062
1055 if(_binname STREQUAL ${EFL_LIB_CURRENT}) 1063 if(_binname STREQUAL ${EFL_LIB_CURRENT})
1056 set(_binsrcdir "${EFL_BIN_SOURCE_DIR}") 1064 set(_binsrcdir "${EFL_BIN_SOURCE_DIR}")
@@ -1112,12 +1120,12 @@ function(EFL_BIN _binname)
1112 endif() 1120 endif()
1113 1121
1114 set(_link_flags) 1122 set(_link_flags)
1115 foreach(_l ${${_bintarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS}) 1123 foreach(_l ${${_bintarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${LINK_FLAGS})
1116 set(_link_flags "${_link_flags} ${_l}") 1124 set(_link_flags "${_link_flags} ${_l}")
1117 endforeach() 1125 endforeach()
1118 1126
1119 set(_compile_flags) 1127 set(_compile_flags)
1120 foreach(_c ${${_bintarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS}) 1128 foreach(_c ${${_bintarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${COMPILE_FLAGS})
1121 set(_compile_flags "${_compile_flags} ${_c}") 1129 set(_compile_flags "${_compile_flags} ${_c}")
1122 endforeach() 1130 endforeach()
1123 1131
@@ -1147,6 +1155,8 @@ endfunction()
1147# ${EFL_LIB_CURRENT}-modules 1155# ${EFL_LIB_CURRENT}-modules
1148# - LIBRARIES: results in target_link_libraries() 1156# - LIBRARIES: results in target_link_libraries()
1149# - DEFINITIONS: target_compile_definitions() 1157# - DEFINITIONS: target_compile_definitions()
1158# - COMPILE_FLAGS: extra CFLAGS to append.
1159# - LINK_FLAGS: extra LDFLAGS to append.
1150# 1160#
1151# NOTE: it's meant to be called by files included by EFL_LIB() or similar, 1161# NOTE: it's meant to be called by files included by EFL_LIB() or similar,
1152# otherwise you need to prepare the environment yourself. 1162# otherwise you need to prepare the environment yourself.
@@ -1170,6 +1180,8 @@ function(EFL_TEST _testname)
1170 set(DEFINITIONS) 1180 set(DEFINITIONS)
1171 set(PKG_CONFIG_REQUIRES) 1181 set(PKG_CONFIG_REQUIRES)
1172 set(PKG_CONFIG_REQUIRES_PRIVATE) 1182 set(PKG_CONFIG_REQUIRES_PRIVATE)
1183 set(COMPILE_FLAGS)
1184 set(LINK_FLAGS)
1173 1185
1174 if(_testname STREQUAL ${EFL_LIB_CURRENT}) 1186 if(_testname STREQUAL ${EFL_LIB_CURRENT})
1175 set(_testsrcdir "${EFL_TESTS_SOURCE_DIR}") 1187 set(_testsrcdir "${EFL_TESTS_SOURCE_DIR}")
@@ -1236,12 +1248,12 @@ function(EFL_TEST _testname)
1236 endif() 1248 endif()
1237 1249
1238 set(_link_flags) 1250 set(_link_flags)
1239 foreach(_l ${${_testtarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS}) 1251 foreach(_l ${${_testtarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${LINK_FLAGS})
1240 set(_link_flags "${_link_flags} ${_l}") 1252 set(_link_flags "${_link_flags} ${_l}")
1241 endforeach() 1253 endforeach()
1242 1254
1243 set(_compile_flags) 1255 set(_compile_flags)
1244 foreach(_c ${${_testtarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS}) 1256 foreach(_c ${${_testtarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${COMPILE_FLAGS})
1245 set(_compile_flags "${_compile_flags} ${_c}") 1257 set(_compile_flags "${_compile_flags} ${_c}")
1246 endforeach() 1258 endforeach()
1247 1259
@@ -1279,6 +1291,8 @@ endfunction()
1279# - PKG_CONFIG_REQUIRES_PRIVATE: results in 1291# - PKG_CONFIG_REQUIRES_PRIVATE: results in
1280# ${Name}_PKG_CONFIG_REQUIRES_PRIVATE. Elements after 'OPTIONAL' 1292# ${Name}_PKG_CONFIG_REQUIRES_PRIVATE. Elements after 'OPTIONAL'
1281# keyword are optional. 1293# keyword are optional.
1294# - COMPILE_FLAGS: extra CFLAGS to append.
1295# - LINK_FLAGS: extra LDFLAGS to append.
1282# 1296#
1283# NOTE: since the file will be included it shouldn't mess with global variables! 1297# NOTE: since the file will be included it shouldn't mess with global variables!
1284function(EFL_MODULE _modname) 1298function(EFL_MODULE _modname)
@@ -1314,6 +1328,8 @@ function(EFL_MODULE _modname)
1314 set(INSTALL_DIR ${_modoutdir}) 1328 set(INSTALL_DIR ${_modoutdir})
1315 set(PKG_CONFIG_REQUIRES) 1329 set(PKG_CONFIG_REQUIRES)
1316 set(PKG_CONFIG_REQUIRES_PRIVATE) 1330 set(PKG_CONFIG_REQUIRES_PRIVATE)
1331 set(COMPILE_FLAGS)
1332 set(LINK_FLAGS)
1317 1333
1318 _EFL_INCLUDE_OR_DETECT("Module ${_modtarget}" ${_modsrcdir}) 1334 _EFL_INCLUDE_OR_DETECT("Module ${_modtarget}" ${_modsrcdir})
1319 1335
@@ -1358,12 +1374,12 @@ function(EFL_MODULE _modname)
1358 target_compile_definitions(${_modtarget} PRIVATE ${DEFINITIONS}) 1374 target_compile_definitions(${_modtarget} PRIVATE ${DEFINITIONS})
1359 1375
1360 set(_link_flags) 1376 set(_link_flags)
1361 foreach(_l ${${_modtarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS}) 1377 foreach(_l ${${_modtarget}_PKG_CONFIG_REQUIRES_PRIVATE_LDFLAGS} ${LINK_FLAGS})
1362 set(_link_flags "${_link_flags} ${_l}") 1378 set(_link_flags "${_link_flags} ${_l}")
1363 endforeach() 1379 endforeach()
1364 1380
1365 set(_compile_flags) 1381 set(_compile_flags)
1366 foreach(_c ${${_modtarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS}) 1382 foreach(_c ${${_modtarget}_PKG_CONFIG_REQUIRES_PRIVATE_CFLAGS} ${COMPILE_FLAGS})
1367 set(_compile_flags "${_compile_flags} ${_c}") 1383 set(_compile_flags "${_compile_flags} ${_c}")
1368 endforeach() 1384 endforeach()
1369 1385