From 82f290482e3e230c62c17c57e272c953315914b1 Mon Sep 17 00:00:00 2001 From: maier Date: Thu, 31 Jan 2013 13:01:37 +0000 Subject: [PATCH] In case of an in-source build set CMAKE_INSTALL_PREFIX to CMAKE_SOURCE_DIR if the variable is unset git-svn-id: https://svn.dealii.org/branches/branch_cmake@28200 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/configure/configure_boost.cmake | 2 +- deal.II/cmake/setup_cached_variables.cmake | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/deal.II/cmake/configure/configure_boost.cmake b/deal.II/cmake/configure/configure_boost.cmake index 1408b5f47e..c26b03a093 100644 --- a/deal.II/cmake/configure/configure_boost.cmake +++ b/deal.II/cmake/configure/configure_boost.cmake @@ -1,6 +1,6 @@ ##### ## -## Copyright (C) 2012 by the deal.II authors +## Copyright (C) 2012, 2013 by the deal.II authors ## ## This file is part of the deal.II library. ## diff --git a/deal.II/cmake/setup_cached_variables.cmake b/deal.II/cmake/setup_cached_variables.cmake index b59235e883..30bb6c7245 100644 --- a/deal.II/cmake/setup_cached_variables.cmake +++ b/deal.II/cmake/setup_cached_variables.cmake @@ -1,6 +1,6 @@ ##### ## -## Copyright (C) 2012 by the deal.II authors +## Copyright (C) 2012, 2013 by the deal.II authors ## ## This file is part of the deal.II library. ## @@ -94,6 +94,13 @@ OPTION(DEAL_II_FORCE_AUTODETECTION OFF ) +IF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") + SET(CMAKE_INSTALL_PREFIX + "${CMAKE_BINARY_DIR}" + CACHE STRING + "Install path prefix, prepended onto install directories." + ) +ENDIF() ########################################################################### # # -- 2.39.5