summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport/Import
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-04-08 20:29:04 (GMT)
committerBrad King <brad.king@kitware.com>2009-04-08 20:29:04 (GMT)
commitd05e98f8d77e03c0c68ae3d7b5e5617f54dc6b07 (patch)
tree6e74a9ece72ee60b14423a2312ffc9add11ab0ef /Tests/ExportImport/Import
parent5886d103348ba7c14e464c851d3316f09cc2c0c6 (diff)
downloadCMake-d05e98f8d77e03c0c68ae3d7b5e5617f54dc6b07.zip
CMake-d05e98f8d77e03c0c68ae3d7b5e5617f54dc6b07.tar.gz
CMake-d05e98f8d77e03c0c68ae3d7b5e5617f54dc6b07.tar.bz2
ENH: Allow IMPORTED_IMPLIB w/o IMPORTED_LOCATION
Linking to a Windows shared library (.dll) requires only its import library (.lib). This teaches CMake to recognize SHARED IMPORTED library targets that set only IMPORTED_IMPLIB and not IMPORTED_LOCATION.
Diffstat (limited to 'Tests/ExportImport/Import')
-rw-r--r--Tests/ExportImport/Import/A/CMakeLists.txt14
-rw-r--r--Tests/ExportImport/Import/A/imp_testExe1.c2
2 files changed, 14 insertions, 2 deletions
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index 16cff2d..e874cdb 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -23,7 +23,12 @@ add_executable(imp_testExe1
)
# Try linking to a library imported from the install tree.
-target_link_libraries(imp_testExe1 exp_testLib2 exp_testLib3 exp_testLib4)
+target_link_libraries(imp_testExe1
+ exp_testLib2
+ exp_testLib3
+ exp_testLib4
+ exp_testLib5
+ )
# Try building a plugin to an executable imported from the install tree.
add_library(imp_mod1 MODULE imp_mod1.c)
@@ -48,7 +53,12 @@ add_executable(imp_testExe1b
)
# Try linking to a library imported from the build tree.
-target_link_libraries(imp_testExe1b bld_testLib2 bld_testLib3 bld_testLib4)
+target_link_libraries(imp_testExe1b
+ bld_testLib2
+ bld_testLib3
+ bld_testLib4
+ bld_testLib5
+ )
# Try building a plugin to an executable imported from the build tree.
add_library(imp_mod1b MODULE imp_mod1.c)
diff --git a/Tests/ExportImport/Import/A/imp_testExe1.c b/Tests/ExportImport/Import/A/imp_testExe1.c
index 6424d33..6a6ba0f 100644
--- a/Tests/ExportImport/Import/A/imp_testExe1.c
+++ b/Tests/ExportImport/Import/A/imp_testExe1.c
@@ -4,6 +4,7 @@ extern int testLib2();
extern int testLib3();
extern int testLib4();
extern int testLib4lib();
+extern int testLib5();
/* Switch a symbol between debug and optimized builds to make sure the
proper library is found from the testLib4 link interface. */
@@ -17,5 +18,6 @@ extern testLib4libcfg(void);
int main()
{
return (testLib2() + generated_by_testExe1() + testLib3() + testLib4()
+ + testLib5()
+ generated_by_testExe3() + testLib4lib() + testLib4libcfg());
}