~ubuntu-branches/ubuntu/natty/plee-the-bear/natty

« back to all changes in this revision

Viewing changes to bear-engine/CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Julien Jorge, Julien Jorge
  • Date: 2010-11-17 20:13:34 UTC
  • mfrom: (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20101117201334-o4dp7uq437to7oxb
Tags: 0.5.1-1
[ Julien Jorge ]
* New upstream release (Closes: #565062, #546514).
* Add armhf architecture (Closes: #604689).
* Remove patches integrated upstream: rpath-editors.diff, rpath-game.diff,
  editors-menu-section.diff.
* Bump the Standard-Version, no changes.
* Update my email address.
* Set build dependency of libclaw to 1.6.0.
* Add the missing ${misc:Depends} in debian/control.
* List gettext translations in bear-factory.install and plee-the-bear.install.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
2
 
PROJECT(bear-engine)
 
1
cmake_minimum_required(VERSION 2.6)
 
2
project(bear-engine)
3
3
 
4
4
# where the game programs are installed
5
 
IF( NOT BEAR_ENGINE_INSTALL_EXECUTABLE_DIR )
6
 
  SET( BEAR_ENGINE_INSTALL_EXECUTABLE_DIR bin )
7
 
ENDIF( NOT BEAR_ENGINE_INSTALL_EXECUTABLE_DIR )
 
5
if( NOT BEAR_ENGINE_INSTALL_EXECUTABLE_DIR )
 
6
  set( BEAR_ENGINE_INSTALL_EXECUTABLE_DIR bin )
 
7
endif( NOT BEAR_ENGINE_INSTALL_EXECUTABLE_DIR )
8
8
 
9
9
# where the engine libraries are installed
10
 
IF( NOT BEAR_ENGINE_INSTALL_LIBRARY_DIR )
11
 
  IF( WIN32 )
12
 
    SET( BEAR_ENGINE_INSTALL_LIBRARY_DIR
 
10
if( NOT BEAR_ENGINE_INSTALL_LIBRARY_DIR )
 
11
  if( WIN32 )
 
12
    set( BEAR_ENGINE_INSTALL_LIBRARY_DIR
13
13
      "${BEAR_ENGINE_INSTALL_EXECUTABLE_DIR}"
14
14
      )
15
 
  ELSE( WIN32 )
16
 
    SET( BEAR_ENGINE_INSTALL_LIBRARY_DIR lib )
17
 
  ENDIF( WIN32 )
18
 
ENDIF( NOT BEAR_ENGINE_INSTALL_LIBRARY_DIR )
 
15
  else( WIN32 )
 
16
    set( BEAR_ENGINE_INSTALL_LIBRARY_DIR lib )
 
17
  endif( WIN32 )
 
18
endif( NOT BEAR_ENGINE_INSTALL_LIBRARY_DIR )
19
19
 
20
20
# Directories where the executable and libraries are built
21
 
SET( EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/bin" )
22
 
SET( LIBRARY_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}" )
 
21
set( EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/bin" )
 
22
set( LIBRARY_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}" )
23
23
 
24
24
# common flags
25
 
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" )
 
25
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" )
26
26
 
27
27
#-------------------------------------------------------------------------------
28
28
# various libraries
32
32
 
33
33
# Not really optional, but we want to display a custom message if we do not find
34
34
# the module
35
 
INCLUDE(FindCLAW OPTIONAL)
36
 
 
37
 
IF( NOT CLAW_FOUND )
38
 
  MESSAGE( FATAL_ERROR
 
35
include(FindCLAW OPTIONAL)
 
36
 
 
37
if( CLAW_FOUND )
 
38
  VERSION_GREATER_EQUAL( ${CLAW_VERSION} "1.6.0" CLAW_VERSION_OK )
 
39
 
 
40
  if( NOT CLAW_VERSION_OK )
 
41
    message( FATAL_ERROR
 
42
      "It seems that libclaw is installed on your system in a too old version."
 
43
      "Check http://libclaw.sourceforge.net/ to download the latest release."
 
44
      )
 
45
  endif( NOT CLAW_VERSION_OK )
 
46
else( CLAW_FOUND )
 
47
  message( FATAL_ERROR
39
48
    "It seems that libclaw is not installed on your system. If your "
40
49
    "distribution does not give you an easy installation procedure, check "
41
50
    "http://libclaw.sourceforge.net/ to download it."
42
51
    )
43
 
 
44
 
ENDIF( NOT CLAW_FOUND )
 
52
endif( CLAW_FOUND )
45
53
 
46
54
#-------------------------------------------------------------------------------
47
55
# Include directories for Claw
48
 
INCLUDE_DIRECTORIES(
 
56
include_directories(
49
57
  ${CLAW_INCLUDE_DIRECTORY}
50
58
  ${CLAW_GRAPHIC_INCLUDE_DIRECTORY}
51
59
  )
52
60
 
53
61
#-------------------------------------------------------------------------------
54
62
# Link directories for Claw
55
 
LINK_DIRECTORIES(
 
63
link_directories(
56
64
  ${CLAW_LINK_DIRECTORY}
57
65
  ${CLAW_GRAPHIC_LINK_DIRECTORY}
58
66
  )
59
67
 
60
68
#-------------------------------------------------------------------------------
61
69
# Boost
62
 
INCLUDE(FindBoost)
63
 
 
64
 
FIND_PACKAGE( Boost 1.33 REQUIRED COMPONENTS filesystem thread )
65
 
 
66
 
IF( NOT Boost_FOUND )
67
 
  MESSAGE( FATAL_ERROR 
68
 
    "You must have the boost::filesystem library installed (at least 1.33)" )
69
 
ENDIF( NOT Boost_FOUND )
 
70
include(FindBoost)
 
71
 
 
72
find_package( Boost 1.35 REQUIRED COMPONENTS filesystem system thread )
 
73
 
 
74
if( NOT Boost_FOUND )
 
75
  message( FATAL_ERROR 
 
76
    "You must have boost::filesystem and boost::thread libraries installed (at least 1.35)" )
 
77
endif( NOT Boost_FOUND )
70
78
 
71
79
#-------------------------------------------------------------------------------
72
80
# Include directories for Boost
73
 
INCLUDE_DIRECTORIES(
 
81
include_directories(
74
82
  ${Boost_INCLUDE_DIR}
75
83
  )
76
84
 
77
85
#-------------------------------------------------------------------------------
78
86
# Link directories for Boost
79
 
LINK_DIRECTORIES(
 
87
link_directories(
80
88
  ${Boost_LIBRARY_DIRS}
81
89
  )
82
90
 
83
91
#-------------------------------------------------------------------------------
84
 
# check boost::Spirit
85
 
FIND_PATH( BOOST_SPIRIT boost/spirit.hpp PATHS ${Boost_INCLUDE_DIR} )
86
 
 
87
 
IF ( NOT BOOST_SPIRIT )
88
 
  MESSAGE( FATAL_ERROR
89
 
    "You must have the Boost::Spirit library installed (at least 1.33)" )
90
 
ENDIF( NOT BOOST_SPIRIT )
91
 
 
92
 
#-------------------------------------------------------------------------------
93
92
# check OpenGL
94
 
INCLUDE( FindOpenGL )
 
93
include( FindOpenGL )
95
94
 
96
 
IF( NOT OPENGL_FOUND )
97
 
  MESSAGE( FATAL_ERROR "OpenGL must be installed." )
98
 
ENDIF( NOT OPENGL_FOUND )
 
95
if( NOT OPENGL_FOUND )
 
96
  message( FATAL_ERROR "OpenGL must be installed." )
 
97
endif( NOT OPENGL_FOUND )
99
98
 
100
99
#-------------------------------------------------------------------------------
101
100
# check SDL
102
 
INCLUDE( FindSDL )
 
101
include( FindSDL )
103
102
 
104
 
IF( NOT SDL_FOUND )
105
 
  MESSAGE( FATAL_ERROR "SDL lbrary must be installed." )
106
 
ELSE( NOT SDL_FOUND )
 
103
if( NOT SDL_FOUND )
 
104
  message( FATAL_ERROR "SDL lbrary must be installed." )
 
105
else( NOT SDL_FOUND )
107
106
  #-----------------------------------------------------------------------------
108
107
  # Include directories for SDL
109
 
  INCLUDE_DIRECTORIES(
 
108
  include_directories(
110
109
    ${SDL_INCLUDE_DIR}
111
110
    )
112
 
ENDIF( NOT SDL_FOUND )
 
111
endif( NOT SDL_FOUND )
113
112
 
114
113
#-------------------------------------------------------------------------------
115
114
# check SDL::mixer
116
 
INCLUDE( FindSDL_mixer )
 
115
include( FindSDL_mixer )
117
116
 
118
 
IF( NOT SDLMIXER_FOUND )
119
 
  MESSAGE( FATAL_ERROR "SDL_mixer lbrary must be installed." )
120
 
ELSE( NOT SDLMIXER_FOUND )
 
117
if( NOT SDLMIXER_FOUND )
 
118
  message( FATAL_ERROR "SDL_mixer lbrary must be installed." )
 
119
else( NOT SDLMIXER_FOUND )
121
120
  #-----------------------------------------------------------------------------
122
121
  # Include directories for all these libraries
123
 
  INCLUDE_DIRECTORIES(
 
122
  include_directories(
124
123
    ${SDLMIXER_INCLUDE_DIR}
125
124
    )
126
 
ENDIF( NOT SDLMIXER_FOUND )
 
125
endif( NOT SDLMIXER_FOUND )
127
126
 
128
127
#-------------------------------------------------------------------------------
129
128
# Link directories for the game
130
 
LINK_DIRECTORIES(
 
129
link_directories(
131
130
  ${LIBRARY_OUTPUT_PATH}
132
131
  )
133
132
 
134
133
#-------------------------------------------------------------------------------
135
 
INCLUDE_DIRECTORIES( common/include )
 
134
include_directories( common/include )
136
135
 
137
 
SET( BEAR_ENGINE_INCLUDE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/core/src" )
 
136
set( BEAR_ENGINE_INCLUDE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/core/src" )
138
137
 
139
138
#-------------------------------------------------------------------------------
140
 
SUBDIRS(
141
 
  common
 
139
subdirs(
142
140
  core
143
141
  lib
144
142
  running_bear