summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt36
1 files changed, 8 insertions, 28 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b9fa01d..7ae801e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,32 +30,12 @@ find_package(PkgConfig REQUIRED)
find_package(Threads REQUIRED)
find_package(Doxygen)
-if(NOT DEFINED BIN_INSTALL_DIR)
- set(BIN_INSTALL_DIR "${CMAKE_INSTALL_FULL_BINDIR}")
-endif(NOT DEFINED BIN_INSTALL_DIR)
-
-if(NOT DEFINED LIB_INSTALL_DIR)
- set(LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
-endif(NOT DEFINED LIB_INSTALL_DIR)
-
-if(NOT DEFINED INCLUDE_INSTALL_DIR)
- set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
-endif(NOT DEFINED INCLUDE_INSTALL_DIR)
-
-if(NOT DEFINED DATA_INSTALL_DIR)
- set(DATA_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}")
-endif(NOT DEFINED DATA_INSTALL_DIR)
-
-if(NOT DEFINED LOCALE_INSTALL_DIR)
- set(LOCALE_INSTALL_DIR "${DATA_INSTALL_DIR}/${CMAKE_INSTALL_LOCALEDIR}")
-endif(NOT DEFINED LOCALE_INSTALL_DIR)
-
if (NOT DEFINED PCILIB_PLUGIN_DIR)
- set(PCILIB_PLUGIN_DIR "${LIB_INSTALL_DIR}/pcilib" CACHE PATH "Directory to install plugins")
+ set(PCILIB_PLUGIN_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/pcilib" CACHE PATH "Directory to install plugins")
endif (NOT DEFINED PCILIB_PLUGIN_DIR)
if (NOT DEFINED PCILIB_DATA_DIR)
- set(PCILIB_DATA_DIR "${DATA_INSTALL_DIR}/pcilib" CACHE PATH "Directory to install data files")
+ set(PCILIB_DATA_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/pcilib" CACHE PATH "Directory to install data files")
endif (NOT DEFINED PCILIB_DATA_DIR)
if (NOT DEFINED PCILIB_MODEL_DIR)
@@ -74,7 +54,7 @@ if (NOT DEFINED PCILIB_DEBUG_DIR)
set(PCILIB_DEBUG_DIR "." CACHE PATH "Directory to write debug information")
endif (NOT DEFINED PCILIB_DEBUG_DIR)
-SET(ENV{PKG_CONFIG_PATH} "${LIB_INSTALL_DIR}/pkgconfig:$ENV{PKG_CONFIG_PATH}")
+SET(ENV{PKG_CONFIG_PATH} "${CMAKE_INSTALL_LIBDIR}/pkgconfig:$ENV{PKG_CONFIG_PATH}")
if (NOT DISABLE_PYTHON)
set(PYTHON_VERSION 2.7 CACHE STRING "python version")
@@ -87,17 +67,17 @@ if (NOT DISABLE_PYTHON)
message (FATAL_ERROR "Version mismatch between python interpreter and libraries")
endif (NOT PYTHON_VERSION_STRING VERSION_EQUAL PYTHONLIBS_VERSION_STRING)
-# execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sysconfig import get_path; print get_path('platlib')" OUTPUT_VARIABLE PYTHON_INSTALL_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
+# execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "from sysconfig import get_path; print get_path('platlib')" OUTPUT_VARIABLE PCILIB_PYTHON_SITEDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
- if (NOT DEFINED PYTHON_INSTALL_DIR)
+ if (NOT DEFINED PCILIB_PYTHON_SITEDIR)
execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "import site; print (site.PREFIXES[-1])" OUTPUT_VARIABLE PYTHON_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
file (TO_CMAKE_PATH "${PYTHON_PREFIX}" PYTHON_PREFIX)
execute_process (COMMAND ${PYTHON_EXECUTABLE} -c "import site; print (site.getsitepackages()[0])" OUTPUT_VARIABLE PYTHON_SITE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
file (TO_CMAKE_PATH "${PYTHON_SITE_DIR}" PYTHON_SITE_DIR)
string (REGEX REPLACE "^${PYTHON_PREFIX}/" "${CMAKE_INSTALL_PREFIX}/" PYTHON_SITE_DIR "${PYTHON_SITE_DIR}")
- set(PYTHON_INSTALL_DIR ${PYTHON_SITE_DIR} CACHE PATH "path to install python module")
- endif (NOT DEFINED PYTHON_INSTALL_DIR)
+ set(PCILIB_PYTHON_SITEDIR ${PYTHON_SITE_DIR} CACHE PATH "path to install python module")
+ endif (NOT DEFINED PCILIB_PYTHON_SITEDIR)
set(HAVE_PYTHON TRUE)
endif (NOT DISABLE_PYTHON)
@@ -145,7 +125,7 @@ set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "docs/html")
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/misc/pcitool.pc
- DESTINATION ${LIB_INSTALL_DIR}/pkgconfig
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)
if (NOT DISABLE_SERVERS)