summaryrefslogtreecommitdiff
path: root/Tests/Framework/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Framework/CMakeLists.txt')
-rw-r--r--Tests/Framework/CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/Framework/CMakeLists.txt b/Tests/Framework/CMakeLists.txt
index a313c2c03..f741ec256 100644
--- a/Tests/Framework/CMakeLists.txt
+++ b/Tests/Framework/CMakeLists.txt
@@ -84,3 +84,19 @@ if(NOT XCODE OR NOT XCODE_VERSION VERSION_LESS 5)
endif()
include(CPack)
+
+if(APPLE)
+ set(ExternalFramework_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/External")
+ file(REMOVE_RECURSE "${ExternalFramework_INSTALL_DIR}")
+
+ include(ExternalProject)
+ ExternalProject_Add(ExternalFramework
+ SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/External"
+ INSTALL_DIR "${ExternalFramework_INSTALL_DIR}"
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
+ )
+
+ add_executable(useExternal useExternal.c)
+ target_link_libraries(useExternal PRIVATE "${ExternalFramework_INSTALL_DIR}/lib/External.framework")
+ add_dependencies(useExternal ExternalFramework)
+endif()