From 355b90db6f0f25c8566fb6fb60322b3ec81da4a9 Mon Sep 17 00:00:00 2001 From: Baptiste DURAND Date: Mon, 2 Sep 2013 16:13:43 +0200 Subject: [PATCH] Add TizenCommon Cmake Module (TizenCommon.cmake) to cmake native package needed to build wrt packages Signed-off-by: Baptiste DURAND --- .../cmake/cmake-native_2.8.11.2.bbappend | 7 ++++ .../recipes-devtools/cmake/files/TizenCommon.cmake | 37 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 meta-wrt-tizen/recipes-devtools/cmake/cmake-native_2.8.11.2.bbappend create mode 100644 meta-wrt-tizen/recipes-devtools/cmake/files/TizenCommon.cmake diff --git a/meta-wrt-tizen/recipes-devtools/cmake/cmake-native_2.8.11.2.bbappend b/meta-wrt-tizen/recipes-devtools/cmake/cmake-native_2.8.11.2.bbappend new file mode 100644 index 0000000..890f769 --- /dev/null +++ b/meta-wrt-tizen/recipes-devtools/cmake/cmake-native_2.8.11.2.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files" + +do_install_append_class-native () { + install -m 0666 ${WORKDIR}/TizenCommon.cmake ${D}/${datadir}/cmake-${CMAKE_MAJOR_VERSION}/Modules +} +SRC_URI += "file://TizenCommon.cmake" + diff --git a/meta-wrt-tizen/recipes-devtools/cmake/files/TizenCommon.cmake b/meta-wrt-tizen/recipes-devtools/cmake/files/TizenCommon.cmake new file mode 100644 index 0000000..11bd64f --- /dev/null +++ b/meta-wrt-tizen/recipes-devtools/cmake/files/TizenCommon.cmake @@ -0,0 +1,37 @@ +# Copied from libzypp +# Library +IF ( DEFINED LIB ) + SET ( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB}" ) +ELSE ( DEFINED LIB ) + IF (CMAKE_SIZEOF_VOID_P MATCHES "8") + SET( LIB_SUFFIX "64" ) + ENDIF(CMAKE_SIZEOF_VOID_P MATCHES "8") + SET ( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" ) +ENDIF ( DEFINED LIB ) +MESSAGE(STATUS "Libraries will be installed in ${LIB_INSTALL_DIR}" ) + +# system configuration dir (etc) +IF( NOT DEFINED SYSCONFDIR ) + IF ( ${CMAKE_INSTALL_PREFIX} STREQUAL "/usr" ) + # if installing in usr, set sysconfg to etc + SET( SYSCONFDIR /etc ) + ELSE ( ${CMAKE_INSTALL_PREFIX} STREQUAL "/usr" ) + SET ( SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc" ) + ENDIF ( ${CMAKE_INSTALL_PREFIX} STREQUAL "/usr" ) +ENDIF( NOT DEFINED SYSCONFDIR ) +MESSAGE(STATUS "Config files will be installed in ${SYSCONFDIR}" ) + +# usr INSTALL_PREFIX + +IF( DEFINED CMAKE_INSTALL_PREFIX ) + SET( INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} ) +ELSE( DEFINED CMAKE_INSTALL_PREFIX ) + SET( INSTALL_PREFIX /usr ) +ENDIF( DEFINED CMAKE_INSTALL_PREFIX ) + +# system configuration dir (etc) +IF( NOT DEFINED MANDIR ) + SET( MANDIR ${INSTALL_PREFIX}/share/man ) +ENDIF( NOT DEFINED MANDIR ) +MESSAGE( "** Manual files will be installed in ${MANDIR}" ) + -- 2.7.4