From ad84d784ee74d383f8e2bb3fc9af9ed38ced3df9 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Mon, 2 May 2011 08:13:36 +0000 Subject: [PATCH] make CMAKE_INSTALL_PREFIX available on Windows as well --- CMakeLists.txt | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f5e57803c..13d95dba5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,12 +20,10 @@ endif() # it _must_ go before PROJECT(OpenCV) in order to work -if (NOT CMAKE_INSTALL_PREFIX) - if(WIN32) - set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR} CACHE INTERNAL "" FORCE) - elseif() - set(CMAKE_INSTALL_PREFIX "/usr" CACHE INTERNAL "" FORCE) - endif() +if(WIN32) + set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory") +else() + set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory") endif() set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") @@ -59,10 +57,6 @@ if(MSVC) set(CMAKE_USE_RELATIVE_PATHS ON CACHE INTERNAL "" FORCE) endif() -#set(CMAKE_C_COMPILER "/opt/BullseyeCoverage/bin/gcc") -#set(CMAKE_CXX_COMPILER "/opt/BullseyeCoverage/bin/g++") -#set(CMAKE_CXX_COMPILER_INIT "/opt/BullseyeCoverage/bin/gcc") - # -------------------------------------------------------------- # Indicate CMake 2.7 and above that we don't want to mix relative