fbf: split the storage back-end out with interfaces, moved out the plain binary file...
[fail.git] / CMakeLists.txt
blob9e16ee5d9e2e50eeebb6d5beb011405c031aa28c
2 #   Fail game engine
3 #   Copyright 2007 Antoine Chavasse <a.chavasse@gmail.com>
4
5 #   This file is part of Fail.
7 #   Fail is free software; you can redistribute it and/or modify
8 #   it under the terms of the GNU General Public License version 3
9 #   as published by the Free Software Foundation.
11 #   Fail is distributed in the hope that it will be useful,
12 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #   GNU General Public License for more details.
16 #   You should have received a copy of the GNU General Public License
17 #   along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 project( Fail C CXX )
21 set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} )
23 set( LUA_MODULES_PATH ${CMAKE_INSTALL_PREFIX}/share/fail/lua-modules )
24 add_definitions( -DINSTALL_PREFIX='"${CMAKE_INSTALL_PREFIX}"' )
25 add_definitions( -DLUA_MODULES_PATH='"${LUA_MODULES_PATH}"' )
27 if( CMAKE_COMPILER_IS_GNUCXX )
28 # strict aliasing disabled because current gcc4.3 produces the warning when taking a reference or a pointer
29 # to a type_info using typeid. Will have to be reenabled when it's fixed.
30         add_definitions( -pipe -fPIC -pedantic -Wall -Wno-unused -fno-strict-aliasing -Wno-switch -Wno-long-long )
31 #       add_definitions( -pipe -fPIC -pedantic -Wall -Wno-unused -Wno-switch -Wno-long-long )
32 endif( CMAKE_COMPILER_IS_GNUCXX )
34 if( UNIX )
35         set( FAIL_EXPORT "__attribute (( visibility (\"default\") ))" )
36         set( FAIL_IMPORT "__attribute (( visibility (\"default\") ))" )
37 endif( UNIX )
40 if( WIN32 )
41 # This should work both with gcc and vc++ (although there seem to be no point in
42 # ever building this with vc++, assuming that vc++ one day implements c++0x)
43         set( FAIL_EXPORT "__declspec(dllexport)" )
44         set( FAIL_IMPORT "__declspec(dllimport)" )
45 endif( WIN32 )
47 include_directories(
48         ${PROJECT_SOURCE_DIR}
49         ${PROJECT_SOURCE_DIR}/src
50         ${PROJECT_BINARY_DIR}/include
51         ${PROJECT_SOURCE_DIR}/libs
53 link_directories( ${PROJECT_SOURCE_DIR}/libs )
55 subdirs(
56         libs
57         src
58         lua-modules