~ubuntu-branches/ubuntu/quantal/openal-soft/quantal

« back to all changes in this revision

Viewing changes to XCompile.txt

  • Committer: Package Import Robot
  • Author(s): Michael Terry
  • Date: 2012-05-22 10:14:53 UTC
  • mfrom: (7.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20120522101453-knsv1m1m8vl5ccfp
Tags: 1:1.14-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  - Add a symbols file for libopenal1
* debian/libopenal1.symbols:
  - Update for 1.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Cross-compiling requires CMake 2.6 or newer. To cross-compile, first modify
2
 
# this file to set the proper settings and paths. Then use it from build/ like:
3
 
# cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile.txt \
4
 
#          -DCMAKE_INSTALL_PREFIX=/usr/mingw32/mingw
5
 
# If you already have a toolchain file setup, you may use that instead of this
6
 
# file.
 
1
# Cross-compiling requires CMake 2.6 or newer. To use it from build/, call it
 
2
# like this:
 
3
# cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile.txt -DHOST=i686-pc-mingw32
 
4
# Where 'i686-pc-mingw32' is the host prefix for your cross-compiler. If you
 
5
# already have a toolchain file setup, you may use that instead of this file.
7
6
 
8
7
# the name of the target operating system
9
8
SET(CMAKE_SYSTEM_NAME Windows)
10
9
 
11
10
# which compilers to use for C and C++
12
 
SET(CMAKE_C_COMPILER mingw32-gcc)
13
 
SET(CMAKE_CXX_COMPILER mingw32-g++)
 
11
SET(CMAKE_C_COMPILER "${HOST}-gcc")
 
12
SET(CMAKE_CXX_COMPILER "${HOST}-g++")
14
13
 
15
14
# here is the target environment located
16
 
SET(CMAKE_FIND_ROOT_PATH /usr/mingw32/mingw)
 
15
SET(CMAKE_FIND_ROOT_PATH "/usr/${HOST}")
 
16
 
 
17
# here is where stuff gets installed to
 
18
SET(CMAKE_INSTALL_PREFIX "${CMAKE_FIND_ROOT_PATH}/usr" CACHE STRING "Install path prefix, prepended onto install directories." FORCE)
17
19
 
18
20
# adjust the default behaviour of the FIND_XXX() commands:
19
21
# search headers and libraries in the target environment, search 
21
23
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
22
24
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
23
25
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
 
26
 
 
27
# set env vars so that pkg-config will look in the appropriate directory for
 
28
# .pc files (as there seems to be no way to force using ${HOST}-pkg-config)
 
29
set(ENV{PKG_CONFIG_LIBDIR} "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
 
30
set(ENV{PKG_CONFIG_PATH} "")