Fix cmake /etc path for native build
authorRonan Le Martret <ronan@fridu.net>
Wed, 15 Oct 2014 14:06:19 +0000 (16:06 +0200)
committerRonan Le Martret <ronan@fridu.net>
Wed, 15 Oct 2014 14:06:19 +0000 (16:06 +0200)
Change-Id: I2fba80fdb1a6800c99d2f4f9e5cc40c3cbd1b992
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
recipes-devtools/cmake/cmake-native_%.bbappend
recipes-devtools/cmake/files/TizenCommon_native.cmake [new file with mode: 0644]

index ebec5e8..acc20c1 100644 (file)
@@ -1,7 +1,8 @@
 FILESEXTRAPATHS_append := "${THISDIR}/files"
 
-SRC_URI += "file://TizenCommon.cmake"
+SRC_URI += "file://TizenCommon_native.cmake"
 
 do_install_append() {
-    install -m 644 ${WORKDIR}/TizenCommon.cmake ${D}${datadir}/cmake-${CMAKE_MAJOR_VERSION}/Modules
+    mv ${WORKDIR}/TizenCommon_native.cmake ${WORKDIR}/TizenCommon.cmake 
+    install -m 644 ${WORKDIR}/TizenCommon.cmake ${D}${datadir}/cmake-${CMAKE_MAJOR_VERSION}/Modules/
 }
\ No newline at end of file
diff --git a/recipes-devtools/cmake/files/TizenCommon_native.cmake b/recipes-devtools/cmake/files/TizenCommon_native.cmake
new file mode 100644 (file)
index 0000000..7cef5ed
--- /dev/null
@@ -0,0 +1,31 @@
+# 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" )
+ENDIF ( DEFINED  LIB )
+MESSAGE(STATUS "Libraries will be installed in ${LIB_INSTALL_DIR}" )
+
+# system configuration dir (etc)
+IF( NOT DEFINED SYSCONFDIR )
+  SET( SYSCONFDIR ${SYSCONF_INSTALL_DIR} )
+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}" )