-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d86cd4d
commit e612989
Showing
6 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/tests/Interop/DllImportSearchPaths/NativeLibraryWithDependency/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
project(NativeLibraryWithDependency) | ||
include("${CLR_INTEROP_TEST_ROOT}/Interop.cmake") | ||
|
||
add_library(Dependency SHARED Dependency.cpp) | ||
target_link_libraries(Dependency PRIVATE ${LINK_LIBRARIES_ADDITIONAL}) | ||
|
||
add_library(NativeLibraryWithDependency SHARED NativeLibraryWithDependency.cpp) | ||
target_link_libraries(NativeLibraryWithDependency PRIVATE Dependency ${LINK_LIBRARIES_ADDITIONAL}) |
10 changes: 10 additions & 0 deletions
10
src/tests/Interop/DllImportSearchPaths/NativeLibraryWithDependency/Dependency.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
#include <platformdefines.h> | ||
|
||
extern "C" DLL_EXPORT int STDMETHODCALLTYPE Sum(int a, int b) | ||
{ | ||
return a + b; | ||
} | ||
|
12 changes: 12 additions & 0 deletions
12
.../Interop/DllImportSearchPaths/NativeLibraryWithDependency/NativeLibraryWithDependency.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
#include <platformdefines.h> | ||
|
||
extern "C" int STDMETHODCALLTYPE Sum(int a, int b); | ||
|
||
extern "C" DLL_EXPORT int STDMETHODCALLTYPE CallDependencySum(int a, int b) | ||
{ | ||
return Sum(a, b); | ||
} | ||
|