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.

79 lines
2.0 KiB

  1. set(SOURCES
  2. lace.c
  3. sha2.c
  4. sylvan_bdd.c
  5. sylvan_cache.c
  6. sylvan_common.c
  7. sylvan_gmp.c
  8. sylvan_ldd.c
  9. sylvan_mt.c
  10. sylvan_mtbdd.c
  11. sylvan_obj.cpp
  12. sylvan_refs.c
  13. sylvan_sl.c
  14. sylvan_stats.c
  15. sylvan_table.c
  16. storm_wrapper.cpp
  17. sylvan_storm_rational_function.c
  18. sylvan_storm_rational_number.c
  19. )
  20. set(HEADERS
  21. lace.h
  22. sylvan.h
  23. sylvan_bdd.h
  24. sylvan_cache.h
  25. sylvan_config.h
  26. sylvan_common.h
  27. sylvan_gmp.h
  28. sylvan_int.h
  29. sylvan_ldd.h
  30. sylvan_ldd_int.h
  31. sylvan_mt.h
  32. sylvan_mtbdd.h
  33. sylvan_mtbdd_int.h
  34. sylvan_obj.hpp
  35. sylvan_stats.h
  36. sylvan_table.h
  37. sylvan_tls.h
  38. storm_wrapper.h
  39. sylvan_bdd_storm.h
  40. sylvan_mtbdd_storm.h
  41. sylvan_storm_rational_function.h
  42. sylvan_storm_rational_number.h
  43. )
  44. option(BUILD_SHARED_LIBS "Enable/disable creation of shared libraries" ON)
  45. option(BUILD_STATIC_LIBS "Enable/disable creation of static libraries" ON)
  46. add_library(sylvan ${SOURCES})
  47. find_package(GMP REQUIRED)
  48. include_directories(sylvan ${GMP_INCLUDE_DIR})
  49. target_link_libraries(sylvan m pthread ${GMP_LIBRARIES})
  50. if(UNIX AND NOT APPLE)
  51. target_link_libraries(sylvan rt)
  52. endif()
  53. option(SYLVAN_STATS "Collect statistics" OFF)
  54. if(SYLVAN_STATS)
  55. set_target_properties(sylvan PROPERTIES COMPILE_DEFINITIONS "SYLVAN_STATS")
  56. endif()
  57. install(TARGETS sylvan DESTINATION "${CMAKE_INSTALL_LIBDIR}")
  58. install(FILES ${HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
  59. # MODIFICATIONS NEEDED MADE FOR STORM
  60. # We need to make sure that the binary is put into a folder that is independent of the
  61. # build type. Otherwise -- for example when using Xcode -- the binary might end up in a
  62. # sub-folder "Debug" or "Release".
  63. set_target_properties(sylvan PROPERTIES
  64. ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_BINARY_DIR}
  65. ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_BINARY_DIR})
  66. if(USE_CARL)
  67. message(STATUS "Sylvan - linking CArL.")
  68. target_link_libraries(sylvan ${carl_LIBRARIES})
  69. endif(USE_CARL)