aea1b03617
The target_link_libraries command records the PRIVATE dependencies of a STATIC library in INTERFACE_LINK_LIBRARIES as "$<LINK_ONLY:dep>". This hides the target name from export namespacing logic inside a generator expression. When user-written generator expressions reference a target name they must put it inside a "$<TARGET_NAME:dep>" expression to allow the export logic to rename the target. In the case that the private dependency is not already a generator expression, target_link_libraries must use "$<LINK_ONLY:$<TARGET_NAME:dep>>" to allow the export logic to rename the target. Reported-by: Tamás Kenéz <tamas.kenez@gmail.com>
26 lines
521 B
C
26 lines
521 B
C
|
|
#include "testLibIncludeRequired1.h"
|
|
#include "testLibIncludeRequired2.h"
|
|
#include "testLibIncludeRequired4.h"
|
|
|
|
#ifndef testLibRequired_IFACE_DEFINE
|
|
#error Expected testLibRequired_IFACE_DEFINE
|
|
#endif
|
|
|
|
#ifndef BuildOnly_DEFINE
|
|
#error Expected BuildOnly_DEFINE
|
|
#endif
|
|
|
|
#ifdef InstallOnly_DEFINE
|
|
#error Unexpected InstallOnly_DEFINE
|
|
#endif
|
|
|
|
extern int testLibRequired(void);
|
|
extern int testStaticLibRequiredPrivate(void);
|
|
|
|
int testLibDepends(void) {
|
|
return testLibRequired()
|
|
+ testStaticLibRequiredPrivate()
|
|
;
|
|
}
|