make CMAKE_INSTALL_PREFIX available on Windows as well

This commit is contained in:
Vadim Pisarevsky 2011-05-02 08:13:36 +00:00
parent b9662e099c
commit ad84d784ee

View File

@ -20,12 +20,10 @@ endif()
# it _must_ go before PROJECT(OpenCV) in order to work # it _must_ go before PROJECT(OpenCV) in order to work
if (NOT CMAKE_INSTALL_PREFIX) if(WIN32)
if(WIN32) set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory")
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR} CACHE INTERNAL "" FORCE) else()
elseif() set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory")
set(CMAKE_INSTALL_PREFIX "/usr" CACHE INTERNAL "" FORCE)
endif()
endif() endif()
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
@ -59,10 +57,6 @@ if(MSVC)
set(CMAKE_USE_RELATIVE_PATHS ON CACHE INTERNAL "" FORCE) set(CMAKE_USE_RELATIVE_PATHS ON CACHE INTERNAL "" FORCE)
endif() 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 # Indicate CMake 2.7 and above that we don't want to mix relative