Last change
on this file since 2617 was
2612,
checked in by rgrieder, 17 years ago
|
Rearranged CMake configuration code. I split serveral files in two and moved some code around.
There are no actual code changes!
Details:
- Everything that involves library finding is in LibraryConfig.cmake. It includes other LibraryConfigXXX.cmake files that set specific options for certain platforms or package configurations (like MSVC or MinGW dependency package).
- All build related code is in BuildConfig.cmake. The actual compiler configuration is done in BuildConfigXXX.cmake where XXX can be GCC or MSVC.
- The changes above implied splitting FindOGRE.cmake in two (was going to do it anyway, but rather in a later commit) so that CheckOGREPlugins.cmake is now a separate module.
|
-
Property svn:eol-style set to
native
|
File size:
848 bytes
|
Rev | Line | |
---|
[2599] | 1 | PROJECT(Orxonox C CXX) |
---|
[1505] | 2 | |
---|
[2509] | 3 | CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR) |
---|
[1505] | 4 | |
---|
[2599] | 5 | SET(ORXONOX_VERSION_MAJOR 0) |
---|
| 6 | SET(ORXONOX_VERSION_MINOR 1) |
---|
| 7 | SET(ORXONOX_VERSION_PATCH 0) |
---|
| 8 | SET(ORXONOX_VERSION 0.1.0) |
---|
[2582] | 9 | |
---|
| 10 | # Keep devs from using the root directory as binary directory (messes up the source tree) |
---|
[2574] | 11 | IF(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR}) |
---|
[2582] | 12 | MESSAGE(FATAL_ERROR "Do not use the root directory as CMake output directory! mkdir build; cd build; cmake ..") |
---|
[2574] | 13 | ENDIF(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR}) |
---|
| 14 | |
---|
[1776] | 15 | # This sets where to look for modules (e.g. "Find*.cmake" files) |
---|
[2599] | 16 | SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) |
---|
[1505] | 17 | |
---|
[2612] | 18 | # Library Config |
---|
| 19 | INCLUDE(LibraryConfig) |
---|
[2582] | 20 | |
---|
[2612] | 21 | # Build Config |
---|
| 22 | INCLUDE(BuildConfig) |
---|
[2582] | 23 | |
---|
[2612] | 24 | # Creates the actual project |
---|
[1505] | 25 | ADD_SUBDIRECTORY(src) |
---|
[2599] | 26 | |
---|
| 27 | # Configure the binary output directory |
---|
[2597] | 28 | ADD_SUBDIRECTORY(bin-config) |
---|
Note: See
TracBrowser
for help on using the repository browser.