Add TizenCommon Cmake Module (TizenCommon.cmake) to cmake native package
authorBaptiste DURAND <baptiste.durand@frignu.net>
Mon, 2 Sep 2013 14:13:43 +0000 (16:13 +0200)
committerBaptiste DURAND <baptiste.durand@frignu.net>
Mon, 2 Sep 2013 14:13:43 +0000 (16:13 +0200)
needed to build wrt packages

Signed-off-by: Baptiste DURAND <baptiste.durand@frignu.net>
meta-wrt-tizen/recipes-devtools/cmake/cmake-native_2.8.11.2.bbappend [new file with mode: 0644]
meta-wrt-tizen/recipes-devtools/cmake/files/TizenCommon.cmake [new file with mode: 0644]

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 (file)
index 0000000..890f769
--- /dev/null
@@ -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 (file)
index 0000000..11bd64f
--- /dev/null
@@ -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}" )
+