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.

43 lines
1.5 KiB

  1. cmake_minimum_required(VERSION 3.0.0)
  2. project(pystorm)
  3. find_package(storm REQUIRED)
  4. add_subdirectory(resources/pybind11)
  5. option(STORMPY_DISABLE_SIGNATURE_DOC "disables the signature in the documentation" ON)
  6. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/generated/config.h)
  7. message(STATUS "STORM-DIR: ${storm_DIR}")
  8. message(STATUS "STORM-INCLUDE-DIR: ${storm_INCLUDE_DIR}")
  9. function(stormpy_module NAME)
  10. # second, optional argument are ADDITIONAL_LIBRARIES
  11. # third, optional argument are ADDITIONAL_INCLUDES
  12. file(GLOB_RECURSE "STORM_${NAME}_SOURCES" "${CMAKE_CURRENT_SOURCE_DIR}/src/${NAME}/*.cpp")
  13. pybind11_add_module(${NAME} "${CMAKE_CURRENT_SOURCE_DIR}/src/mod_${NAME}.cpp" ${STORM_${NAME}_SOURCES})
  14. if(ARGC GREATER 1)
  15. # Additional libraries
  16. target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR} ${ARGV2} ${CMAKE_CURRENT_BINARY_DIR}/src/generated)
  17. target_link_libraries(${NAME} PRIVATE storm ${ARGV1})
  18. else()
  19. target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src/generated)
  20. target_link_libraries(${NAME} PRIVATE storm)
  21. endif()
  22. endfunction(stormpy_module)
  23. stormpy_module(core)
  24. stormpy_module(info)
  25. stormpy_module(logic)
  26. stormpy_module(storage)
  27. stormpy_module(utility)
  28. if(HAVE_STORM_PARS)
  29. stormpy_module(pars storm-pars "${storm-pars_INCLUDE_DIR}")
  30. endif()
  31. if(HAVE_STORM_DFT)
  32. stormpy_module(dft storm-dft "${storm-dft_INCLUDE_DIR}")
  33. endif()