diff options
Diffstat (limited to 'cmake/openwattcom')
-rwxr-xr-x | cmake/openwattcom/ow-cmake.sh | 9 | ||||
-rw-r--r-- | cmake/openwattcom/toolchain-ow.cmake | 37 |
2 files changed, 25 insertions, 21 deletions
diff --git a/cmake/openwattcom/ow-cmake.sh b/cmake/openwattcom/ow-cmake.sh index cbccba0..2e6dbe5 100755 --- a/cmake/openwattcom/ow-cmake.sh +++ b/cmake/openwattcom/ow-cmake.sh @@ -1,8 +1,8 @@ #!/bin/bash -export WATCOM=/home/wohlstand/Qt/Tools/ow-snapshot-2.0/ +export WATCOM=$HOME/Qt/Tools/ow-snapshot-2.0 export EDPATH=$WATCOM/eddat export WIPFC=$WATCOM/wipfc -export INCLUDE="$djgpp_prefix/lh" +export INCLUDE="$WATCOM/lh" WATCOM_FLAGS="-blinux" export CFLAGS="$WATCOM_FLAGS -xc -std=wc" export CXXFLAGS="$WATCOM_FLAGS -xc++ -xs -feh -std=c++11" @@ -11,7 +11,8 @@ export CXXFLAGS="$WATCOM_FLAGS -xc++ -xs -feh -std=c++11" # djgpp_c_flags="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4" -CUSTOM_PATH=/home/wohlstand/_git_repos/libADLMIDI/cmake/openwattcom:${WATCOM}/binl:$PATH +SCRIPT_PATH=$HOME/_git_repos/libADLMIDI/cmake/openwattcom +CUSTOM_PATH=$SCRIPT_PATH:${WATCOM}/binl:$PATH if [[ "$1" != '--build' ]]; then echo "KEK [${CUSTOM_PATH}]" @@ -24,7 +25,7 @@ if [[ "$1" != '--build' ]]; then -DSYSCONF_INSTALL_DIR:PATH=${WATCOM}/etc \ -DSHARE_INSTALL_DIR:PATH=${WATCOM}/share \ -DBUILD_SHARED_LIBS:BOOL=OFF \ - -DCMAKE_TOOLCHAIN_FILE=/home/wohlstand/_git_repos/libADLMIDI/cmake/openwattcom/toolchain-ow.cmake \ + -DCMAKE_TOOLCHAIN_FILE=$SCRIPT_PATH/toolchain-ow.cmake \ "$@" else diff --git a/cmake/openwattcom/toolchain-ow.cmake b/cmake/openwattcom/toolchain-ow.cmake index 4f8b8f6..2881cc4 100644 --- a/cmake/openwattcom/toolchain-ow.cmake +++ b/cmake/openwattcom/toolchain-ow.cmake @@ -1,34 +1,37 @@ -set (CMAKE_SYSTEM_NAME linux) +set(CMAKE_CROSSCOMPILING TRUE) +set(CMAKE_SYSTEM_NAME Linux) -set (OPENWATTCOM TRUE) +set(OPENWATTCOM TRUE) +set(LINUX TRUE) -set (WATCOM_PREFIX "/home/wohlstand/Qt/Tools/ow-snapshot-2.0") +set(WATCOM_PREFIX "$ENV{HOME}/Qt/Tools/ow-snapshot-2.0") -set (ENV{PATH} ${WATCOM_PREFIX}/binl:$ENV{PATH}) -set (ENV{WATCOM} ${WATCOM_PREFIX}) -set (ENV{INCLUDE} ${WATCOM_PREFIX}/lh) -set (ENV{EDPATH} ${WATCOM_PREFIX}/eddat) -set (ENV{WIPFC} ${WATCOM_PREFIX}/wipfc) +set(ENV{PATH} ${WATCOM_PREFIX}/binl:$ENV{PATH}) +set(ENV{WATCOM} ${WATCOM_PREFIX}) +set(ENV{INCLUDE} "${WATCOM_PREFIX}/lh") +set(ENV{LIB} "${WATCOM_PREFIX}/lib386") +set(ENV{EDPATH} ${WATCOM_PREFIX}/eddat) +set(ENV{WIPFC} ${WATCOM_PREFIX}/wipfc) # specify the cross compiler -set (CMAKE_C_COMPILER ${WATCOM_PREFIX}/binl/owcc) -set (CMAKE_CXX_COMPILER ${WATCOM_PREFIX}/binl/owcc) +set(CMAKE_C_COMPILER ${WATCOM_PREFIX}/binl/owcc) +set(CMAKE_CXX_COMPILER ${WATCOM_PREFIX}/binl/owcc) # where is the target environment -set (CMAKE_FIND_ROOT_PATH ${WATCOM_PREFIX}) +set(CMAKE_FIND_ROOT_PATH ${WATCOM_PREFIX}) # search for programs in the build host directories -set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +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) -set (CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) include_directories(${WATCOM_PREFIX}/lh) # Make sure Qt can be detected by CMake -set (QT_BINARY_DIR ${WATCOM_PREFIX}/binl /usr/bin) -set (QT_INCLUDE_DIRS_NO_SYSTEM ON) +set(QT_BINARY_DIR ${WATCOM_PREFIX}/binl /usr/bin) +set(QT_INCLUDE_DIRS_NO_SYSTEM ON) # These are needed for compiling lapack (RHBZ #753906) #set (CMAKE_Fortran_COMPILER /home/wohlstand/Qt/Tools/ow-snapshot-2.0/binl/wfc) |