mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +03:00
cmake: handle tinyb dependency through upm_init_module macro
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
d282d479bb
commit
2a948ca687
@ -155,6 +155,8 @@ pkg_check_modules (OPENZWAVE libopenzwave)
|
|||||||
|
|
||||||
# Check for TinyB
|
# Check for TinyB
|
||||||
pkg_check_modules (TINYB tinyb>=0.5.1)
|
pkg_check_modules (TINYB tinyb>=0.5.1)
|
||||||
|
# And get full path to the tinyb library
|
||||||
|
find_library(TINYB_LIBRARY NAMES tinyb HINTS ${TINYB_LIBDIR})
|
||||||
|
|
||||||
# Find JPEG
|
# Find JPEG
|
||||||
find_package (JPEG)
|
find_package (JPEG)
|
||||||
|
@ -66,6 +66,8 @@ function (_get_dependency_targets target return_variable)
|
|||||||
# reqlibname list (used in various items like pom files, .pc files, etc
|
# reqlibname list (used in various items like pom files, .pc files, etc
|
||||||
elseif (${deplib} MATCHES mraa)
|
elseif (${deplib} MATCHES mraa)
|
||||||
list(APPEND ${return_variable} mraa)
|
list(APPEND ${return_variable} mraa)
|
||||||
|
elseif (${deplib} MATCHES tinyb)
|
||||||
|
list(APPEND ${return_variable} tinyb)
|
||||||
endif (TARGET ${deplib})
|
endif (TARGET ${deplib})
|
||||||
endforeach (deplib ${_dep_libs})
|
endforeach (deplib ${_dep_libs})
|
||||||
# Uniquify
|
# Uniquify
|
||||||
@ -100,6 +102,8 @@ function (_gen_pkg_config_per_target LABEL)
|
|||||||
list(APPEND reqlibname ${deplibname})
|
list(APPEND reqlibname ${deplibname})
|
||||||
elseif (${deplib} MATCHES mraa)
|
elseif (${deplib} MATCHES mraa)
|
||||||
list(APPEND reqlibname mraa)
|
list(APPEND reqlibname mraa)
|
||||||
|
elseif (${deplib} MATCHES tinyb)
|
||||||
|
list(APPEND reqlibname tinyb)
|
||||||
endif (TARGET ${deplib})
|
endif (TARGET ${deplib})
|
||||||
endforeach (deplib ${DEPLIBS})
|
endforeach (deplib ${DEPLIBS})
|
||||||
# Make sure no dups exist
|
# Make sure no dups exist
|
||||||
@ -855,6 +859,9 @@ function(upm_module_init)
|
|||||||
target_link_libraries (${libname} ${MRAA_LIBRARY})
|
target_link_libraries (${libname} ${MRAA_LIBRARY})
|
||||||
# Always add a PUBLIC dependency to MRAA include dirs
|
# Always add a PUBLIC dependency to MRAA include dirs
|
||||||
target_include_directories (${libname} PUBLIC ${MRAA_INCLUDE_DIRS})
|
target_include_directories (${libname} PUBLIC ${MRAA_INCLUDE_DIRS})
|
||||||
|
elseif (${linkflag} MATCHES tinyb)
|
||||||
|
target_link_libraries (${libname} ${TINYB_LIBRARY})
|
||||||
|
target_include_directories (${libname} PUBLIC ${TINYB_INCLUDE_DIRS})
|
||||||
else ()
|
else ()
|
||||||
# Else, add the linkflag directly
|
# Else, add the linkflag directly
|
||||||
target_link_libraries (${libname} ${linkflag})
|
target_link_libraries (${libname} ${linkflag})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user