summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 57088bc..73b610e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
include(CheckCXXCompilerFlag)
+include(CheckSymbolExists)
IF(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'Release' as none was specified.")
@@ -66,10 +67,7 @@ endif()
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBDRM libdrm>=2.4.64 REQUIRED)
-pkg_check_modules(LIBDRM_OMAP libdrm_omap)
-if(LIBDRM_OMAP_FOUND)
- add_definitions(-DHAS_LIBDRM_OMAP)
-endif()
+check_symbol_exists(DRM_IOCTL_OMAP_GEM_NEW "stdint.h;drm/omap_drm.h" HAVE_OMAP_DRM)
enable_testing()
@@ -86,3 +84,6 @@ if(KMSXX_ENABLE_PYTHON)
endif()
add_custom_target(docs SOURCES "README.md")
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/config.h)