Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 20, 2009, 11:49:37 PM (15 years ago)
Author:
rgrieder
Message:
  • Moved all (as far as possible) build related CMake options and switches to src/OrxonoxConfig.cmake (new file). This should my constant problems of finding options I've created some time ago…
  • Renamed BuildConfig to CompilerConfig (since that's what it has become now).
  • Moved all installation related options and paths to cmake/InstallConfig.cmake (new file)
  • Note: I moved the very basic options to the root CMLs like default paths (bin, lib, doc, etc.), output directories and configuration type.

Actual code changes are absolutely minimal, maybe a few lines or so.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource2/CMakeLists.txt

    r5645 r5664  
    1717 #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    1818 #
    19  
     19 #
     20 #  Author:
     21 #    Reto Grieder
     22 #  Description:
     23 #    Configures some basics and controls the configuration scripts
     24 #
     25
    2026CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
    2127
     
    2733ENDIF()
    2834
    29 
    3035PROJECT(Orxonox C CXX)
    3136
     37################ General Config #################
     38
     39# Version info
    3240SET(ORXONOX_VERSION_MAJOR 0)
    3341SET(ORXONOX_VERSION_MINOR 0)
     
    3644SET(ORXONOX_VERSION_NAME "Arcturus")
    3745
     46# Standard path suffixes
     47SET(DEFAULT_RUNTIME_PATH bin)
     48SET(DEFAULT_LIBRARY_PATH lib)
     49SET(DEFAULT_ARCHIVE_PATH lib/static)
     50SET(DEFAULT_DOC_PATH     doc)
     51SET(DEFAULT_DATA_PATH    data)
     52SET(DEFAULT_CONFIG_PATH  config)
     53SET(DEFAULT_LOG_PATH     log)
    3854
    39 # This sets where to look for modules (e.g. "Find*.cmake" files)
     55# Set output directories
     56SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_RUNTIME_PATH})
     57SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_LIBRARY_PATH})
     58SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEFAULT_ARCHIVE_PATH})
     59SET(CMAKE_DOC_OUTPUT_DIRECTORY     ${CMAKE_BINARY_DIR}/${DEFAULT_DOC_PATH})
     60# Data directories are only inputs, no delclaration here
     61SET(CMAKE_CONFIG_OUTPUT_DIRECTORY  ${CMAKE_BINARY_DIR}/${DEFAULT_CONFIG_PATH})
     62SET(CMAKE_LOG_OUTPUT_DIRECTORY     ${CMAKE_BINARY_DIR}/${DEFAULT_LOG_PATH})
     63
     64# Sets where to find the external libraries like OgreMain.dll at runtime
     65# On Unix you should not have to change this at all.
     66# This only applies to development runs in the build tree
     67SET(RUNTIME_LIBRARY_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
     68
     69# Take care of some CMake 2.6.0 leftovers
     70MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH)
     71
     72# This sets where to look for CMake modules (e.g. "Find*.cmake" files)
    4073SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
     74
     75# Set Debug build to default when not having multi-config generator like msvc
     76IF(NOT CMAKE_CONFIGURATION_TYPES)
     77  IF(NOT CMAKE_BUILD_TYPE)
     78    SET(CMAKE_BUILD_TYPE Debug CACHE STRING
     79        "Build types are: Debug, Release, MinSizeRel, RelWithDebInfo" FORCE)
     80  ENDIF()
     81  MARK_AS_ADVANCED(CLEAR CMAKE_BUILD_TYPE)
     82
     83  MESSAGE(STATUS "*** Build type is ${CMAKE_BUILD_TYPE} ***")
     84ELSE()
     85  IF(CMAKE_BUILD_TYPE)
     86    SET(CMAKE_BUILD_TYPE CACHE STRING FORCE)
     87  ENDIF()
     88  MARK_AS_ADVANCED(CMAKE_BUILD_TYPE)
     89ENDIF()
     90
     91########### Subfolders and Subscripts ###########
    4192
    4293# Library finding
     
    4495
    4596# General build and compiler options and configurations
    46 INCLUDE(BuildConfig)
     97INCLUDE(CompilerConfig)
     98
     99# Configure installation paths and options
     100INCLUDE(InstallConfig)
    47101
    48102# Configure data directory location and installation
     
    55109ADD_SUBDIRECTORY(bin)
    56110
    57 # Last but not least: Try to make doxygen target
     111# Last but not least: Try to make a doc target with Doxygen
    58112ADD_SUBDIRECTORY(doc)
Note: See TracChangeset for help on using the changeset viewer.