diff XCompile.txt @ 0:f9476ff7637e

initial forking of open-al to create multiple listeners
author Robert McIntyre <rlm@mit.edu>
date Tue, 25 Oct 2011 13:02:31 -0700
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/XCompile.txt	Tue Oct 25 13:02:31 2011 -0700
     1.3 @@ -0,0 +1,30 @@
     1.4 +# Cross-compiling requires CMake 2.6 or newer. To use it from build/, call it
     1.5 +# like this:
     1.6 +# cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile.txt -DHOST=i686-pc-mingw32
     1.7 +# Where 'i686-pc-mingw32' is the host prefix for your cross-compiler. If you
     1.8 +# already have a toolchain file setup, you may use that instead of this file.
     1.9 +
    1.10 +# the name of the target operating system
    1.11 +SET(CMAKE_SYSTEM_NAME Windows)
    1.12 +
    1.13 +# which compilers to use for C and C++
    1.14 +SET(CMAKE_C_COMPILER "${HOST}-gcc")
    1.15 +SET(CMAKE_CXX_COMPILER "${HOST}-g++")
    1.16 +
    1.17 +# here is the target environment located
    1.18 +SET(CMAKE_FIND_ROOT_PATH "/usr/${HOST}")
    1.19 +
    1.20 +# here is where stuff gets installed to
    1.21 +SET(CMAKE_INSTALL_PREFIX "${CMAKE_FIND_ROOT_PATH}/usr" CACHE STRING "Install path prefix, prepended onto install directories." FORCE)
    1.22 +
    1.23 +# adjust the default behaviour of the FIND_XXX() commands:
    1.24 +# search headers and libraries in the target environment, search 
    1.25 +# programs in the host environment
    1.26 +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
    1.27 +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
    1.28 +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
    1.29 +
    1.30 +# set env vars so that pkg-config will look in the appropriate directory for
    1.31 +# .pc files (as there seems to be no way to force using ${HOST}-pkg-config)
    1.32 +set(ENV{PKG_CONFIG_LIBDIR} "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
    1.33 +set(ENV{PKG_CONFIG_PATH} "")