ENH: Added framework to ExportImport test.
This commit is contained in:
parent
28ea034737
commit
611bff2c1b
@ -16,18 +16,22 @@ target_link_libraries(testLib2 testLib1)
|
|||||||
|
|
||||||
add_library(testLib3 SHARED testLib3.c)
|
add_library(testLib3 SHARED testLib3.c)
|
||||||
|
|
||||||
|
add_library(testLib4 SHARED testLib4.c)
|
||||||
|
set_property(TARGET testLib4 PROPERTY FRAMEWORK 1)
|
||||||
|
|
||||||
# Install and export from install tree.
|
# Install and export from install tree.
|
||||||
install(
|
install(
|
||||||
TARGETS testExe1 testLib1 testLib2 testExe2 testLib3
|
TARGETS testExe1 testLib1 testLib2 testExe2 testLib3 testLib4
|
||||||
EXPORT exp
|
EXPORT exp
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
|
FRAMEWORK DESTINATION Frameworks
|
||||||
)
|
)
|
||||||
install(EXPORT exp NAMESPACE exp_ DESTINATION lib/exp)
|
install(EXPORT exp NAMESPACE exp_ DESTINATION lib/exp)
|
||||||
|
|
||||||
# Export from build tree.
|
# Export from build tree.
|
||||||
export(TARGETS testExe1 testLib1 testLib2 testExe2 testLib3
|
export(TARGETS testExe1 testLib1 testLib2 testExe2 testLib3 testLib4
|
||||||
NAMESPACE bld_
|
NAMESPACE bld_
|
||||||
FILE ExportBuildTree.cmake
|
FILE ExportBuildTree.cmake
|
||||||
)
|
)
|
||||||
|
7
Tests/ExportImport/Export/testLib4.c
Normal file
7
Tests/ExportImport/Export/testLib4.c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
|
# define testLib4_EXPORT __declspec(dllexport)
|
||||||
|
#else
|
||||||
|
# define testLib4_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
testLib4_EXPORT int testLib4(void) { return 0; }
|
@ -24,7 +24,7 @@ add_executable(imp_testExe1
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Try linking to a library imported from the install tree.
|
# Try linking to a library imported from the install tree.
|
||||||
target_link_libraries(imp_testExe1 exp_testLib2 exp_testLib3)
|
target_link_libraries(imp_testExe1 exp_testLib2 exp_testLib3 exp_testLib4)
|
||||||
|
|
||||||
# Try building a plugin to an executable imported from the install tree.
|
# Try building a plugin to an executable imported from the install tree.
|
||||||
add_library(imp_mod1 MODULE imp_mod1.c)
|
add_library(imp_mod1 MODULE imp_mod1.c)
|
||||||
@ -43,7 +43,7 @@ add_executable(imp_testExe1b
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Try linking to a library imported from the build tree.
|
# Try linking to a library imported from the build tree.
|
||||||
target_link_libraries(imp_testExe1b bld_testLib2 bld_testLib3)
|
target_link_libraries(imp_testExe1b bld_testLib2 bld_testLib3 bld_testLib4)
|
||||||
|
|
||||||
# Try building a plugin to an executable imported from the build tree.
|
# Try building a plugin to an executable imported from the build tree.
|
||||||
add_library(imp_mod1b MODULE imp_mod1.c)
|
add_library(imp_mod1b MODULE imp_mod1.c)
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
extern int generated_by_testExe1();
|
extern int generated_by_testExe1();
|
||||||
extern int testLib2();
|
extern int testLib2();
|
||||||
extern int testLib3();
|
extern int testLib3();
|
||||||
|
extern int testLib4();
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
return testLib2() + generated_by_testExe1() + testLib3();
|
return testLib2() + generated_by_testExe1() + testLib3() + testLib4();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user