mirror of
https://github.com/reactos/CMake.git
synced 2024-12-01 07:20:22 +00:00
CMP0022: Add test for target_link_libraries plain signature
This commit is contained in:
parent
c0f4a61074
commit
0e06788c0a
@ -28,3 +28,10 @@ endif()
|
||||
|
||||
add_executable(staticlib_exe staticlib_exe.cpp)
|
||||
target_link_libraries(staticlib_exe staticlib1)
|
||||
|
||||
add_library(onlyplainlib1 SHARED onlyplainlib1.cpp)
|
||||
add_library(onlyplainlib2 SHARED onlyplainlib2.cpp)
|
||||
target_link_libraries(onlyplainlib2 onlyplainlib1)
|
||||
|
||||
add_executable(onlyplainlib_user onlyplainlib_user.cpp)
|
||||
target_link_libraries(onlyplainlib_user onlyplainlib2)
|
||||
|
@ -0,0 +1,13 @@
|
||||
|
||||
#include "onlyplainlib1.h"
|
||||
|
||||
OnlyPlainLib1::OnlyPlainLib1()
|
||||
: result(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int OnlyPlainLib1::GetResult()
|
||||
{
|
||||
return result;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
|
||||
struct
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
OnlyPlainLib1
|
||||
{
|
||||
OnlyPlainLib1();
|
||||
|
||||
int GetResult();
|
||||
|
||||
private:
|
||||
int result;
|
||||
};
|
@ -0,0 +1,8 @@
|
||||
|
||||
#include "onlyplainlib2.h"
|
||||
|
||||
OnlyPlainLib1 onlyPlainLib2()
|
||||
{
|
||||
OnlyPlainLib1 opl1;
|
||||
return opl1;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
|
||||
#include "onlyplainlib1.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
OnlyPlainLib1 onlyPlainLib2();
|
@ -0,0 +1,7 @@
|
||||
|
||||
#include "onlyplainlib2.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
return onlyPlainLib2().GetResult();
|
||||
}
|
Loading…
Reference in New Issue
Block a user