mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-07-04 09:37:14 +02:00
Make example build optional with cmake
This commit is contained in:
parent
767099a0eb
commit
8d3673e7ee
@ -102,6 +102,7 @@ FIND_PACKAGE (Threads)
|
||||
IF (GTEST_FOUND AND ZLIB_FOUND AND THREADS_FOUND)
|
||||
OPTION (MSGPACK_BUILD_TESTS "Build msgpack tests." ON)
|
||||
ENDIF ()
|
||||
OPTION (MSGPACK_BUILD_EXAMPLES "Build msgpack examples." ON)
|
||||
|
||||
OPTION (MSGPACK_ENABLE_CXX "Enable C++ interface." ON)
|
||||
OPTION (MSGPACK_ENABLE_SHARED "Build shared libaries in addition to static libraries." ON)
|
||||
@ -292,7 +293,9 @@ IF (NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
SET(CMAKE_INSTALL_LIBDIR lib)
|
||||
ENDIF ()
|
||||
|
||||
ADD_SUBDIRECTORY (example)
|
||||
IF (MSGPACK_BUILD_EXAMPLES)
|
||||
ADD_SUBDIRECTORY (example)
|
||||
ENDIF ()
|
||||
|
||||
IF (MSGPACK_ENABLE_SHARED)
|
||||
SET (MSGPACK_INSTALLTARGETS msgpack msgpack-static)
|
||||
|
Loading…
x
Reference in New Issue
Block a user