mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +03:00
src/CMakeLists.txt: "export" lib C and C++ targets to the calling modules
With the switch to using a function rather than a macro, $libname is no longer available to module CMakeLists.txt files. These are useful for adding dependencies (for example a module depending on another module). Now ${libnamec} (for C library) and ${libnamecxx} (for C++ library) targets are made available to the module CMakeLists.txt files for their use. Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
parent
a08b8bbcb0
commit
6ccab10bbf
@ -272,6 +272,11 @@ function (UPM_MIXED_MODULE_INIT)
|
|||||||
if (NOT ${libname} MATCHES "utilities-c")
|
if (NOT ${libname} MATCHES "utilities-c")
|
||||||
target_link_libraries (${libname} utilities-c)
|
target_link_libraries (${libname} utilities-c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
## "export" the logical C lib target for the calling module's
|
||||||
|
## CMakeLists.txt
|
||||||
|
set (libnamec ${libname} PARENT_SCOPE)
|
||||||
|
|
||||||
endif (UPM_MIXED_MODULE_INIT_C_SRC)
|
endif (UPM_MIXED_MODULE_INIT_C_SRC)
|
||||||
|
|
||||||
# Build C++ if enabled AND C++ headers exist
|
# Build C++ if enabled AND C++ headers exist
|
||||||
@ -292,7 +297,13 @@ function (UPM_MIXED_MODULE_INIT)
|
|||||||
if (UPM_MIXED_MODULE_INIT_CPP_WRAPS_C)
|
if (UPM_MIXED_MODULE_INIT_CPP_WRAPS_C)
|
||||||
target_link_libraries(${libname} ${libname}-c)
|
target_link_libraries(${libname} ${libname}-c)
|
||||||
endif (UPM_MIXED_MODULE_INIT_CPP_WRAPS_C)
|
endif (UPM_MIXED_MODULE_INIT_CPP_WRAPS_C)
|
||||||
|
|
||||||
|
## "export" the logical C++ lib target for the calling module's
|
||||||
|
## CMakeLists.txt
|
||||||
|
set (libnamecxx ${libname} PARENT_SCOPE)
|
||||||
|
|
||||||
endif (BUILDCPP AND UPM_MIXED_MODULE_INIT_CPP_HDR)
|
endif (BUILDCPP AND UPM_MIXED_MODULE_INIT_CPP_HDR)
|
||||||
|
|
||||||
endfunction (UPM_MIXED_MODULE_INIT)
|
endfunction (UPM_MIXED_MODULE_INIT)
|
||||||
|
|
||||||
macro(upm_module_init)
|
macro(upm_module_init)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user