From 0bd209f185900f7eb1a7e592048383f8fbc37b4e Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Sun, 16 Oct 2022 23:46:00 +0200 Subject: [PATCH] make Python module configurable --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23d40c4..0e7477e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ option(MAN_PAGES "Create manual pages" OFF) option(SOCKET_INTERFACE "Build socket interface" ON) option(TESTS "Build tests" OFF) option(PIG2VCD "Build VCD format converter" OFF) +option(PYTHON_MODULE "Build Python module" OFF) add_compile_options(-Wall) @@ -151,7 +152,7 @@ endif() # Install python modules. find_package(Python COMPONENTS Interpreter QUIET) -if(Python_FOUND) +if(Python_FOUND AND PYTHON_MODULE AND SOCKET_INTERFACE) install(CODE "execute_process(COMMAND ${Python_EXECUTABLE} ${CMAKE_SOURCE_DIR}/setup.py install --prefix=${CMAKE_INSTALL_PREFIX})") endif()