From a5e07f588bd5b767eb5278ccdb0252d10a323bee Mon Sep 17 00:00:00 2001
From: "Thomas \"elfprince13\" Dickerson" <elfprince13@gmail.com>
Date: Mon, 4 Mar 2019 17:46:50 -0500
Subject: [PATCH] fixed PCRE usage

---
 COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h | 3 +--
 COLLADABaseUtils/src/COLLADABUPcreCompiledPattern.cpp   | 2 --
 COLLADABaseUtils/src/COLLADABUURI.cpp                   | 1 -
 COLLADAFramework/CMakeLists.txt                         | 2 ++
 4 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h b/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h
index 22f2598b..e44e33c8 100644
--- a/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h
+++ b/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h
@@ -13,8 +13,7 @@
 
 #include "COLLADABUPrerequisites.h"
 
-struct real_pcre;
-typedef struct real_pcre pcre;
+#include <pcre.h>
 
 
 namespace COLLADABU
diff --git a/COLLADABaseUtils/src/COLLADABUPcreCompiledPattern.cpp b/COLLADABaseUtils/src/COLLADABUPcreCompiledPattern.cpp
index 26cb47c2..1d32d8fe 100644
--- a/COLLADABaseUtils/src/COLLADABUPcreCompiledPattern.cpp
+++ b/COLLADABaseUtils/src/COLLADABUPcreCompiledPattern.cpp
@@ -11,8 +11,6 @@
 #include "COLLADABUStableHeaders.h"
 #include "COLLADABUPcreCompiledPattern.h"
 
-#include "pcre.h"
-
 namespace COLLADABU
 {
 
diff --git a/COLLADABaseUtils/src/COLLADABUURI.cpp b/COLLADABaseUtils/src/COLLADABUURI.cpp
index ae403d8a..b759591f 100644
--- a/COLLADABaseUtils/src/COLLADABUURI.cpp
+++ b/COLLADABaseUtils/src/COLLADABUURI.cpp
@@ -15,7 +15,6 @@
 #include "COLLADABUHashFunctions.h"
 
 #include <algorithm>
-#include "pcre.h"
 
 namespace COLLADABU
 {
diff --git a/COLLADAFramework/CMakeLists.txt b/COLLADAFramework/CMakeLists.txt
index 7855b046..eabf2c47 100644
--- a/COLLADAFramework/CMakeLists.txt
+++ b/COLLADAFramework/CMakeLists.txt
@@ -171,12 +171,14 @@ set(SRC
 set(TARGET_LIBS
 	OpenCOLLADABaseUtils
 	MathMLSolver
+	${PCRE_LIBRARIES}
 )
 
 include_directories(
 	${libFramework_include_dirs}
 	${libBaseUtils_include_dirs}
 	${libMathMLSolver_include_dirs}
+	${PCRE_INCLUDE_DIR}
 )
 opencollada_add_lib(${name} "${SRC}" "${TARGET_LIBS}")
 
