From 7e99634567ccdf8b63a79fb38e921c674d905831 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Tue, 31 May 2016 17:16:52 -0700 Subject: [PATCH] Fix building tests in Xcode. The Xcode project generated by CMake doesn't create the dylib when built as the dylib target does not contain any source files. Adding an empty placeholder .cpp file to the target is sufficient to convince Xcode to produce the dylib. --- src/CMakeLists.txt | 2 +- src/placeholder.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 src/placeholder.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3574147e..befe9289 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -69,6 +69,6 @@ target_include_directories(realm-object-store-static PUBLIC ${INCLUDE_DIRS}) target_link_libraries(realm-object-store-static PUBLIC realm ${CF_LIBRARY}) # A dynamic library, linking together the prebuilt object files. -add_library(realm-object-store SHARED $) +add_library(realm-object-store SHARED $ placeholder.cpp) target_include_directories(realm-object-store PUBLIC ${INCLUDE_DIRS}) target_link_libraries(realm-object-store PRIVATE realm ${CF_LIBRARY}) diff --git a/src/placeholder.cpp b/src/placeholder.cpp new file mode 100644 index 00000000..89365342 --- /dev/null +++ b/src/placeholder.cpp @@ -0,0 +1 @@ +// This file is intentionally left blank.