compile pdjson as C++; disarm some windows warnings

This commit is contained in:
Alex Fabijanic 2017-09-27 11:51:43 -05:00
parent 6bcd362c74
commit 1054c46f6c
3 changed files with 9 additions and 1 deletions

View File

@ -6,7 +6,7 @@
# ENABLE_{COMPONENT}
# ENABLE_TESTS
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.2.0)
project(Poco)

View File

@ -1,6 +1,9 @@
set(LIBNAME "CppUnit")
# Sources
if (WIN32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif (WIN32)
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})

View File

@ -2,6 +2,10 @@ set(LIBNAME "JSON")
set(POCO_LIBNAME "Poco${LIBNAME}")
# Sources
if (WIN32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif (WIN32)
file(GLOB SRCS_G "src/*.cpp")
POCO_SOURCES_AUTO( SRCS ${SRCS_G})
@ -9,6 +13,7 @@ POCO_SOURCES_AUTO( SRCS ${SRCS_G})
file(GLOB_RECURSE HDRS_G "include/*.h" )
POCO_HEADERS_AUTO( SRCS ${HDRS_G})
POCO_SOURCES(SRCS pdjson src/pd_json.c)
SET_SOURCE_FILES_PROPERTIES(src/pd_json.c PROPERTIES LANGUAGE CXX)
add_library( "${LIBNAME}" ${LIB_MODE} ${SRCS} )
add_library( "${POCO_LIBNAME}" ALIAS "${LIBNAME}")