summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2014-11-14 15:03:53 -0500
committercomex <comexk@gmail.com>2014-11-14 15:03:53 -0500
commit68c5758151f696c36b5184ef8bf541bacb68140f (patch)
tree5518ca1886c82b021a3c132a603afeb064fcd4c0 /Source
parent8c26b0207dd08bcee9f7818906020e8b909701e2 (diff)
parentefb2f361aa1d93cf1772ece2f672ddf367d0dc19 (diff)
Merge pull request #1435 from comex/osx-build
OS X CMake improvements
Diffstat (limited to 'Source')
-rw-r--r--Source/UnitTests/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/UnitTests/CMakeLists.txt b/Source/UnitTests/CMakeLists.txt
index e625f5ffe9..bfe197fcfb 100644
--- a/Source/UnitTests/CMakeLists.txt
+++ b/Source/UnitTests/CMakeLists.txt
@@ -1,3 +1,7 @@
+set(LIBS core gtest)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ list(APPEND LIBS ${FOUNDATION_LIBRARY} ${CORESERV_LIBRARY})
+endif()
macro(add_dolphin_test target srcs)
# Since this is a Core dependency, it can't be linked as a library and has
# to be linked as an object file. Otherwise CMake inserts the library after
@@ -9,7 +13,7 @@ macro(add_dolphin_test target srcs)
add_custom_command(TARGET Test_${target}
PRE_LINK
COMMAND mkdir -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Tests)
- target_link_libraries(Test_${target} core gtest)
+ target_link_libraries(Test_${target} ${LIBS})
add_dependencies(unittests Test_${target})
add_test(NAME ${target} COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Tests/${target})
endmacro(add_dolphin_test)