[vlmc-devel] commit: Add cmake module for frei0r Also corrects includes, in some distros frie0r header are not installed in folder. The corresponding path can added in the 'Findfrei0r.cmake' module. ( Rohit Yadav )
git at videolan.org
git at videolan.org
Tue Aug 17 14:23:00 CEST 2010
vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Wed Aug 11 22:54:20 2010 +0530| [44726e79ce344ed3a34d919c3c10e9113ad9c6aa] | committer: Hugo Beauzée-Luyssen
Add cmake module for frei0r Also corrects includes, in some distros frie0r header are not installed in folder. The corresponding path can added in the 'Findfrei0r.cmake' module.
Signed-off-by: Hugo Beauzée-Luyssen <beauze.h at gmail.com>
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=44726e79ce344ed3a34d919c3c10e9113ad9c6aa
---
cmake/Findfrei0r.cmake | 40 ++++++++++++++++++++++++++++++++++++
src/EffectsEngine/Effect.cpp | 3 +-
src/EffectsEngine/Effect.h | 2 +-
src/EffectsEngine/EffectInstance.h | 2 +-
4 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/cmake/Findfrei0r.cmake b/cmake/Findfrei0r.cmake
new file mode 100644
index 0000000..abbcdce
--- /dev/null
+++ b/cmake/Findfrei0r.cmake
@@ -0,0 +1,40 @@
+
+# CMake module to search for frei0r
+# Author: Rohit Yadav <rohityadav89 at gmail.com>
+#
+# If it's found it sets FREI0R_FOUND to TRUE
+# and following variables are set:
+# FREI0R_INCLUDE_DIR
+
+# Put here path to custom location
+# example: /home/username/frei0r/include etc..
+FIND_PATH( FREI0R_INCLUDE_DIR NAMES frei0r.h
+ PATHS
+ "$ENV{LIB_DIR}/include"
+ "/usr/include"
+ "/usr/include/frei0r"
+ "/usr/local/include"
+ "/usr/local/include/frei0r"
+ # Mac OS
+ "${CMAKE_CURRENT_SOURCE_DIR}/contribs/include"
+ # MingW
+ c:/msys/local/include
+ )
+FIND_PATH(FREI0R_INCLUDE_DIR PATHS "${CMAKE_INCLUDE_PATH}" NAMES frei0r.h)
+
+# TODO: If required, add code to link to some library
+
+IF (FREI0R_INCLUDE_DIR)
+ SET(FREI0R_FOUND TRUE)
+ENDIF (FREI0R_INCLUDE_DIR)
+
+IF (FREI0R_FOUND)
+ IF (NOT FREI0R_FIND_QUIETLY)
+ MESSAGE(STATUS "Found frei0r include-dir path: ${FREI0R_INCLUDE_DIR}")
+ ENDIF (NOT FREI0R_FIND_QUIETLY)
+ELSE (FREI0R_FOUND)
+ IF (FREI0R_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find frei0r")
+ ENDIF (FREI0R_FIND_REQUIRED)
+ENDIF (FREI0R_FOUND)
+
diff --git a/src/EffectsEngine/Effect.cpp b/src/EffectsEngine/Effect.cpp
index 0f7f975..84e3a5b 100644
--- a/src/EffectsEngine/Effect.cpp
+++ b/src/EffectsEngine/Effect.cpp
@@ -22,7 +22,8 @@
#include "Effect.h"
#include "FilterInstance.h"
-#include "frei0r/frei0r.h"
+
+#include "frei0r.h"
#include <QtDebug>
diff --git a/src/EffectsEngine/Effect.h b/src/EffectsEngine/Effect.h
index d89ce16..5a41f9f 100644
--- a/src/EffectsEngine/Effect.h
+++ b/src/EffectsEngine/Effect.h
@@ -25,7 +25,7 @@
#include <QLibrary>
-#include "frei0r/frei0r.h"
+#include "frei0r.h"
class EffectInstance;
diff --git a/src/EffectsEngine/EffectInstance.h b/src/EffectsEngine/EffectInstance.h
index 13db4f0..784daf1 100644
--- a/src/EffectsEngine/EffectInstance.h
+++ b/src/EffectsEngine/EffectInstance.h
@@ -26,7 +26,7 @@
class Effect;
#include <QtGlobal>
-#include "frei0r/frei0r.h"
+#include "frei0r.h"
class EffectInstance
{
More information about the Vlmc-devel
mailing list