From 868f661be7a29ed44490eec81ab772bbc0264357 Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Wed, 19 Apr 2017 16:54:51 -0400 Subject: [PATCH] use /usr/local as the default CMAKE_INSTALL_PREFIX, #138 --- source/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index ac08bea5..6511f324 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -76,8 +76,14 @@ set(XLNT_SOURCES ${CELL_SOURCES} ${CHARTS_SOURCES} ${CHARTSHEET_SOURCES} ${WORKSHEET_SOURCES} ${DETAIL_SOURCES} ${DETAIL_CRYPTO_SOURCES}) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/installed" - CACHE PATH "default install path" FORCE) + if(MSVC) + set(DEFAULT_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/installed") + else() + set(DEFAULT_INSTALL_PREFIX "/usr/local") + endif() + + set(CMAKE_INSTALL_PREFIX ${DEFAULT_INSTALL_PREFIX} + CACHE PATH "default install path" FORCE) endif() if(NOT INC_DEST_DIR)