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.
This commit is contained in:
Mark Rowe 2016-05-31 17:16:52 -07:00
parent 91c87e4de6
commit 7e99634567
2 changed files with 2 additions and 1 deletions

View File

@ -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 $<TARGET_OBJECTS:realm-object-store-objects>)
add_library(realm-object-store SHARED $<TARGET_OBJECTS:realm-object-store-objects> placeholder.cpp)
target_include_directories(realm-object-store PUBLIC ${INCLUDE_DIRS})
target_link_libraries(realm-object-store PRIVATE realm ${CF_LIBRARY})

1
src/placeholder.cpp Normal file
View File

@ -0,0 +1 @@
// This file is intentionally left blank.