mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
cmake:
- merge install script with build script
This commit is contained in:
parent
a63071bc4a
commit
2cf8ef70c1
@ -9,3 +9,54 @@ cd $PKG_BUILD
|
||||
./configure --no-qt-gui
|
||||
|
||||
make
|
||||
|
||||
mkdir -p $ROOT/$TOOLCHAIN/bin
|
||||
cp -P bin/cmake $ROOT/$TOOLCHAIN/bin
|
||||
cp -P bin/cpack $ROOT/$TOOLCHAIN/bin
|
||||
cp -P bin/ctest $ROOT/$TOOLCHAIN/bin
|
||||
|
||||
mkdir -p $ROOT/$TOOLCHAIN/etc
|
||||
|
||||
cat >$ROOT/$TOOLCHAIN/etc/cmake-$TARGET_NAME.conf <<EOF
|
||||
# this one is important
|
||||
SET(CMAKE_SYSTEM_NAME Linux)
|
||||
#this one not so much
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
# specify the cross compiler
|
||||
SET(CMAKE_C_COMPILER $TARGET_CC)
|
||||
SET(CMAKE_CXX_COMPILER $TARGET_CXX)
|
||||
|
||||
# where is the target environment
|
||||
SET(CMAKE_FIND_ROOT_PATH $SYSROOT_PREFIX)
|
||||
|
||||
# search for programs in the build host directories
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
|
||||
# for libraries and headers in the target directories
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
EOF
|
||||
|
||||
cat >$ROOT/$TOOLCHAIN/etc/cmake-$HOST_NAME.conf <<EOF
|
||||
# this one is important
|
||||
SET(CMAKE_SYSTEM_NAME Linux)
|
||||
#this one not so much
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
# specify the host compiler
|
||||
SET(CMAKE_C_COMPILER $HOST_CC)
|
||||
SET(CMAKE_CXX_COMPILER $HOST_CXX)
|
||||
|
||||
# where is the target environment
|
||||
SET(CMAKE_FIND_ROOT_PATH $ROOT/$TOOLCHAIN)
|
||||
|
||||
# search for programs in the build host directories
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
|
||||
|
||||
# for libraries and headers in the target directories
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
|
||||
|
||||
EOF
|
||||
|
@ -1,54 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
mkdir -p $ROOT/$TOOLCHAIN/bin
|
||||
cp -P $PKG_BUILD/bin/cmake $ROOT/$TOOLCHAIN/bin
|
||||
cp -P $PKG_BUILD/bin/cpack $ROOT/$TOOLCHAIN/bin
|
||||
cp -P $PKG_BUILD/bin/ctest $ROOT/$TOOLCHAIN/bin
|
||||
|
||||
mkdir -p $ROOT/$TOOLCHAIN/etc
|
||||
|
||||
cat >$ROOT/$TOOLCHAIN/etc/cmake-$TARGET_NAME.conf <<EOF
|
||||
# this one is important
|
||||
SET(CMAKE_SYSTEM_NAME Linux)
|
||||
#this one not so much
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
# specify the cross compiler
|
||||
SET(CMAKE_C_COMPILER $TARGET_CC)
|
||||
SET(CMAKE_CXX_COMPILER $TARGET_CXX)
|
||||
|
||||
# where is the target environment
|
||||
SET(CMAKE_FIND_ROOT_PATH $SYSROOT_PREFIX)
|
||||
|
||||
# search for programs in the build host directories
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
|
||||
# for libraries and headers in the target directories
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
EOF
|
||||
|
||||
cat >$ROOT/$TOOLCHAIN/etc/cmake-$HOST_NAME.conf <<EOF
|
||||
# this one is important
|
||||
SET(CMAKE_SYSTEM_NAME Linux)
|
||||
#this one not so much
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
# specify the host compiler
|
||||
SET(CMAKE_C_COMPILER $HOST_CC)
|
||||
SET(CMAKE_CXX_COMPILER $HOST_CXX)
|
||||
|
||||
# where is the target environment
|
||||
SET(CMAKE_FIND_ROOT_PATH $ROOT/$TOOLCHAIN)
|
||||
|
||||
# search for programs in the build host directories
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
|
||||
|
||||
# for libraries and headers in the target directories
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
|
||||
|
||||
EOF
|
Loading…
x
Reference in New Issue
Block a user