From 0bae99c31aae20e0114ee17c9d4329648fd1b540 Mon Sep 17 00:00:00 2001 From: jbnadal Date: Wed, 7 Jun 2017 17:43:54 +0200 Subject: [PATCH] Fix compilation error. --- src/3P/jsoncpp/CMakeLists.txt | 12 ++++++------ src/3P/ubus/CMakeLists.txt | 2 -- src/prog/domod/builders/cmake/CMakeLists.txt | 2 +- src/prog/sprinklerd/builders/cmake/CMakeLists.txt | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/3P/jsoncpp/CMakeLists.txt b/src/3P/jsoncpp/CMakeLists.txt index b11b7864..6db9124a 100644 --- a/src/3P/jsoncpp/CMakeLists.txt +++ b/src/3P/jsoncpp/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required (VERSION 3.0) -#include (libjsoncpp) +project(json-cpp) -project(jsoncpp) +set (CMAKE_CXX_STANDARD 11) include_directories(include) @@ -14,15 +14,15 @@ file( src/lib_json/json_writer.cpp ) -set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -pedantic -Werror=strict-aliasing") +set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Werror=strict-aliasing") add_library( - jsoncpp + json-cpp SHARED ${source_files} ) -install (TARGETS jsoncpp LIBRARY DESTINATION local/lib) +install (TARGETS json-cpp LIBRARY DESTINATION local/lib) file (GLOB headers include/jsoncpp/*) install (FILES ${headers} DESTINATION include/jsoncpp) diff --git a/src/3P/ubus/CMakeLists.txt b/src/3P/ubus/CMakeLists.txt index 7c313a6e..9f558c61 100644 --- a/src/3P/ubus/CMakeLists.txt +++ b/src/3P/ubus/CMakeLists.txt @@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.0) project (ubus) -set (CMAKE_MODULE_PATH "${MODULE_PATH}") - set(DISABLE_TARGET_OPTIMIZATION ON) include_directories ($ENV{SRC_DIR}/src/3P/ubus) diff --git a/src/prog/domod/builders/cmake/CMakeLists.txt b/src/prog/domod/builders/cmake/CMakeLists.txt index 154d59ea..63af8d49 100644 --- a/src/prog/domod/builders/cmake/CMakeLists.txt +++ b/src/prog/domod/builders/cmake/CMakeLists.txt @@ -40,7 +40,7 @@ add_executable (domod ${source_files}) target_link_libraries (domod LINK_PUBLIC - jsoncpp + json-cpp ubus-cpp ubox ubus diff --git a/src/prog/sprinklerd/builders/cmake/CMakeLists.txt b/src/prog/sprinklerd/builders/cmake/CMakeLists.txt index b7898b80..dccf916e 100644 --- a/src/prog/sprinklerd/builders/cmake/CMakeLists.txt +++ b/src/prog/sprinklerd/builders/cmake/CMakeLists.txt @@ -25,7 +25,7 @@ add_executable (sprinklerd ${source_files}) target_link_libraries (sprinklerd LINK_PUBLIC ubus-cpp - jsoncpp + json-cpp ubox ubus blobmsg_json