From a56ca661e8d2d2052b68eb1af30b3deb3bebd5af Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 8 Mar 2021 14:25:28 +0100 Subject: [PATCH] BUILD_PACKAGE option --- cmake/CMakeLists.txt | 1 + src/ifcwrap/CMakeLists.txt | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 788ffd8a5a..989408fc60 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -38,6 +38,7 @@ OPTION(COLLADA_SUPPORT "Build IfcConvert with COLLADA support (requires OpenCOLL OPTION(IFCXML_SUPPORT "Build IfcParse with ifcXML support (requires libxml2)." ON) OPTION(ENABLE_BUILD_OPTIMIZATIONS "Enable certain compiler and linker optimizations on RelWithDebInfo and Release builds." OFF) OPTION(IFCCONVERT_DOUBLE_PRECISION "IfcConvert: Use double precision floating-point numbers." ON) +OPTION(BUILD_PACKAGE "" OFF) OPTION(BUILD_IFCGEOM "Build IfcGeom." ON) OPTION(BUILD_DOCUMENTATION "Build IfcOpenShell Documentation." OFF) OPTION(BUILD_IFCPYTHON "Build IfcPython." ON) diff --git a/src/ifcwrap/CMakeLists.txt b/src/ifcwrap/CMakeLists.txt index 32ceaf1a8a..9e722cff9b 100644 --- a/src/ifcwrap/CMakeLists.txt +++ b/src/ifcwrap/CMakeLists.txt @@ -79,9 +79,11 @@ IF(PYTHONINTERP_FOUND AND NOT "${PYTHON_EXECUTABLE}" STREQUAL "") OUTPUT_VARIABLE python_package_dir ) ENDIF() - set(python_package_dir ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}/dist-packages/) + if (BUILD_PACKAGE) + set(python_package_dir ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}/dist-packages/) + endif() IF("${python_package_dir}" STREQUAL "") - MESSAGE(WARNING "Unable to locate Python site-package directory, unals /ble to install the Python wrapper") + MESSAGE(WARNING "Unable to locate Python site-package directory, unable to install the Python wrapper") ELSE() FILE(GLOB_RECURSE sourcefiles "${CMAKE_CURRENT_SOURCE_DIR}/../ifcopenshell-python/ifcopenshell/*"