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.

32 lines
984 B

  1. cmake_minimum_required(VERSION 3.0.0)
  2. project(pystorm)
  3. find_package(storm REQUIRED)
  4. add_subdirectory(resources/pybind11)
  5. set(STORMPY_LIB_DIR "${CMAKE_SOURCE_DIR}/lib/stormpy")
  6. function(stormpy_module NAME)
  7. # second, optional argument is LIBRARY_OUTPUT_DIRECTORY,
  8. # defaults to subdir with module name
  9. if(ARGC GREATER 1)
  10. set(LIB_PATH "${ARGV1}")
  11. else()
  12. set(LIB_PATH "${STORMPY_LIB_DIR}/${NAME}")
  13. endif()
  14. file(GLOB_RECURSE "STORM_${NAME}_SOURCES" "${CMAKE_CURRENT_SOURCE_DIR}/src/${NAME}/*.cpp")
  15. pybind11_add_module(${NAME} "${CMAKE_CURRENT_SOURCE_DIR}/src/mod_${NAME}.cpp" ${STORM_${NAME}_SOURCES})
  16. target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR})
  17. target_link_libraries(${NAME} PRIVATE storm)
  18. endfunction(stormpy_module)
  19. stormpy_module(core "${STORMPY_LIB_DIR}")
  20. stormpy_module(info)
  21. stormpy_module(expressions)
  22. stormpy_module(logic)
  23. stormpy_module(storage)
  24. stormpy_module(utility)