mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-16 18:56:52 +02:00
45 lines
908 B
CMake
45 lines
908 B
CMake
set(LIBNAME "PocoJSON")
|
|
|
|
set(SRCS
|
|
src/Array.cpp
|
|
src/Handler.cpp
|
|
src/JSONException.cpp
|
|
src/Object.cpp
|
|
src/ParseHandler.cpp
|
|
src/Parser.cpp
|
|
src/PrintHandler.cpp
|
|
src/Query.cpp
|
|
src/Stringifier.cpp
|
|
src/TemplateCache.cpp
|
|
src/Template.cpp
|
|
)
|
|
|
|
if (NOT POCO_STATIC)
|
|
add_definitions(-DJSON_EXPORTS)
|
|
endif (NOT POCO_STATIC)
|
|
|
|
add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|
set_target_properties( ${LIBNAME}
|
|
PROPERTIES
|
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
|
target_link_libraries( ${LIBNAME} PocoFoundation)
|
|
|
|
install(
|
|
DIRECTORY include/Poco
|
|
DESTINATION include
|
|
PATTERN ".svn" EXCLUDE
|
|
)
|
|
|
|
install(
|
|
TARGETS ${LIBNAME}
|
|
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
|
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
|
RUNTIME DESTINATION bin
|
|
)
|
|
|
|
if (ENABLE_TESTS)
|
|
add_subdirectory(samples)
|
|
add_subdirectory(testsuite)
|
|
endif ()
|
|
|