summaryrefslogtreecommitdiff
path: root/src/api/python/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/python/CMakeLists.txt')
-rw-r--r--src/api/python/CMakeLists.txt12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/api/python/CMakeLists.txt b/src/api/python/CMakeLists.txt
index 227872aa7..c6686e32b 100644
--- a/src/api/python/CMakeLists.txt
+++ b/src/api/python/CMakeLists.txt
@@ -73,26 +73,20 @@ set_target_properties(pycvc5
COMPILE_FLAGS
"-Wno-error -Wno-shadow -Wno-implicit-fallthrough"
CXX_VISIBILITY_PRESET default
- VISIBILITY_INLINES_HIDDEN 0)
+ VISIBILITY_INLINES_HIDDEN 0
+ LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/pycvc5")
python_extension_module(pycvc5)
# Installation based on https://bloerg.net/2012/11/10/cmake-and-distutils.html
# Create a wrapper python directory and generate a distutils setup.py file
configure_file(setup.py.in setup.py)
-set(PYCVC5_MODULE "${CMAKE_CURRENT_BINARY_DIR}/pycvc5")
-file(MAKE_DIRECTORY "${PYCVC5_MODULE}")
-file(WRITE ${PYCVC5_MODULE}/__init__.py
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/pycvc5/__init__.py
"import sys
from .pycvc5 import *
# fake a submodule for dotted imports, e.g. from pycvc5.kinds import *
sys.modules['%s.%s'%(__name__, kinds.__name__)] = kinds")
-set(PYCVC5_LOC "${PYCVC5_MODULE}/$<TARGET_FILE_NAME:pycvc5>")
-add_custom_command(TARGET pycvc5 POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E rename $<TARGET_FILE:pycvc5> ${PYCVC5_LOC}
-)
-
# figure out if we're in a virtualenv
execute_process(OUTPUT_VARIABLE IN_VIRTUALENV
COMMAND
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback