Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5695 for code/trunk/cmake


Ignore:
Timestamp:
Aug 30, 2009, 2:22:00 AM (15 years ago)
Author:
rgrieder
Message:

Merged resource2 branch back to trunk.

IMPORTANT NOTE:
Upon this merge you need to specifically call your data directory "data_extern" when checking it out (when you don't provide a name, it will be just called 'trunk').
The new CMake variable is EXTERNAL_DATA_DIRECTORY. DATA_DIRECTORY now points to the one the source part of the repository.
UPDATE YOUR DATA DIRECTORY AS WELL!!!

Location:
code/trunk
Files:
4 deleted
9 edited
4 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/cmake/CheckOGREPlugins.cmake

    r2710 r5695  
    3232 #    OGRE_PLUGINS_RELEASE        Names of the release plugins without ext.
    3333 #  Note:
    34  #    You must not specify render systems as input, but the ones found will be
    35  #    present in the output variables.
     34 #    You must not specify render systems as input. That will be taken care of
     35 #    automatically.
    3636 #
    3737
  • code/trunk/cmake/GenerateToluaBindings.cmake

    r3368 r5695  
    3030 #    TOLUA_PARSER_SOURCE - Lua file with the parser source code
    3131 #    TOLUA_PARSER_DEPENDENCIES - All the dependent lua files
    32  #    ORXONOX_RUNTIME_LIBRARY_DIRECTORY - Working directory
     32 #    RUNTIME_LIBRARY_DIRECTORY - Working directory
    3333 #
    3434
     
    7474    DEPENDS           ${TOLUA_PARSER_DEPENDENCIES}
    7575    IMPLICIT_DEPENDS  ${_implicit_dependencies}
    76     WORKING_DIRECTORY ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}
     76    WORKING_DIRECTORY ${RUNTIME_LIBRARY_DIRECTORY}
    7777    COMMENT "Generating tolua bind files for package ${_tolua_package}"
    7878  )
  • code/trunk/cmake/InstallConfig.cmake

    r5694 r5695  
    4343SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LIBRARY_PATH})
    4444SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_ARCHIVE_PATH})
     45SET(MODULE_INSTALL_DIRECTORY  ${CMAKE_INSTALL_PREFIX}/${DEFAULT_MODULE_PATH})
    4546SET(DOC_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DOC_PATH})
    4647SET(DATA_INSTALL_DIRECTORY    ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DATA_PATH})
     
    5455    SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/orxonox)
    5556    SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/orxonox/static)
     57    SET(MODULE_INSTALL_DIRECTORY  ${CMAKE_INSTALL_PREFIX}/lib/orxonox/modules)
    5658    SET(DOC_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/share/doc/orxonox)
    5759    SET(DATA_INSTALL_DIRECTORY    ${CMAKE_INSTALL_PREFIX}/share/orxonox)
     
    6769# When building, don't use the install RPATH already
    6870# (but later on when installing)
    69 SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) 
     71SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
    7072
    7173# The RPATH to be used when installing
  • code/trunk/cmake/LibraryConfig.cmake

    r3304 r5695  
    3131# Prevent CMake from finding libraries in the installation folder on Windows.
    3232# There might already be an installation from another compiler
    33 IF(DEPENDENCY_PACKAGE_ENABLE)
     33IF(WIN32)
    3434  LIST(REMOVE_ITEM CMAKE_SYSTEM_PREFIX_PATH  "${CMAKE_INSTALL_PREFIX}")
    3535  LIST(REMOVE_ITEM CMAKE_SYSTEM_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/bin")
     
    7272
    7373# User script
    74 SET(USER_SCRIPT_LIBRARY_CONFIG "" CACHE FILEPATH
     74SET(LIBRARY_CONFIG_USER_SCRIPT "" CACHE FILEPATH
    7575    "Specify a CMake script if you wish to write your own library path config.
    76      See LibraryConfigTardis.cmake or LibraryConfigMinGW.cmake for examples.")
    77 IF(USER_SCRIPT_LIBRARY_CONFIG)
    78   IF(EXISTS ${CMAKE_MODULE_PATH}/${USER_SCRIPT_LIBRARY_CONFIG}.cmake)
    79     INCLUDE(${USER_SCRIPT_LIBRARY_CONFIG})
    80   ELSEIF(EXISTS ${USER_SCRIPT_LIBRARY_CONFIG})
    81     INCLUDE(${USER_SCRIPT_LIBRARY_CONFIG})
    82   ELSEIF(EXISTS ${CMAKE_MODULE_PATH}/${USER_SCRIPT_LIBRARY_CONFIG})
    83     INCLUDE(${CMAKE_MODULE_PATH}/${USER_SCRIPT_LIBRARY_CONFIG})
    84   ENDIF()
    85 ENDIF(USER_SCRIPT_LIBRARY_CONFIG)
     76     See LibraryConfigTardis.cmake for an example.")
     77IF(LIBRARY_CONFIG_USER_SCRIPT)
     78  IF(EXISTS ${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT})
     79    INCLUDE(${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT})
     80  ENDIF()
     81ENDIF(LIBRARY_CONFIG_USER_SCRIPT)
    8682
    8783
     
    8985# Performs the search and sets the variables    #
    9086
    91 FIND_PACKAGE(OGRE  1.4 EXACT REQUIRED)
     87FIND_PACKAGE(OGRE  1.4       REQUIRED)
    9288FIND_PACKAGE(ENet  1.1       REQUIRED)
    9389FIND_PACKAGE(Ogg             REQUIRED)
     
    185181  ENDIF()
    186182ENDIF(WIN32)
     183
     184
     185################# OGRE Plugins ##################
     186
     187# More plugins: Plugin_BSPSceneManager, Plugin_OctreeSceneManager
     188SET(OGRE_PLUGINS_INT Plugin_ParticleFX)
     189IF(WIN32)
     190  # CG program manager is probably DirectX related (not available under unix)
     191  LIST(APPEND OGRE_PLUGINS_INT Plugin_CgProgramManager)
     192ENDIF(WIN32)
     193SET(OGRE_PLUGINS ${OGRE_PLUGINS_INT} CACHE STRING
     194   "Specify which OGRE plugins to load. Existance check is performed.")
     195
     196# Check the plugins and determine the plugin folder
     197# You can give a hint by setting the environment variable ENV{OGRE_PLUGIN_DIR}
     198INCLUDE(CheckOGREPlugins)
     199CHECK_OGRE_PLUGINS(${OGRE_PLUGINS})
     200
  • code/trunk/cmake/PackageConfig.cmake

    r3370 r5695  
    1 # General package configuration. Merely sets the include paths.
    2 # Library files are treated separately.
     1 #
     2 #             ORXONOX - the hottest 3D action shooter ever to exist
     3 #                             > www.orxonox.net <
     4 #
     5 #        This program is free software; you can redistribute it and/or
     6 #         modify it under the terms of the GNU General Public License
     7 #        as published by the Free Software Foundation; either version 2
     8 #            of the License, or (at your option) any later version.
     9 #
     10 #       This program is distributed in the hope that it will be useful,
     11 #        but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 #                 GNU General Public License for more details.
     14 #
     15 #   You should have received a copy of the GNU General Public License along
     16 #      with this program; if not, write to the Free Software Foundation,
     17 #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     18 #
     19 #
     20 #  Author:
     21 #    Reto Grieder
     22 #  Description:
     23 #    General package configuration. Merely sets the include paths.
     24 #    Library files are treated separately.
     25 #
    326
    427# Check package version info
     
    2851ENDIF()
    2952
    30 MESSAGE(STATUS "Using library package for the dependencies.")
     53IF(NOT _INTERNAL_PACKAGE_MESSAGE)
     54  MESSAGE(STATUS "Using library package for the dependencies.")
     55  SET(_INTERNAL_PACKAGE_MESSAGE 1 CACHE INTERNAL "Do not edit!" FORCE)
     56ENDIF()
    3157
    3258# Include paths and other special treatments
  • code/trunk/cmake/PackageConfigMSVC.cmake

    r3370 r5695  
    4747
    4848  # Also the directory with the runtime libraries
    49   SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${DEP_BINARY_DIR})
     49  SET(RUNTIME_LIBRARY_DIRECTORY ${DEP_BINARY_DIR})
    5050
    5151  # Sets the library path for the FIND_LIBRARY
  • code/trunk/cmake/PackageConfigMinGW.cmake

    r3196 r5695  
    4040
    4141  # Also the directory with the runtime libraries
    42   SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${DEP_BINARY_DIR})
     42  SET(RUNTIME_LIBRARY_DIRECTORY ${DEP_BINARY_DIR})
    4343
    4444  # Sets the library path for the FIND_LIBRARY
  • code/trunk/cmake/ParseMacroArguments.cmake

    r3196 r5695  
    3636
    3737MACRO(PARSE_MACRO_ARGUMENTS _switches _list_names)
     38
     39  # Using LIST(FIND ...) speeds up the process
     40  SET(_keywords ${_switches} ${_list_names})
     41
    3842  # Parse all the arguments and set the corresponding variable
    3943  # If the option is just a switch, set the variable to its name for later use
    4044  FOREACH(_arg ${ARGN})
    41     SET(_arg_found FALSE)
    4245
    43     # Switches
    44     FOREACH(_switch ${_switches})
    45       IF(${_switch} STREQUAL ${_arg})
    46         SET(_arg_${_switch} ${_switch})
    47         SET(_arg_found TRUE)
    48         # Avoid interpreting arguments after this one as options args for the previous one
    49         SET(_storage_var)
    50         BREAK()
    51       ENDIF()
    52     ENDFOREACH(_switch)
     46    # Is the argument a keyword?
     47    LIST(FIND _keywords ${_arg} _keyword_index)
     48    IF(NOT _keyword_index EQUAL -1)
    5349
    54     # Input options
    55     IF(NOT _arg_found)
    56       FOREACH(_list_name ${_list_names})
    57         IF(${_list_name} STREQUAL ${_arg})
    58           SET(_storage_var _arg_${_list_name})
    59           SET(_arg_found TRUE)
     50      # Another optimisation
     51      SET(_arg_found FALSE)
     52      # Switches
     53      FOREACH(_switch ${_switches})
     54        IF(${_switch} STREQUAL ${_arg})
     55          SET(_arg_${_switch} ${_switch})
     56          SET(_arg_found TRUE)
     57          # Avoid interpreting arguments after this one as options args for the previous one
     58          SET(_storage_var)
    6059          BREAK()
    6160        ENDIF()
    62       ENDFOREACH(_list_name)
    63     ENDIF(NOT _arg_found)
     61      ENDFOREACH(_switch)
    6462
    65     # Arguments of an input option (like source files for SOURCE_FILES)
    66     IF(NOT _arg_found)
     63      # Input options
     64      IF(NOT _arg_found)
     65        FOREACH(_list_name ${_list_names})
     66          IF(${_list_name} STREQUAL ${_arg})
     67            SET(_storage_var _arg_${_list_name})
     68            BREAK()
     69          ENDIF()
     70        ENDFOREACH(_list_name)
     71      ENDIF(NOT _arg_found)
     72
     73    ELSE()
     74
     75      # Arguments of an input option (like source files for SOURCE_FILES)
    6776      IF(_storage_var)
    6877        # Store in variable define above in the foreach loop
     
    7180        MESSAGE(FATAL_ERROR "ORXONOX_ADD_${_target_type} was given a non compliant argument: ${_arg}")
    7281      ENDIF(_storage_var)
    73     ENDIF(NOT _arg_found)
     82
     83    ENDIF()
    7484
    7585  ENDFOREACH(_arg)
  • code/trunk/cmake/TargetUtilities.cmake

    r5693 r5695  
    5858 #
    5959
     60INCLUDE(CMakeDependentOption)
    6061INCLUDE(CapitaliseName)
    6162INCLUDE(GenerateToluaBindings)
     
    118119
    119120  # First part (pre target) of precompiled header files
    120   IF(PCH_COMPILER_SUPPORT AND PCH_ENABLE AND _arg_PCH_FILE)
     121  IF(PCH_COMPILER_SUPPORT AND _arg_PCH_FILE)
    121122    # Provide convenient option to control PCH
    122123    STRING(TOUPPER "${_target_name}" _target_name_upper)
     
    126127      SET(PCH_DEFAULT TRUE)
    127128    ENDIF()
    128     OPTION(PCH_ENABLE_${_target_name_upper} "Enable using precompiled header files for library ${_target_name}." ${PCH_DEFAULT})
     129    CMAKE_DEPENDENT_OPTION(PCH_ENABLE_${_target_name_upper}
     130      "Enable using precompiled header files for library ${_target_name}." ${PCH_DEFAULT} PCH_ENABLE OFF)
    129131
    130132    IF(PCH_ENABLE_${_target_name_upper})
     
    203205    IF(_arg_MODULE)
    204206      INSTALL(TARGETS ${_target_name}
    205         RUNTIME DESTINATION ${ORXONOX_MODULE_INSTALL_PATH}
    206         LIBRARY DESTINATION ${ORXONOX_MODULE_INSTALL_PATH}
     207        RUNTIME DESTINATION ${MODULE_INSTALL_DIRECTORY}
     208        LIBRARY DESTINATION ${MODULE_INSTALL_DIRECTORY}
    207209      )
    208210    ELSE()
    209211      INSTALL(TARGETS ${_target_name}
    210         RUNTIME DESTINATION ${ORXONOX_RUNTIME_INSTALL_PATH}
    211         LIBRARY DESTINATION ${ORXONOX_LIBRARY_INSTALL_PATH}
     212        RUNTIME DESTINATION ${RUNTIME_INSTALL_DIRECTORY}
     213        LIBRARY DESTINATION ${LIBRARY_INSTALL_DIRECTORY}
    212214      )
    213215    ENDIF()
     
    217219
    218220
    219 # Creates a helper file with name <name_of_the_library>.module
     221# Creates a helper file with name <name_of_the_library>${ORXONOX_MODULE_EXTENSION}
    220222# This helps finding dynamically loadable modules at runtime
    221223
     
    235237      INSTALL(
    236238        FILES ${_module_filename}
    237         DESTINATION ${ORXONOX_MODULE_INSTALL_PATH}
     239        DESTINATION ${MODULE_INSTALL_DIRECTORY}
    238240        CONFIGURATIONS ${_config}
    239241      )
     
    246248    INSTALL(
    247249      FILES ${_module_filename}
    248       DESTINATION ${ORXONOX_MODULE_INSTALL_PATH}
     250      DESTINATION ${MODULE_INSTALL_DIRECTORY}
    249251    )
    250252  ENDIF()
Note: See TracChangeset for help on using the changeset viewer.