Update tests/CMakeLists.txt: use ZeroMQ_SOURCE_DIR, ZeroMQ_BINARY_DIR

Use ZeroMQ_SOURCE_DIR, ZeroMQ_BINARY_DIR instead of CMAKE_SOURCE_DIR, CMAKE_BINARY_DIR in tests/CMakeLists.txt
Similar reason to change unittests/CMakeLists.txt
This commit is contained in:
Wenbin Hou 2018-08-16 13:17:44 +08:00 committed by GitHub
parent 8fbb32c8f1
commit 0507ae877d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,7 +171,7 @@ link_libraries(libzmq ${OPTIONAL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} unity)
else ()
link_libraries(libzmq-static ${OPTIONAL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} unity)
endif ()
include_directories("${CMAKE_SOURCE_DIR}/../include" "${CMAKE_BINARY_DIR}")
include_directories("${ZeroMQ_SOURCE_DIR}/../include" "${ZeroMQ_BINARY_DIR}")
foreach(test ${tests})
# target_sources not supported before CMake 3.1
@ -198,7 +198,7 @@ foreach(test ${tests})
else()
# per-test directories not generated on OS X / Darwin
if (NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang.*")
link_directories(${test} PRIVATE "${CMAKE_SOURCE_DIR}/../lib")
link_directories(${test} PRIVATE "${ZeroMQ_SOURCE_DIR}/../lib")
endif()
endif()