make Python module configurable

This commit is contained in:
Christian Rauch 2022-10-16 23:46:00 +02:00
parent 3ca60ca5a2
commit 0bd209f185
1 changed files with 2 additions and 1 deletions

View File

@ -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()