diff options
author | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp> | 2013-11-27 10:56:29 +0900 |
---|---|---|
committer | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp> | 2013-11-27 11:41:48 +0900 |
commit | 8a04e0a5cc732487fd797062968c1cb41bb33094 (patch) | |
tree | 269005e054feb4df3d9d63abbee04e2990e2d320 | |
parent | 725c725e14b2da11d1e0bdfb822f73d8c2c2e9a3 (diff) | |
download | wayland-ivi-extension-8a04e0a5cc732487fd797062968c1cb41bb33094.tar.gz |
cmake: Set-up of cmake to find modules
By using cmake, find dependent modules for ivi-shell and ivi
layer management api.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
-rw-r--r-- | cmake/modules/CMakeVersions.txt | 58 | ||||
-rw-r--r-- | cmake/modules/CustomMacros.txt | 49 | ||||
-rw-r--r-- | cmake/modules/DefaultSettings.txt | 101 | ||||
-rw-r--r-- | cmake/modules/FindAutomotiveDlt.cmake | 48 | ||||
-rw-r--r-- | cmake/modules/FindCairo.cmake | 40 | ||||
-rw-r--r-- | cmake/modules/FindDBUS.cmake | 54 | ||||
-rw-r--r-- | cmake/modules/FindDRM.cmake | 66 | ||||
-rw-r--r-- | cmake/modules/FindEGL.cmake | 39 | ||||
-rw-r--r-- | cmake/modules/FindGLESv2.cmake | 39 | ||||
-rw-r--r-- | cmake/modules/FindGLX.cmake | 39 | ||||
-rw-r--r-- | cmake/modules/FindPixman.cmake | 40 | ||||
-rw-r--r-- | cmake/modules/FindWayland.cmake | 99 | ||||
-rw-r--r-- | cmake/modules/FindWeston.cmake | 33 |
13 files changed, 705 insertions, 0 deletions
diff --git a/cmake/modules/CMakeVersions.txt b/cmake/modules/CMakeVersions.txt new file mode 100644 index 0000000..6dda282 --- /dev/null +++ b/cmake/modules/CMakeVersions.txt @@ -0,0 +1,58 @@ +############################################################################ +# +# Copyright 2010, 2011 BMW Car IT GmbH +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################ + +set( ${PROJECT_NAME}_MAJOR_VERSION 0 ) +set( ${PROJECT_NAME}_MINOR_VERSION 9 ) +set( ${PROJECT_NAME}_PATCH_LEVEL 9 ) +set( ${PROJECT_NAME}_RELEASE release ) + +set(VERSION ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJECT_NAME}_PATCH_LEVEL}.${${PROJECT_NAME}_RELEASE}) + +if(NOT DEFINED ILM_VERSION) + +execute_process(COMMAND git describe --tags WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + RESULT_VARIABLE RESULT_VAR + OUTPUT_VARIABLE ILM_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET) + +if(NOT "${RESULT_VAR}" STREQUAL 0) + +message(STATUS "Unable launch automatic version build! Using default version!") +set(ILM_VERSION ${VERSION}) + +else(NOT "${RESULT_VAR}" STREQUAL 0) + +string(REPLACE "-" "_" ILM_VERSION ${ILM_VERSION}) + +endif(NOT "${RESULT_VAR}" STREQUAL 0) + +endif(NOT DEFINED ILM_VERSION) + +set(LICENSE "APACHE 2.0") + +set(GENIVI_PROJECT_VERSION ${VERSION}) +message(STATUS + "Build for Version ${VERSION} build ${ILM_VERSION}" + ) + +##################### RPM CONFIG ######################## +set(GENIVI_RPM_RELEASE "${ILM_VERSION}") +set(SPEC_DIR ".") +######################################################### diff --git a/cmake/modules/CustomMacros.txt b/cmake/modules/CustomMacros.txt new file mode 100644 index 0000000..d779238 --- /dev/null +++ b/cmake/modules/CustomMacros.txt @@ -0,0 +1,49 @@ +############################################################################ +# +# Copyright 2010-2012 BMW Car IT GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################ + +MACRO(add_subdirectory_once path) + get_filename_component(subdir ${path} NAME) + if (NOT ${subdir}_already_built) + set(${subdir}_already_built 1) + add_subdirectory(${path}) + endif (NOT ${subdir}_already_built) +ENDMACRO(add_subdirectory_once) + +MACRO(project_type mode) + string(TOUPPER ${mode} mode_capital) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS_${mode_capital}}") + set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}") + + if (mode_capital STREQUAL "PLUGIN" AND WITH_STATIC_LIBRARIES) + set (STATICALLY_LINKED_PLUGINS ${STATICALLY_LINKED_PLUGINS} + ${PROJECT_NAME} CACHE INTERNAL "list of static plugins") + endif (mode_capital STREQUAL "PLUGIN" AND WITH_STATIC_LIBRARIES) + +ENDMACRO(project_type) + +MACRO(export_build_flag name description) + set (descLine "/* ${description} */") + set (nameLine "#cmakedefine ${name}") + SET(BUILD_FLAG_LIST "${BUILD_FLAG_LIST};${descLine};${nameLine}; " CACHE INTERNAL "") + SET(BUILD_FLAG_ARRAY "${BUILD_FLAG_ARRAY};${name}" CACHE INTERNAL "") +ENDMACRO(export_build_flag) + +MACRO(build_flag name description defaultvalue) + export_build_flag(${name} "${description}") + option (${name} "${description}" ${defaultvalue}) +ENDMACRO(build_flag) diff --git a/cmake/modules/DefaultSettings.txt b/cmake/modules/DefaultSettings.txt new file mode 100644 index 0000000..783fcc3 --- /dev/null +++ b/cmake/modules/DefaultSettings.txt @@ -0,0 +1,101 @@ +############################################################################ +# +# Copyright 2012 BMW Car IT GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################ + +#============================================================================== +# set default build type, if not defined by user +#============================================================================== +if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release CACHE STRING + "Choose build type: Debug, Release, RelWithDebInfo, MinSizeRel." + FORCE) + message(STATUS "Build type not defined. Using default build type 'Release'.") +endif (NOT CMAKE_BUILD_TYPE) + +#============================================================================== +# define shared library build mode +#============================================================================== +if (WITH_STATIC_LIBRARIES) + set (LIBRARY_BUILDMODE "STATIC") +else (WITH_STATIC_LIBRARIES) + set (LIBRARY_BUILDMODE "SHARED") +endif (WITH_STATIC_LIBRARIES) + + +#============================================================================== +# default compiler flags (and why we set them) +# +# -fPIC enable position independent code. required for +# (at least) Linux 64bit builds +# +# -Wno-variadic-macros required by google test framework +# +# -Wno-sign-compare required by google test framework +# +# -Wall enable all default compiler warnings +# +# -Wextra enable more strict compiler warnings +# +# -Wpedantic enable ISO C++ compliance warnings, aims for +# best portability +# +# -Wno-long-long ISO C++ does not provide long long support, +# but the use of long long is a widely accepted +# solution +# +# -Wno-unused-function LayerManagement has a function, that is not used by +# reference plugins, which turns into a warning +# during compilation. This function can be used by +# other implementations and will stay in the code. +#============================================================================== +set (COMPILER_FLAGS_3RDPARTY "-fPIC -Wno-variadic-macros -Wno-sign-compare") +set (COMPILER_FLAGS_TEST "-fPIC -Wno-variadic-macros -Wno-sign-compare") +set (COMPILER_FLAGS_EXAMPLE "-fPIC -Wall -Wextra") +set (COMPILER_FLAGS_PLUGIN "-fPIC -Wall -Wextra -pedantic -Wno-long-long -Wno-unused-function") +set (COMPILER_FLAGS_CORE "-fPIC -Wall -Wextra -pedantic -Wno-long-long -Wno-unused-function") + + +#============================================================================== +# set default build parameters +#============================================================================== +include_directories( + ${CMAKE_SOURCE_DIR}/config + ${CMAKE_SOURCE_DIR}/3rdParty + ${CMAKE_SOURCE_DIR}/LayerManagerClient/ilmCommon/include +) + + +#============================================================================== +# Internal global settings not available to user +#============================================================================== +set (STATICALLY_LINKED_PLUGINS "" CACHE INTERNAL "list of static plugins") +set (BUILD_FLAG_LIST "" CACHE INTERNAL "list of build flag names") +set (BUILD_FLAG_ARRAY "" CACHE INTERNAL "array of build flags for logging") + + +#============================================================================== +# cppcheck configuration +#============================================================================== +set (CPPCHECK_CONFIG + --quiet + --enable=performance,portability + --template='{file}:{line}: warning: {message} [{severity}]' +) + +FOREACH (ARG ${CPPCHECK_CONFIG}) + set (CPPCHECK_CONFIG_STRING "${CPPCHECK_CONFIG_STRING} ${ARG}") +ENDFOREACH(ARG) diff --git a/cmake/modules/FindAutomotiveDlt.cmake b/cmake/modules/FindAutomotiveDlt.cmake new file mode 100644 index 0000000..b436af6 --- /dev/null +++ b/cmake/modules/FindAutomotiveDlt.cmake @@ -0,0 +1,48 @@ +############################################################################ +# +# Copyright 2012, BMW AG +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################ + +FIND_PACKAGE(PkgConfig) +IF (PKG_CONFIG_FOUND) +# added aditional pkg config check to find dbus dependend includes + pkg_check_modules(DLT_PKG_PATHS automotive-dlt) +ENDIF (PKG_CONFIG_FOUND) + + +FIND_PATH(DLT_INCLUDE_DIR dlt/dlt.h +${DLT_PKG_PATHS_INCLUDE_DIRS} +/usr/include +) + + +FIND_LIBRARY(DLT_LIBRARY +NAMES dlt +PATHS /lib +) + +SET( DLT_FOUND "NO" ) +IF(DLT_LIBRARY) + SET( DLT_FOUND "YES" ) + message(STATUS "Found Dlt libs: ${DLT_LIBRARY}") + message(STATUS "Found Dlt includes: ${DLT_INCLUDE_DIR}") +ENDIF(DLT_LIBRARY) + +MARK_AS_ADVANCED( + DLT_INCLUDE_DIR + DLT_LIBRARY +) diff --git a/cmake/modules/FindCairo.cmake b/cmake/modules/FindCairo.cmake new file mode 100644 index 0000000..663029b --- /dev/null +++ b/cmake/modules/FindCairo.cmake @@ -0,0 +1,40 @@ +############################################################################ +# +# Copyright 2010, 2011 BMW Car IT GmbH +# Copyright (C) 2011 DENSO CORPORATION and Robert Bosch Car Multimedia Gmbh +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################ + +FIND_PATH(CAIRO_INCLUDE_DIR cairo.h +/usr/include/cairo +) + +FIND_LIBRARY(CAIRO_LIBRARIES +NAMES cairo +PATHS /usr/lib +) + +SET( CAIRO_FOUND "NO" ) +IF(CAIRO_LIBRARIES) + SET( CAIRO_FOUND "YES" ) + message(STATUS "Found cairo libs: ${CAIRO_LIBRARIES}") + message(STATUS "Found cairo includes: ${CAIRO_INCLUDE_DIR}") +ENDIF(CAIRO_LIBRARIES) + +MARK_AS_ADVANCED( + CAIRO_INCLUDE_DIR + CAIRO_LIBRARIES +) diff --git a/cmake/modules/FindDBUS.cmake b/cmake/modules/FindDBUS.cmake new file mode 100644 index 0000000..f7ace63 --- /dev/null +++ b/cmake/modules/FindDBUS.cmake @@ -0,0 +1,54 @@ +############################################################################ +# +# Copyright 2010, 2011 BMW Car IT GmbH +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################ + +FIND_PACKAGE(PkgConfig) +IF (PKG_CONFIG_FOUND) +# added aditional pkg config check to find dbus dependend includes + pkg_check_modules(DBUS_PKG_PATHS dbus-1) +ENDIF (PKG_CONFIG_FOUND) + + +FIND_PATH(DBUS_INCLUDE_DIR dbus/dbus.h +${DBUS_PKG_PATHS_INCLUDE_DIRS} +/usr/include/dbus-1.0 +) + +FIND_PATH(DBUS_ARCH_INCLUDE_DIR dbus/dbus-arch-deps.h +${DBUS_PKG_PATHS_INCLUDE_DIRS} +/usr/lib/dbus-1.0/include +) + +FIND_LIBRARY(DBUS_LIBRARY +NAMES dbus-1 +PATHS /lib +) + +SET( DBUS_FOUND "NO" ) +IF(DBUS_LIBRARY) + SET( DBUS_FOUND "YES" ) + message(STATUS "Found DBUS libs: ${DBUS_LIBRARY}") + message(STATUS "Found DBUS includes: ${DBUS_INCLUDE_DIR}") + message(STATUS "Found DBUS arch dependent includes: ${DBUS_ARCH_INCLUDE_DIR}") +ENDIF(DBUS_LIBRARY) + +MARK_AS_ADVANCED( + DBUS_INCLUDE_DIR + DBUS_ARCH_INCLUDE_DIR + DBUS_LIBRARY +) diff --git a/cmake/modules/FindDRM.cmake b/cmake/modules/FindDRM.cmake new file mode 100644 index 0000000..f8cc55e --- /dev/null +++ b/cmake/modules/FindDRM.cmake @@ -0,0 +1,66 @@ +############################################################################ +# +# Copyright 2010, 2011 BMW Car IT GmbH +# Copyright (C) 2011 DENSO CORPORATION and Robert Bosch Car Multimedia Gmbh +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################ + +FIND_PATH(UDEV_INCLUDE_DIR /libudev.h +/usr/include +) + +FIND_LIBRARY(UDEV_LIBRARIES +NAMES udev +PATHS /usr/lib +) + +FIND_PATH(GBM_INCLUDE_DIR /gbm.h +/usr/include +) + +FIND_LIBRARY(GBM_LIBRARIES +NAMES gbm +PATHS /usr/lib +) + +FIND_PATH(DRM_INCLUDE_DIR /drm.h +/usr/include/libdrm /usr/include/drm +) + +FIND_LIBRARY(DRM_LIBRARIES +NAMES drm +PATHS /usr/lib +) + +SET( DRM_FOUND "NO" ) +IF(UDEV_LIBRARIES AND GBM_LIBRARIES AND DRM_LIBRARIES) + SET( DRM_FOUND "YES" ) + message(STATUS "Found udev libs: ${UDEV_LIBRARIES}") + message(STATUS "Found udev includes: ${UDEV_INCLUDE_DIR}") + message(STATUS "Found gbm libs: ${GBM_LIBRARIES}") + message(STATUS "Found gbm includes: ${GBM_INCLUDE_DIR}") + message(STATUS "Found drm includes: ${DRM_INCLUDE_DIR}") + message(STATUS "Found drm libs: ${DRM_LIBRARIES}") +ENDIF(UDEV_LIBRARIES AND GBM_LIBRARIES AND DRM_LIBRARIES) + +MARK_AS_ADVANCED( + UDEV_INCLUDE_DIR + UDEV_LIBRARIES + GBM_INCLUDE_DIR + GBM_LIBRARIES + DRM_INCLUDE_DIR + DRM_LIBRARIES +) diff --git a/cmake/modules/FindEGL.cmake b/cmake/modules/FindEGL.cmake new file mode 100644 index 0000000..8a43ec7 --- /dev/null +++ b/cmake/modules/FindEGL.cmake @@ -0,0 +1,39 @@ +############################################################################ +# +# Copyright 2010, 2011 BMW Car IT GmbH +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################ + +FIND_PATH(EGL_INCLUDE_DIR EGL/egl.h +/usr/include +) + +FIND_LIBRARY(EGL_LIBRARY +NAMES EGL +PATHS +) + +SET( EGL_FOUND "NO" ) +IF(EGL_LIBRARY) + SET( EGL_FOUND "YES" ) + message(STATUS "Found EGL libs: ${EGL_LIBRARY}") + message(STATUS "Found EGL includes: ${EGL_INCLUDE_DIR}") +ENDIF(EGL_LIBRARY) + +MARK_AS_ADVANCED( + EGL_INCLUDE_DIR + EGL_LIBRARY +) diff --git a/cmake/modules/FindGLESv2.cmake b/cmake/modules/FindGLESv2.cmake new file mode 100644 index 0000000..8f7e6e5 --- /dev/null +++ b/cmake/modules/FindGLESv2.cmake @@ -0,0 +1,39 @@ +############################################################################ +# +# Copyright 2010, 2011 BMW Car IT GmbH +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################ + +FIND_PATH(GLESv2_INCLUDE_DIR GLES2/gl2.h +/usr/include +) + +FIND_LIBRARY(GLESv2_LIBRARIES +NAMES GLESv2 +PATHS +) + +SET( GLESv2_FOUND "NO" ) +IF(GLESv2_LIBRARIES) + SET( GLESv2_FOUND "YES" ) + message(STATUS "Found GLESv2 libs: ${GLESv2_LIBRARIES}") + message(STATUS "Found GLESv2 includes: ${GLESv2_INCLUDE_DIR}") +ENDIF(GLESv2_LIBRARIES) + +MARK_AS_ADVANCED( + GLESv2_INCLUDE_DIR + GLESv2_LIBRARIES +) diff --git a/cmake/modules/FindGLX.cmake b/cmake/modules/FindGLX.cmake new file mode 100644 index 0000000..72b88d4 --- /dev/null +++ b/cmake/modules/FindGLX.cmake @@ -0,0 +1,39 @@ +############################################################################ +# +# Copyright 2010, 2011 BMW Car IT GmbH +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################ + +FIND_PATH(GLX_INCLUDE_DIR GL/glx.h +/usr/include +) + +FIND_LIBRARY(GLX_LIBRARIES +NAMES GL +PATHS /usr/lib /usr/local/lib +) + +SET( GLX_FOUND "NO" ) +IF(GLX_LIBRARIES) + SET( GLX_FOUND "YES" ) + message(STATUS "Found GLX libs: ${GLX_LIBRARIES}") + message(STATUS "Found GLX includes: ${GLX_INCLUDE_DIR}") +ENDIF(GLX_LIBRARIES) + +MARK_AS_ADVANCED( + GLX_INCLUDE_DIR + GLX_LIBRARIES +) diff --git a/cmake/modules/FindPixman.cmake b/cmake/modules/FindPixman.cmake new file mode 100644 index 0000000..5e892be --- /dev/null +++ b/cmake/modules/FindPixman.cmake @@ -0,0 +1,40 @@ +############################################################################ +# +# Copyright (C) 2013 DENSO CORPORATION +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################ + +FIND_PATH(PIXMAN_INCLUDE_DIR pixman.h +/usr/include/pixman-1 +/include/pixman-1 +) + +FIND_LIBRARY(PIXMAN_LIBRARIES +NAMES pixman-1 +PATHS /usr/lib +) + +SET( PIXMAN_FOUND "NO" ) +IF(PIXMAN_LIBRARIES) + SET( PIXMAN_FOUND "YES" ) + message(STATUS "Found pixman libs: ${PIXMAN_LIBRARIES}") + message(STATUS "Found pixman includes: ${PIXMAN_INCLUDE_DIR}") +ENDIF(PIXMAN_LIBRARIES) + +MARK_AS_ADVANCED( + PIXMAN_INCLUDE_DIR + PIXMAN_LIBRARIES +) diff --git a/cmake/modules/FindWayland.cmake b/cmake/modules/FindWayland.cmake new file mode 100644 index 0000000..5b3ae8b --- /dev/null +++ b/cmake/modules/FindWayland.cmake @@ -0,0 +1,99 @@ +############################################################################ +# +# Copyright 2010, 2011 BMW Car IT GmbH +# Copyright (C) 2011 DENSO CORPORATION and Robert Bosch Car Multimedia Gmbh +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################ + +FIND_PATH(WAYLAND_CLIENT_INCLUDE_DIR /wayland-client.h +/usr/include /usr/local/include +) + +FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES +NAMES wayland-client +PATHS /usr/lib /usr/local/lib +) + +FIND_PATH(WAYLAND_SERVER_INCLUDE_DIR /wayland-server.h +/usr/include /usr/local/include +) + +FIND_LIBRARY(WAYLAND_SERVER_LIBRARIES +NAMES wayland-server +PATHS /usr/lib /usr/local/lib +) + +FIND_LIBRARY(WAYLAND_EGL_LIBRARIES +NAMES wayland-egl +PATHS /usr/lib /usr/local/lib +) + +FIND_PATH(FFI_INCLUDE_DIR /ffi.h +/usr/include /usr/local/include /usr/include/i386-linux-gnu +) + +FIND_LIBRARY(FFI_LIBRARIES +NAMES ffi +PATHS /usr/lib /usr/local/lib +) + +FIND_PATH(XKB_INCLUDE_DIR /xkbcommon.h +/usr/include/xkbcommon /usr/local/include/xkbcommon +) + +FIND_LIBRARY(XKB_LIBRARIES +NAMES xkbcommon +PATHS /usr/lib /usr/local/lib +) + +FIND_PATH(MTDEV_INCLUDE_DIR /mtdev.h +/usr/include /usr/local/include +) + +FIND_LIBRARY(MTDEV_LIBRARIES +NAMES mtdev +PATHS /usr/lib /usr/local/lib +) + +SET( WAYLAND_FOUND "NO" ) +IF(WAYLAND_CLIENT_LIBRARIES AND WAYLAND_SERVER_LIBRARIES) + SET( WAYLAND_FOUND "YES" ) + message(STATUS "Found Wayland-Client libs: ${WAYLAND_CLIENT_LIBRARIES}") + message(STATUS "Found Wayland-Client includes: ${WAYLAND_CLIENT_INCLUDE_DIR}") + message(STATUS "Found Wayland-Server libs: ${WAYLAND_SERVER_LIBRARIES}") + message(STATUS "Found Wayland-Server includes: ${WAYLAND_SERVER_INCLUDE_DIR}") + message(STATUS "Found Wayland-Egl libs: ${WAYLAND_EGL_LIBRARIES}") + message(STATUS "Found ffi need by Wayland libs: ${FFI_LIBRARIES}") + message(STATUS "Found ffi need by Wayland includes: ${FFI_INCLUDE_DIR}") + message(STATUS "Found xkbcommon need by Wayland libs: ${XKB_LIBRARIES}") + message(STATUS "Found xkbcommon need by Wayland includes: ${XKB_INCLUDE_DIR}") + message(STATUS "Found mtdev need by Wayland libs: ${MTDEV_LIBRARIES}") + message(STATUS "Found mtdev need by Wayland includes: ${MTDEV_INCLUDE_DIR}") +ENDIF(WAYLAND_CLIENT_LIBRARIES AND WAYLAND_SERVER_LIBRARIES) + +MARK_AS_ADVANCED( + WAYLAND_CLIENT_INCLUDE_DIR + WAYLAND_CLIENT_LIBRARIES + WAYLAND_SERVER_INCLUDE_DIR + WAYLAND_SERVER_LIBRARIES + WAYLAND_EGL_LIBRARIES + FFI_INCLUDE_DIR + FFI_LIBRARIES + XKB_LIBRARIES + XKB_INCLUDE_DIR + MTDEV_LIBRARIES + MTDEV_INCLUDE_DIR +) diff --git a/cmake/modules/FindWeston.cmake b/cmake/modules/FindWeston.cmake new file mode 100644 index 0000000..ac811ae --- /dev/null +++ b/cmake/modules/FindWeston.cmake @@ -0,0 +1,33 @@ +############################################################################ +# +# Copyright (C) 2013 DENSO CORPORATION +# +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +############################################################################ + +FIND_PATH(WESTON_INCLUDE_DIR compositor.h +/usr/include/weston +/include/weston +) + +SET( WESTON_FOUND "NO" ) +IF(WESTON_INCLUDE_DIR) + SET( WESTON_FOUND "YES" ) + message(STATUS "Found weston includes: ${WESTON_INCLUDE_DIR}") +ENDIF(WESTON_INCLUDE_DIR) + +MARK_AS_ADVANCED( + WESTON_INCLUDE_DIR +) |