diff --git a/CMakeLists.txt b/CMakeLists.txt index 65f2cc1..fd42773 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,13 +39,14 @@ else() message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.") endif() +#TODO() if(valijson_USE_EXCEPTIONS) - add_compile_definitions(VALIJSON_USE_EXCEPTIONS=1) + add_definitions(-DVALIJSON_USE_EXCEPTIONS=1) else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") - add_compile_definitions(BOOST_NO_EXCEPTIONS) - add_compile_definitions(JSON_USE_EXCEPTION=0) - add_compile_definitions(VALIJSON_USE_EXCEPTIONS=0) + add_definitions(-DBOOST_NO_EXCEPTIONS) + add_definitions(-DJSON_USE_EXCEPTION=0) + add_definitions(-DVALIJSON_USE_EXCEPTIONS=0) endif() find_package(curlpp) @@ -130,7 +131,7 @@ if(valijson_BUILD_TESTS) set_target_properties(test_suite PROPERTIES COMPILE_DEFINITIONS "PICOJSON_USE_INT64") if(Boost_FOUND) - add_compile_definitions(BOOST_ALL_DYN_LINK) + add_definitions(-DBOOST_ALL_DYN_LINK) set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF)