Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 71 lines (56 sloc) 2.616 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
# @@@LICENSE
#
# Copyright (c) 2010-2013 Hewlett-Packard Development Company, L.P.
#
# 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.
#
# LICENSE@@@

# The values for following variables can be set from command line
# NYX_MODULE_DIR - Location of installed nyx modules
# NYX_MODULE_MOCK_DIR - Location of mock modules (if any)

cmake_minimum_required(VERSION 2.8.7)

project(nyx)

set(NYX_API_VERSION_MAJOR 4)
set(NYX_API_VERSION_MINOR 0)

include(webOS/webOS)
webos_modules_init(1 0 0 QUALIFIER RC4)
webos_component(${NYX_API_VERSION_MAJOR} ${NYX_API_VERSION_MINOR} 0 QUALIFIER RC1)

set(NYX_LIB_ROOT ${WEBOS_INSTALL_LIBDIR}/nyx CACHE PATH "Nyx internal executables install root path")
set(NYX_CMD_MODULE_DIR ${NYX_LIB_ROOT}/nyxcmd CACHE PATH "nyx-cmd modules directory path")
set(NYX_MODULE_DIR ${NYX_LIB_ROOT}/modules CACHE PATH "Nyx modules directory path")
set(NYX_MODULE_MOCK_DIR ${NYX_LIB_ROOT}/modules.mock CACHE PATH "Nyx mock modules directory path")
set(NYX_MODULE_PREFIX nyx)
set(NYX_MODULE_SUFFIX .module)

webos_add_linker_options(ALL --no-undefined --as-needed)
webos_add_compiler_flags(ALL -Wall -g -std=c99)
webos_add_compiler_flags(ALL -D_GNU_SOURCE=1)
webos_add_compiler_flags(DEBUG -O0 -DDEBUG -D_DEBUG)
webos_add_compiler_flags(RELEASE -DNDEBUG)

add_definitions(-DNYX_MODULE_PREFIX=\"${NYX_MODULE_PREFIX}\")
add_definitions(-DNYX_MODULE_SUFFIX=\"${NYX_MODULE_SUFFIX}\")
add_definitions(-DNYX_MODULE_DIR=\"${NYX_MODULE_DIR}\")
add_definitions(-DNYX_MODULE_MOCK_DIR=\"${NYX_MODULE_MOCK_DIR}\")

include(FindPkgConfig)

#Check that we have glib-2.0
pkg_check_modules(GLIB2 REQUIRED glib-2.0)
include_directories(${GLIB2_INCLUDE_DIRS})
webos_add_compiler_flags(ALL ${GLIB2_CFLAGS_OTHER})

webos_configure_header_files(src/core)
webos_configure_header_files(include/public INSTALL)

include_directories(include/public src/core)

file(GLOB NYX_SOURCE src/core/*.c src/device/*.c src/utils/*.c)
add_library(nyx SHARED ${NYX_SOURCE})
target_link_libraries(nyx ${GLIB2_LIBRARIES} dl pthread rt)

webos_build_pkgconfig()
webos_build_library()

webos_config_build_doxygen(doc module_api.doxy client_api.doxy)
Something went wrong with that request. Please try again.