diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 85b18ac5..f7759623 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,15 +29,23 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") include(DPF-plugin) if(DPF_LIBRARIES) - if(NOT (WIN32 OR APPLE)) # TODO skip this one for now - dpf__add_dgl_cairo(FALSE) + find_package(PkgConfig) + if(PKG_CONFIG_FOUND) + pkg_check_modules(CAIRO "cairo") + if(CAIRO_FOUND) + dpf__add_dgl_cairo(FALSE) + endif() endif() dpf__add_dgl_opengl(FALSE) endif() if(DPF_EXAMPLES) - if(NOT (WIN32 OR APPLE)) # TODO skip this one for now - add_subdirectory("examples/CairoUI") + find_package(PkgConfig) + if(PKG_CONFIG_FOUND) + pkg_check_modules(CAIRO "cairo") + if(CAIRO_FOUND) + add_subdirectory("examples/CairoUI") + endif() endif() #add_subdirectory("examples/ExternalUI") add_subdirectory("examples/FileHandling") |