Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/cmake/ConfigPlatforms.cmake @ 2582

Last change on this file since 2582 was 2582, checked in by rgrieder, 15 years ago
  • Using dependency directory directly in root dir of a branch as primary folder (./libs resp. ./dependencies) Second priority is ../libs for MinGW and ../lib_dist/vc8/dependencies for msvc.
  • Moved compiler and linker flags to ConfigPlatforms.cmake
  • Solved additional libraries for ENet under MinGW directly in FindEnet.cmake
  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1 #
2 #   ORXONOX - the hottest 3D action shooter ever to exist
3 #                    > www.orxonox.net <
4 #
5 #
6 #   License notice:
7 #
8 #   This program is free software; you can redistribute it and/or
9 #   modify it under the terms of the GNU General Public License
10 #   as published by the Free Software Foundation; either version 2
11 #   of the License, or (at your option) any later version.
12 #
13 #   This program is distributed in the hope that it will be useful,
14 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #   GNU General Public License for more details.
17 #
18 #   You should have received a copy of the GNU General Public License
19 #   along with this program; if not, write to the Free Software
20 #   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 #
22 #   Author:
23 #      Reto Grieder
24 #   Co-authors:
25 #      ...
26 #
27 
28# If you want to set specific options for your platform, simply
29# create a file called "ConfigUser.cmake" in the binary folder
30# (see at the bottom of the file)
31
32############ Misc Default Options ###############
33
34SET(LIBRARY_DEBUG_POSTFIX "_d")
35
36OPTION(EXTRA_WARNINGS "Enable some extra warnings (pollutes the output heavily)")
37IF(EXTRA_WARNINGS)
38  SET(ORXONOX_WARNING_FLAGS "-Wextra --Wno-unsued-parameter")
39ELSE(EXTRA_WARNINGS)
40  SET(ORXONOX_WARNING_FLAGS "-Wall")
41ENDIF(EXTRA_WARNINGS)
42
43MARK_AS_ADVANCED(
44  LIBRARY_DEBUG_POSTFIX
45  ORXONOX_WARNINGS_FLAGS
46)
47
48###### Default Compiler/Linker Options ##########
49# Most people use GCC to compile orxonox, so use that as default
50
51SET(CMAKE_C_FLAGS   "$ENV{CFLAGS}   ${ORXONOX_WARNING_FLAGS} -fPIC")
52SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} ${ORXONOX_WARNING_FLAGS} -fPIC")
53# These flags are added to the flags above
54SET(CMAKE_C_FLAGS_DEBUG            "    -g -ggdb")
55SET(CMAKE_CXX_FLAGS_DEBUG          "    -g -ggdb")
56SET(CMAKE_C_FLAGS_RELEASE          "-O3          -DNDEBUG")
57SET(CMAKE_CXX_FLAGS_RELEASE        "-O3          -DNDEBUG")
58SET(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g -ggdb -DNDEBUG")
59SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -ggdb -DNDEBUG")
60SET(CMAKE_C_FLAGS_MINSIZEREL       "-Os          -DNDEBUG")
61SET(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os          -DNDEBUG")
62
63SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
64SET(CMAKE_EXE_LINKER_FLAGS    " --no-undefined")
65SET(CMAKE_SHARED_LINKER_FLAGS " --no-undefined")
66SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
67
68########## Plaform Specific Config ##############
69
70# Set the platform specific options and paths
71INCLUDE(ConfigTardis)
72INCLUDE(ConfigMSVC)
73INCLUDE(ConfigMinGW)
74# User can create his own file if required
75IF(EXISTS ${CMAKE_BINARY_DIR}/ConfigUser.cmake)
76  INCLUDE(${CMAKE_BINARY_DIR}/ConfigUser)
77ENDIF(EXISTS ${CMAKE_BINARY_DIR}/ConfigUser.cmake)
Note: See TracBrowser for help on using the repository browser.