Merge branch 'add-buildroot-support'

This commit is contained in:
Tristan Penman 2016-04-09 08:22:28 +10:00
commit 424b706f99

View File

@ -1,7 +1,11 @@
cmake_minimum_required (VERSION 2.6)
project (valijson)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")
option (INSTALL_HEADERS "Install valijson Headers." FALSE)
option (BUILD_EXAMPLES "Build valijson Examples." FALSE)
option (BUILD_TESTS "Build valijson Tests." TRUE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall ")
if (BUILD_TESTS OR BUILD_EXAMPLES)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
if(VALIJSON_CXX11_ADAPTERS STREQUAL "disabled")
message(STATUS "Building with C++11 support disabled")
@ -107,4 +111,8 @@ endif()
target_link_libraries(test_suite ${TEST_LIBS} ${Boost_LIBRARIES})
target_link_libraries(custom_schema ${Boost_LIBRARIES})
target_link_libraries(external_schema ${Boost_LIBRARIES})
endif()
if (INSTALL_HEADERS )
install(DIRECTORY include/ DESTINATION include )
endif()