[Orxonox-commit 944] r5667 - code/branches/resource2/cmake
rgrieder at orxonox.net
rgrieder at orxonox.net
Sat Aug 22 22:51:22 CEST 2009
Author: rgrieder
Date: 2009-08-22 22:51:21 +0200 (Sat, 22 Aug 2009)
New Revision: 5667
Modified:
code/branches/resource2/cmake/InstallConfig.cmake
code/branches/resource2/cmake/PackageConfig.cmake
code/branches/resource2/cmake/TargetUtilities.cmake
Log:
- New option for developers: Define ORXONOX_DEV as environment variable and the install command will make a copyable installation to ${CMAKE_BINARY_DIR}/install.
- Removed reoccurring "Using package for library..." message (displayed only once now)
- Using CMAKE_DEPENDENT_OPTION for the PCH_ENABLE_${target} options
Modified: code/branches/resource2/cmake/InstallConfig.cmake
===================================================================
--- code/branches/resource2/cmake/InstallConfig.cmake 2009-08-21 12:17:09 UTC (rev 5666)
+++ code/branches/resource2/cmake/InstallConfig.cmake 2009-08-22 20:51:21 UTC (rev 5667)
@@ -23,8 +23,16 @@
# Configures the installation (paths, rpaths, options)
#
+IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) # Variable provided by CMake
+ IF("$ENV{ORXONOX_DEV}" OR TARDIS)
+ SET(_install_prefix_changed 1)
+ SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH
+ "Install path prefix, prepended onto install directories." FORCE)
+ ENDIF()
+ENDIF()
+
SET(_info_text "Puts all installed files in subfolders of the install prefix path. That root folder can then be moved, copied and renamed as you wish. The executable will not write to folders like ~/.orxonox or \"Applictation Data\"")
-IF(UNIX)
+IF(UNIX AND NOT _install_prefix_changed)
OPTION(INSTALL_COPYABLE "${_info_text}" FALSE)
ELSE()
OPTION(INSTALL_COPYABLE "${_info_text}" TRUE)
Modified: code/branches/resource2/cmake/PackageConfig.cmake
===================================================================
--- code/branches/resource2/cmake/PackageConfig.cmake 2009-08-21 12:17:09 UTC (rev 5666)
+++ code/branches/resource2/cmake/PackageConfig.cmake 2009-08-22 20:51:21 UTC (rev 5667)
@@ -50,7 +50,10 @@
"You can get a new version from www.orxonox.net")
ENDIF()
-MESSAGE(STATUS "Using library package for the dependencies.")
+IF(NOT _INTERNAL_PACKAGE_MESSAGE)
+ MESSAGE(STATUS "Using library package for the dependencies.")
+ SET(_INTERNAL_PACKAGE_MESSAGE 1 CACHE INTERNAL "Do not edit!" FORCE)
+ENDIF()
# Include paths and other special treatments
SET(ENV{ALUTDIR} ${DEP_INCLUDE_DIR}/freealut)
Modified: code/branches/resource2/cmake/TargetUtilities.cmake
===================================================================
--- code/branches/resource2/cmake/TargetUtilities.cmake 2009-08-21 12:17:09 UTC (rev 5666)
+++ code/branches/resource2/cmake/TargetUtilities.cmake 2009-08-22 20:51:21 UTC (rev 5667)
@@ -51,6 +51,7 @@
# _target_name, ARGN for the macro arguments
#
+INCLUDE(CMakeDependentOption)
INCLUDE(CapitaliseName)
INCLUDE(GenerateToluaBindings)
INCLUDE(ParseMacroArguments)
@@ -111,7 +112,7 @@
ENDIF()
# First part (pre target) of precompiled header files
- IF(PCH_COMPILER_SUPPORT AND PCH_ENABLE AND _arg_PCH_FILE)
+ IF(PCH_COMPILER_SUPPORT AND _arg_PCH_FILE)
# Provide convenient option to control PCH
STRING(TOUPPER "${_target_name}" _target_name_upper)
IF(_arg_PCH_NO_DEFAULT)
@@ -119,7 +120,8 @@
ELSE()
SET(PCH_DEFAULT TRUE)
ENDIF()
- OPTION(PCH_ENABLE_${_target_name_upper} "Enable using precompiled header files for library ${_target_name}." ${PCH_DEFAULT})
+ CMAKE_DEPENDENT_OPTION(PCH_ENABLE_${_target_name_upper}
+ "Enable using precompiled header files for library ${_target_name}." ${PCH_DEFAULT} PCH_ENABLE OFF)
IF(PCH_ENABLE_${_target_name_upper})
PRECOMPILED_HEADER_FILES_PRE_TARGET(${_target_name} ${_arg_PCH_FILE} _${_target_name}_files EXCLUDE ${_arg_PCH_EXCLUDE})
More information about the Orxonox-commit
mailing list