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.

36 lines
1.2 KiB

  1. cmake_minimum_required(VERSION 3.0.0)
  2. project(pystorm)
  3. option(STORMPY_DISABLE_SIGNATURE_DOC "disables the signature in the documentation" ON)
  4. find_package(storm REQUIRED)
  5. add_subdirectory(resources/pybind11)
  6. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/generated/config.h)
  7. set(STORMPY_LIB_DIR "${CMAKE_SOURCE_DIR}/lib/stormpy")
  8. function(stormpy_module NAME)
  9. # second, optional argument is LIBRARY_OUTPUT_DIRECTORY,
  10. # defaults to subdir with module name
  11. if(ARGC GREATER 1)
  12. set(LIB_PATH "${ARGV1}")
  13. else()
  14. set(LIB_PATH "${STORMPY_LIB_DIR}/${NAME}")
  15. endif()
  16. file(GLOB_RECURSE "STORM_${NAME}_SOURCES" "${CMAKE_CURRENT_SOURCE_DIR}/src/${NAME}/*.cpp")
  17. pybind11_add_module(${NAME} "${CMAKE_CURRENT_SOURCE_DIR}/src/mod_${NAME}.cpp" ${STORM_${NAME}_SOURCES})
  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. endfunction(stormpy_module)
  21. stormpy_module(core "${STORMPY_LIB_DIR}")
  22. stormpy_module(info)
  23. stormpy_module(expressions)
  24. stormpy_module(logic)
  25. stormpy_module(storage)
  26. stormpy_module(utility)