Skip to content

Commit d242142

Browse files
author
Murilo Marinho
committed
[bug] Trying to address the new cstdint issue.
1 parent 52d08f4 commit d242142

3 files changed

Lines changed: 10 additions & 33 deletions

File tree

CMakeLists.txt

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,14 @@
11
# To match dqrobotics CMAKE_MINIMUM_REQUIRED
22
CMAKE_MINIMUM_REQUIRED(VERSION 3.10)
33
PROJECT(dqrobotics-interface-json11)
4-
set (CMAKE_CXX_STANDARD 11)
54

6-
if(UNIX AND NOT APPLE)
7-
FIND_PACKAGE(Eigen3 REQUIRED)
8-
INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR})
9-
ADD_COMPILE_OPTIONS(-Werror=return-type -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Woverloaded-virtual)
10-
endif()
5+
set(CMAKE_CXX_STANDARD 17)
6+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
117

12-
if(APPLE)
13-
INCLUDE_DIRECTORIES(
14-
/usr/local/include/
15-
/usr/local/include/eigen3
16-
# Most recent versions of brew install here
17-
/opt/homebrew/include
18-
/opt/homebrew/include/eigen3)
19-
ADD_COMPILE_OPTIONS(-Werror=return-type -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Woverloaded-virtual)
20-
# The library is installed here when using the regular cmake ., make, sudo make install
21-
LINK_DIRECTORIES(
22-
/usr/local/lib/)
23-
endif()
24-
25-
if(WIN32)
26-
ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
27-
FIND_PACKAGE(Eigen3 CONFIG REQUIRED)
28-
INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR})
29-
endif()
8+
find_package(Eigen3 REQUIRED)
309

3110
INCLUDE_DIRECTORIES(${PROJECT_NAME} include)
3211
INCLUDE_DIRECTORIES(${PROJECT_NAME} dropbox/json11)
33-
INCLUDE_DIRECTORIES(${PROJECT_NAME} cpp/include)
3412

3513
################################################################
3614
# DEFINE AND INSTALL LIBRARY AND INCLUDE FOLDER
@@ -51,11 +29,10 @@ INSTALL(TARGETS ${PROJECT_NAME}
5129
PUBLIC_HEADER DESTINATION "include/dqrobotics/interfaces/json11"
5230
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
5331

54-
# This does not seem to be required on Ubuntu
55-
if(APPLE)
56-
TARGET_LINK_LIBRARIES(${PROJECT_NAME}
57-
-ldqrobotics)
58-
endif()
32+
target_link_libraries(${PROJECT_NAME}
33+
Eigen3::Eigen
34+
-ldqrobotics
35+
)
5936

6037
################################################################
6138
# INSTALL SOURCE FILES (So that the debugger can find them)

include/dqrobotics/interfaces/json11/DQ_JsonReader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22
/**
3-
(C) Copyright 2019-2022 DQ Robotics Developers
3+
(C) Copyright 2019-2026 DQ Robotics Developers
44
55
This file is part of DQ Robotics.
66

src/dqrobotics/interfaces/json11/DQ_JsonReader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
(C) Copyright 2019-2023 DQ Robotics Developers
2+
(C) Copyright 2019-2026 DQ Robotics Developers
33
44
This file is part of DQ Robotics.
55
@@ -20,6 +20,7 @@ This file is part of DQ Robotics.
2020
- Murilo M. Marinho (murilomarinho@ieee.org)
2121
*/
2222

23+
#include <cstdint> //Needed by json11.hpp
2324
#include <dqrobotics/interfaces/json11/DQ_JsonReader.h>
2425
#include <dqrobotics/utils/DQ_Math.h>
2526

@@ -29,7 +30,6 @@ This file is part of DQ Robotics.
2930
#include<fstream>
3031
#include<sstream>
3132
#include<string>
32-
#include<exception>
3333
#include<vector>
3434

3535
namespace DQ_robotics

0 commit comments

Comments
 (0)