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.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. function(stormpy_module NAME)
  9. # second, optional argument are ADDITIONAL_LIBRARIES
  10. # third, optional argument are ADDITIONAL_INCLUDES
  11. file(GLOB_RECURSE "STORM_${NAME}_SOURCES" "${CMAKE_CURRENT_SOURCE_DIR}/src/${NAME}/*.cpp")
  12. pybind11_add_module(${NAME} "${CMAKE_CURRENT_SOURCE_DIR}/src/mod_${NAME}.cpp" ${STORM_${NAME}_SOURCES})
  13. if(ARGC GREATER 1)
  14. # Additional libraries
  15. target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR} ${ARGV2} ${CMAKE_CURRENT_BINARY_DIR}/src/generated)
  16. target_link_libraries(${NAME} PRIVATE storm ${ARGV1})
  17. else()
  18. target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src/generated)
  19. target_link_libraries(${NAME} PRIVATE storm)
  20. endif()
  21. endfunction(stormpy_module)
  22. stormpy_module(core)
  23. stormpy_module(info)
  24. stormpy_module(logic)
  25. stormpy_module(storage)
  26. stormpy_module(utility)
  27. if(HAVE_STORM_PARS)
  28. stormpy_module(pars storm-pars "${storm-pars_INCLUDE_DIR}")
  29. endif()
  30. if(HAVE_STORM_DFT)
  31. stormpy_module(dft storm-dft "${storm-dft_INCLUDE_DIR}")
  32. endif()