You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2 KiB

  1. find_package(PythonInterp REQUIRED)
  2. find_package(PythonLibs REQUIRED)
  3. set(STORMPY_OUTPUT_DIR "${PROJECT_BINARY_DIR}/stormpy")
  4. set(STORMPY_SOURCE_DIR "${PROJECT_SOURCE_DIR}/stormpy")
  5. if(STORM_HAVE_CLN)
  6. set(STORMPY_USE_CLN 1)
  7. else()
  8. set(STORMPY_USE_CLN 0)
  9. endif()
  10. # Set configuration file
  11. get_directory_property(STORMPY_INCLUDE_DIRS_PROP INCLUDE_DIRECTORIES)
  12. foreach(arg ${STORMPY_INCLUDE_DIRS_PROP})
  13. set(STORMPY_INCLUDE_DIRS "${STORMPY_INCLUDE_DIRS}${sep}${arg}")
  14. set(sep ":")
  15. endforeach()
  16. set(STORMPY_COMPILE_ARGS ${CMAKE_CXX_FLAGS})
  17. set(STORMPY_LIBRARY_DIRS "${PROJECT_BINARY_DIR}/src/storm")
  18. set(STORMPY_RPATH "${PROJECT_BINARY_DIR}/src/storm")
  19. configure_file (
  20. "${PROJECT_SOURCE_DIR}/stormpy/setup.cfg.in"
  21. "${PROJECT_SOURCE_DIR}/stormpy/setup.cfg"
  22. )
  23. # Add targets
  24. add_custom_target(PythonBindingsBuild
  25. COMMAND ${PYTHON_EXECUTABLE} setup.py build
  26. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  27. DEPENDS storm
  28. )
  29. add_custom_target(PythonBindingsDevelop
  30. COMMAND ${PYTHON_EXECUTABLE} setup.py develop
  31. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  32. DEPENDS storm
  33. )
  34. add_custom_target(PythonBindingsInstall
  35. COMMAND ${PYTHON_EXECUTABLE} setup.py install --user
  36. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  37. DEPENDS storm
  38. )