Merge branch 'santoshmulthalli-buildrootchanges' into add-buildroot-support

This commit is contained in:
Tristan Penman 2016-04-09 08:15:14 +10:00
commit d8babe314b

View File

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