summaryrefslogtreecommitdiff
path: root/Tests/ExportImport
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-07-08 16:59:03 +0200
committerBrad King <brad.king@kitware.com>2013-07-24 11:49:06 -0400
commitf5ca872e8b621bbef1c5feb92317bc420fe07716 (patch)
tree006c70de5dc42a9ac504eb9948c4d7e1cf2e793d /Tests/ExportImport
parentf82c751d7b3ee3907d780060985a36bdddcabad3 (diff)
downloadcmake-f5ca872e8b621bbef1c5feb92317bc420fe07716.tar.gz
Use linked frameworks as a source of include directories.
Diffstat (limited to 'Tests/ExportImport')
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt6
-rw-r--r--Tests/ExportImport/Export/testLib4.h2
-rw-r--r--Tests/ExportImport/Import/A/CMakeLists.txt4
-rw-r--r--Tests/ExportImport/Import/A/framework_interface/CMakeLists.txt9
-rw-r--r--Tests/ExportImport/Import/A/framework_interface/framework_test.cpp6
5 files changed, 27 insertions, 0 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index f810f3be72..3262523506 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -312,6 +312,12 @@ install(
FRAMEWORK DESTINATION Frameworks
BUNDLE DESTINATION Applications
)
+if (APPLE)
+ file(COPY testLib4.h DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/testLib4.framework/Headers)
+ file(COPY testLib4.h DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Debug/testLib4.framework/Headers)
+ file(COPY testLib4.h DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/Release/testLib4.framework/Headers)
+ install(FILES testLib4.h DESTINATION Frameworks/testLib4.framework/Headers)
+endif()
install(
TARGETS
testExe2libImp testLib3Imp
diff --git a/Tests/ExportImport/Export/testLib4.h b/Tests/ExportImport/Export/testLib4.h
new file mode 100644
index 0000000000..9eeda7c0e6
--- /dev/null
+++ b/Tests/ExportImport/Export/testLib4.h
@@ -0,0 +1,2 @@
+
+#define TESTLIB4_H
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index aa8847bdb7..2627354ace 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -210,6 +210,10 @@ if (run_pic_test)
target_compile_definitions(deps_shared_iface PRIVATE CHECK_PIC_WORKS)
endif()
+if(APPLE)
+ add_subdirectory(framework_interface)
+endif()
+
#-----------------------------------------------------------------------------
# Test that targets imported from the build tree have their dependencies
# evaluated correctly. The above already tests the same for the install tree.
diff --git a/Tests/ExportImport/Import/A/framework_interface/CMakeLists.txt b/Tests/ExportImport/Import/A/framework_interface/CMakeLists.txt
new file mode 100644
index 0000000000..0e00655557
--- /dev/null
+++ b/Tests/ExportImport/Import/A/framework_interface/CMakeLists.txt
@@ -0,0 +1,9 @@
+
+add_library(exp_framework_test framework_test.cpp)
+get_target_property(exp_loc exp_testLib4 LOCATION)
+target_link_libraries(exp_framework_test ${exp_loc})
+
+
+add_library(bld_framework_test framework_test.cpp)
+get_target_property(bld_loc bld_testLib4 LOCATION)
+target_link_libraries(bld_framework_test ${bld_loc})
diff --git a/Tests/ExportImport/Import/A/framework_interface/framework_test.cpp b/Tests/ExportImport/Import/A/framework_interface/framework_test.cpp
new file mode 100644
index 0000000000..357f64f02a
--- /dev/null
+++ b/Tests/ExportImport/Import/A/framework_interface/framework_test.cpp
@@ -0,0 +1,6 @@
+
+#include <testLib4/testLib4.h>
+
+#ifndef TESTLIB4_H
+#error Expected define TESTLIB4_H
+#endif