Link Foundation/CoreServices into unit tests so they build with DISABLE_WX.
This commit is contained in:
parent
be44fdf0ec
commit
cb0af4057e
|
@ -278,6 +278,7 @@ if(APPLE)
|
|||
find_library(COREAUDIO_LIBRARY CoreAudio)
|
||||
find_library(COREFUND_LIBRARY CoreFoundation)
|
||||
find_library(CORESERV_LIBRARY CoreServices)
|
||||
find_library(FOUNDATION_LIBRARY foundation)
|
||||
find_library(IOB_LIBRARY IOBluetooth)
|
||||
find_library(IOK_LIBRARY IOKit)
|
||||
find_library(QUICKTIME_LIBRARY QuickTime)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue