From 82de5caa1f1c2f602b3bf093cb9521e888314b79 Mon Sep 17 00:00:00 2001
From: jcarpent <jcarpent@laas.fr>
Date: Tue, 12 Jul 2016 09:55:35 +0200
Subject: [PATCH] [CMake] Export definitions inside *.pc file

---
 CMakeLists.txt | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8b8064bd8..3076abe66 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,6 +80,7 @@ ADD_OPTIONAL_DEPENDENCY("hpp-fcl >= 0.4.2")
 IF(EIGEN3_FOUND)
   IF(${EIGEN3_VERSION} VERSION_GREATER "3.2.8")
     ADD_DEFINITIONS(-DEIGEN3_FUTURE)
+    SET(EIGEN3_FUTURE TRUE)
   ENDIF(${EIGEN3_VERSION} VERSION_GREATER "3.2.8")
 ENDIF(EIGEN3_FOUND)
 
@@ -87,11 +88,10 @@ ENDIF(EIGEN3_FOUND)
 IF(URDFDOM_FOUND)
   IF(${URDFDOM_VERSION} VERSION_LESS "0.3.0")
     ADD_DEFINITIONS(-DURDFDOM_COLLISION_WITH_GROUP_NAME)
+    SET(URDFDOM_COLLISION_WITH_GROUP_NAME TRUE)
   ENDIF(${URDFDOM_VERSION} VERSION_LESS "0.3.0")
 ENDIF(URDFDOM_FOUND)
 
-
-
 SET(BOOST_COMPONENTS filesystem unit_test_framework system)
 
 IF(BUILD_PYTHON_INTERFACE)
@@ -315,4 +315,12 @@ ADD_SUBDIRECTORY(benchmark)
 
 ADD_SUBDIRECTORY(utils)
 
+IF(EIGEN3_FUTURE)
+  PKG_CONFIG_APPEND_CFLAGS("-DEIGEN3_FUTURE")
+ENDIF(EIGEN3_FUTURE)
+
+IF(URDFDOM_COLLISION_WITH_GROUP_NAME)
+  PKG_CONFIG_APPEND_CFLAGS("-DURDFDOM_COLLISION_WITH_GROUP_NAME")
+ENDIF(URDFDOM_COLLISION_WITH_GROUP_NAME)
+
 SETUP_PROJECT_FINALIZE()
-- 
GitLab