mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-28 07:11:31 +02:00
Link against msgpack-static when shared disabled
This commit causes the tests to be linked against the msgpack-static target if MSGPACK_ENABLE_SHARED is set to OFF.
This commit is contained in:
parent
5f1d5e8722
commit
60e737f622
@ -50,6 +50,12 @@ IF (MSGPACK_CXX11)
|
||||
)
|
||||
ENDIF ()
|
||||
|
||||
IF (MSGPACK_ENABLE_SHARED)
|
||||
SET (MSGPACK_TEST_LIB msgpack)
|
||||
ELSE ()
|
||||
SET (MSGPACK_TEST_LIB msgpack-static)
|
||||
ENDIF ()
|
||||
|
||||
FOREACH (source_file ${check_PROGRAMS})
|
||||
GET_FILENAME_COMPONENT (source_file_we ${source_file} NAME_WE)
|
||||
ADD_EXECUTABLE (
|
||||
@ -57,7 +63,7 @@ FOREACH (source_file ${check_PROGRAMS})
|
||||
${source_file}
|
||||
)
|
||||
TARGET_LINK_LIBRARIES (${source_file_we}
|
||||
msgpack
|
||||
${MSGPACK_TEST_LIB}
|
||||
${GTEST_BOTH_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
|
Loading…
x
Reference in New Issue
Block a user