summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt56
1 files changed, 56 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..37c38fc
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,56 @@
+cmake_minimum_required(VERSION 2.8)
+
+project(ufo C CXX)
+
+set(TARNAME "ufo-roof")
+
+set(UFO_ROOF_VERSION_MAJOR "0")
+set(UFO_ROOF_VERSION_MINOR "0")
+set(UFO_ROOF_VERSION_PATCH "1")
+set(UFO_ROOF_VERSION_STRING_LONG "${UFO_ROOF_VERSION_MAJOR}.${UFO_ROOF_VERSION_MINOR}.${UFO_ROOF_VERSION_PATCH}")
+set(UFO_ROOF_VERSION_STRING_SHORT "${UFO_ROOF_VERSION_MAJOR}.${UFO_ROOF_VERSION_MINOR}")
+
+set(UFO_DESCRIPTION "UFO roof filters")
+set(UFO_DESCRIPTION_SUMMARY "UFO roof filters")
+
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/common/cmake")
+
+if (APPLE)
+ set(CMAKE_MACOSX_RPATH "ON")
+ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+endif()
+
+include(GNUInstallDirs)
+include(PkgConfigVars)
+
+set(PKG_UFO_CORE_MIN_REQUIRED "0.16")
+
+
+option(WITH_PROFILING "Enable profiling" OFF)
+
+if (WITH_PROFILING)
+ add_definitions("-pg")
+ set(CMAKE_C_FLAGS "-pg")
+endif ()
+
+find_package(OpenCL REQUIRED)
+find_package(PkgConfig REQUIRED)
+
+pkg_check_modules(UFO ufo>=${PKG_UFO_CORE_MIN_REQUIRED} REQUIRED)
+
+pkg_check_variable(ufo plugindir)
+pkg_check_variable(ufo kerneldir)
+
+link_directories(${UFO_LIBRARY_DIRS})
+add_definitions("-Wall -Wextra -fPIC")
+add_definitions(-DG_LOG_DOMAIN="Ufo")
+
+if (CMAKE_COMPILER_IS_GNUCC OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang"))
+ add_definitions("-Wno-unused-parameter")
+endif ()
+enable_testing()
+
+#add_subdirectory(docs)
+#add_subdirectory(deps)
+add_subdirectory(src)
+#add_subdirectory(tests)