|
|
a712cc0 |
From 7411b098b07d03bfcc734195e177239f2cf8f7ad Mon Sep 17 00:00:00 2001
|
|
|
a712cc0 |
From: Sandro Mani <manisandro@gmail.com>
|
|
|
a712cc0 |
Date: Tue, 2 May 2017 11:02:22 +0200
|
|
|
a712cc0 |
Subject: [PATCH 5/8] Make bin, lib and pysitearch dirs configurable
|
|
|
a712cc0 |
|
|
|
a712cc0 |
---
|
|
|
a712cc0 |
CMakeLists.txt | 7 +++++--
|
|
|
a712cc0 |
cmake/SuperBuild.cmake | 5 +++--
|
|
|
a712cc0 |
2 files changed, 8 insertions(+), 4 deletions(-)
|
|
|
a712cc0 |
|
|
|
a712cc0 |
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
a712cc0 |
index 04163ea..ff4473a 100644
|
|
|
a712cc0 |
--- a/CMakeLists.txt
|
|
|
a712cc0 |
+++ b/CMakeLists.txt
|
|
|
a712cc0 |
@@ -97,12 +97,15 @@ include_directories ("${PROJECT_BINARY_DIR}")
|
|
|
a712cc0 |
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
a712cc0 |
|
|
|
a712cc0 |
set(INCDIR include CACHE PATH "install directory for header files")
|
|
|
a712cc0 |
+set(BINDIR bin CACHE PATH "install directory for binary files")
|
|
|
a712cc0 |
+set(LIBDIR lib${LIB_SUFFIX} CACHE PATH "install directory for libraries")
|
|
|
a712cc0 |
+
|
|
|
a712cc0 |
if(APPLE)
|
|
|
a712cc0 |
set(ng_install_dir_bin ../MacOS)
|
|
|
a712cc0 |
set(ng_install_dir_lib ../MacOS)
|
|
|
a712cc0 |
else(APPLE)
|
|
|
a712cc0 |
- set(ng_install_dir_bin bin)
|
|
|
a712cc0 |
- set(ng_install_dir_lib lib)
|
|
|
a712cc0 |
+ set(ng_install_dir_bin ${BINDIR})
|
|
|
a712cc0 |
+ set(ng_install_dir_lib ${LIBDIR})
|
|
|
a712cc0 |
endif(APPLE)
|
|
|
a712cc0 |
set(ng_install_dir EXPORT netgen-targets RUNTIME DESTINATION ${ng_install_dir_bin} COMPONENT netgen LIBRARY DESTINATION ${ng_install_dir_lib} COMPONENT netgen_devel ARCHIVE DESTINATION ${ng_install_dir_lib} COMPONENT netgen_devel)
|
|
|
a712cc0 |
install(EXPORT netgen-targets DESTINATION share/cmake)
|
|
|
a712cc0 |
diff --git a/cmake/SuperBuild.cmake b/cmake/SuperBuild.cmake
|
|
|
a712cc0 |
index b802b6f..d61c4d5 100644
|
|
|
a712cc0 |
--- a/cmake/SuperBuild.cmake
|
|
|
a712cc0 |
+++ b/cmake/SuperBuild.cmake
|
|
|
a712cc0 |
@@ -79,8 +79,9 @@ if (USE_PYTHON)
|
|
|
a712cc0 |
find_package(PythonInterp 3 REQUIRED)
|
|
|
a712cc0 |
find_package(PythonLibs 3 REQUIRED)
|
|
|
a712cc0 |
|
|
|
a712cc0 |
- execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1,0,''))" OUTPUT_VARIABLE PYTHON_PACKAGES_INSTALL_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
a712cc0 |
- file(TO_CMAKE_PATH ${PYTHON_PACKAGES_INSTALL_DIR} PYTHON_PACKAGES_INSTALL_DIR)
|
|
|
a712cc0 |
+ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1,0,''))" OUTPUT_VARIABLE DEFAULT_PYTHON_PACKAGES_INSTALL_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
a712cc0 |
+ file(TO_CMAKE_PATH ${DEFAULT_PYTHON_PACKAGES_INSTALL_DIR} DEFAULT_PYTHON_PACKAGES_INSTALL_DIR)
|
|
|
a712cc0 |
+ SET(PYTHON_PACKAGES_INSTALL_DIR ${DEFAULT_PYTHON_PACKAGES_INSTALL_DIR} CACHE PATH "installation directory for python modules")
|
|
|
a712cc0 |
set_vars(NETGEN_CMAKE_ARGS PYTHON_PACKAGES_INSTALL_DIR PYTHON_INCLUDE_DIRS PYTHON_LIBRARIES PYTHON_EXECUTABLE PYTHON_VERSION PYBIND_INCLUDE_DIR)
|
|
|
a712cc0 |
endif (USE_PYTHON)
|
|
|
a712cc0 |
|
|
|
a712cc0 |
--
|
|
|
a712cc0 |
2.12.2
|
|
|
a712cc0 |
|