From 2e0fc73d027d856f04b3fc46d023ec5e67effb39 Mon Sep 17 00:00:00 2001 From: Christophe Prud'homme Date: Tue, 9 Feb 2021 12:55:30 +0000 Subject: [PATCH] fix python package dir @aothms the selection of the directory needs to fixed but the current choice is reasonnable --- src/ifcwrap/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ifcwrap/CMakeLists.txt b/src/ifcwrap/CMakeLists.txt index b187c619be..d386bfd8c1 100644 --- a/src/ifcwrap/CMakeLists.txt +++ b/src/ifcwrap/CMakeLists.txt @@ -21,7 +21,7 @@ FIND_PACKAGE(SWIG) IF(NOT SWIG_FOUND) MESSAGE(FATAL_ERROR "BUILD_IFCPYTHON enabled, but unable to find SWIG. Disable BUILD_IFCPYTHON or fix SWIG paths to proceed.") ENDIF() - +include(GNUInstallDirs) INCLUDE(${SWIG_USE_FILE}) IF(NOT "$ENV{PYTHON_INCLUDE_DIR}" STREQUAL "") @@ -79,10 +79,9 @@ IF(PYTHONINTERP_FOUND AND NOT "${PYTHON_EXECUTABLE}" STREQUAL "") OUTPUT_VARIABLE python_package_dir ) ENDIF() - set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/install/lib ) set(python_package_dir ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/) IF("${python_package_dir}" STREQUAL "") - MESSAGE(WARNING "Unable to locate Python site-package directory, unable to install the Python wrapper") + MESSAGE(WARNING "Unable to locate Python site-package directory, unals /ble to install the Python wrapper") ELSE() FILE(GLOB_RECURSE sourcefiles "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/*"