[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/02: cmake: proposed fix for issue #791.
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/02: cmake: proposed fix for issue #791. |
Date: |
Wed, 17 Jun 2015 23:32:13 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit cb191889f691d27c0e3cf4a04ecc1c2ad3ea1c27
Author: Tom Rondeau <address@hidden>
Date: Wed Jun 17 17:43:44 2015 -0400
cmake: proposed fix for issue #791.
Allows the installation directories to be overridden on the
commandline for specific tweaking of installations.
---
CMakeLists.txt | 35 ++++++++++++++++++-----------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d355b7e..7cc9a3b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -143,29 +143,30 @@ string(REPLACE "\n" " \\n" COMPILER_INFO ${COMPILER_INFO})
# Install directories
########################################################################
include(GrPlatform) #define LIB_SUFFIX
-set(GR_RUNTIME_DIR bin)
-set(GR_LIBRARY_DIR lib${LIB_SUFFIX})
-set(GR_INCLUDE_DIR include)
-set(GR_DATA_DIR share)
-set(GR_PKG_DATA_DIR ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME})
-set(GR_DOC_DIR ${GR_DATA_DIR}/doc)
-set(GR_PKG_DOC_DIR ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME}-${DOCVER})
-set(GR_CONF_DIR etc)
-set(GR_PKG_CONF_DIR ${GR_CONF_DIR}/${CMAKE_PROJECT_NAME}/conf.d)
-set(GR_LIBEXEC_DIR libexec)
-set(GR_PKG_LIBEXEC_DIR ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME})
-set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks)
-set(GR_THEMES_DIR ${GR_PKG_DATA_DIR}/themes)
-
+set(GR_RUNTIME_DIR bin CACHE PATH "Path to install all binaries")
+set(GR_LIBRARY_DIR lib${LIB_SUFFIX} CACHE PATH "Path to install libraries")
+set(GR_INCLUDE_DIR include CACHE PATH "Path to install header files")
+set(GR_DATA_DIR share CACHE PATH "Base location for data")
+set(GR_PKG_DATA_DIR ${GR_DATA_DIR}/${CMAKE_PROJECT_NAME} CACHE PATH "Path
to install package data")
+set(GR_DOC_DIR ${GR_DATA_DIR}/doc CACHE PATH "Path to install
documentation")
+set(GR_PKG_DOC_DIR ${GR_DOC_DIR}/${CMAKE_PROJECT_NAME}-${DOCVER} CACHE
PATH "Path to install package docs")
+set(GR_LIBEXEC_DIR libexec CACHE PATH "Path to install libexec files")
+set(GR_PKG_LIBEXEC_DIR ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME} CACHE PATH
"Path to install package libexec files")
+set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks CACHE PATH "Path to
install GRC blocks")
+set(GR_THEMES_DIR ${GR_PKG_DATA_DIR}/themes CACHE PATH "Path to install
QTGUI themes")
+
+# Set location of config/prefs files in /etc
# Special exception if prefix is /usr so we don't make a /usr/etc.
+set(GR_CONF_DIR etc CACHE PATH "Path to install config files")
string(COMPARE EQUAL ${CMAKE_INSTALL_PREFIX} "/usr" isusr)
if(isusr)
- set(SYSCONFDIR "/${GR_CONF_DIR}" CACHE PATH "System configuration
directory")
+ set(SYSCONFDIR "/${GR_CONF_DIR}" CACHE PATH "System configuration directory")
else(isusr)
- set(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/${GR_CONF_DIR}" CACHE PATH
"System configuration directory" FORCE)
+ set(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/${GR_CONF_DIR}" CACHE PATH "System
configuration directory" FORCE)
endif(isusr)
-set(GR_PREFSDIR ${SYSCONFDIR}/${CMAKE_PROJECT_NAME}/conf.d)
+set(GR_PKG_CONF_DIR ${SYSCONFDIR}/${CMAKE_PROJECT_NAME}/conf.d CACHE PATH
"Path to install package configs")
+set(GR_PREFSDIR ${SYSCONFDIR}/${CMAKE_PROJECT_NAME}/conf.d CACHE PATH
"Path to install preference files")
OPTION(ENABLE_PERFORMANCE_COUNTERS "Enable block performance counters" ON)
if(ENABLE_PERFORMANCE_COUNTERS)