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.

102 lines
4.3 KiB

  1. add_custom_target(resources)
  2. add_custom_target(test-resources)
  3. if(STORM_SUPPORT_XML_INPUT_FORMATS)
  4. ExternalProject_Add(
  5. xercesc
  6. SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2
  7. CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2 --libdir=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2/lib CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-O3 CXXFLAGS=-O3
  8. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2
  9. BUILD_COMMAND make
  10. BUILD_IN_SOURCE 0
  11. LOG_CONFIGURE ON
  12. LOG_BUILD ON
  13. LOG_INSTALL ON
  14. )
  15. add_dependencies(resources xercesc)
  16. endif()
  17. ExternalProject_Add(
  18. glpk
  19. DOWNLOAD_COMMAND ""
  20. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57
  21. SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/glpk-4.57
  22. CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/glpk-4.57/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57 --libdir=${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57/lib CC=${CMAKE_C_COMPILER}
  23. BUILD_COMMAND make "CFLAGS=-O2 -w"
  24. INSTALL_COMMAND make install
  25. BUILD_IN_SOURCE 0
  26. LOG_CONFIGURE ON
  27. LOG_BUILD ON
  28. LOG_INSTALL ON
  29. )
  30. add_dependencies(resources glpk)
  31. set(GLPK_LIBRARIES ${CMAKE_BINARY_DIR}/resources/3rdparty/glpk-4.57/lib/libglpk${DYNAMIC_EXT} PARENT_SCOPE)
  32. set(GLPK_INCLUDE_DIR ${CMAKE_BINARY_DIR}/resources/3rdparty/glpk-4.57/include PARENT_SCOPE)
  33. ExternalProject_Add(
  34. cudd3
  35. DOWNLOAD_COMMAND ""
  36. SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cudd-3.0.0
  37. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0
  38. CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cudd-3.0.0/configure --enable-shared --enable-obj --prefix=${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0 --libdir=${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0/lib CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER}
  39. BUILD_COMMAND make "CFLAGS=-O2 -w"
  40. INSTALL_COMMAND make install
  41. BUILD_IN_SOURCE 0
  42. LOG_CONFIGURE ON
  43. LOG_BUILD ON
  44. LOG_INSTALL ON
  45. )
  46. add_dependencies(resources cudd3)
  47. ExternalProject_Get_Property(cudd3 binary_dir)
  48. set(CUDD3_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0/include PARENT_SCOPE)
  49. set(CUDD3_SHARED_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0/lib/libcudd${DYNAMIC_EXT} PARENT_SCOPE)
  50. set(CUDD3_STATIC_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0/liblibcudd${STATIC_EXT} PARENT_SCOPE)
  51. set(STORM_SYLVAN_ROOT "${PROJECT_SOURCE_DIR}/resources/3rdparty/sylvan")
  52. ExternalProject_Add(
  53. sylvan
  54. DOWNLOAD_COMMAND ""
  55. PREFIX "sylvan"
  56. SOURCE_DIR "${STORM_SYLVAN_ROOT}"
  57. CMAKE_ARGS -DSYLVAN_BUILD_TEST=Off -DSYLVAN_BUILD_EXAMPLES=Off -DCMAKE_BUILD_TYPE=Release
  58. BINARY_DIR "${PROJECT_BINARY_DIR}/sylvan"
  59. INSTALL_COMMAND ""
  60. INSTALL_DIR "${PROJECT_BINARY_DIR}/sylvan"
  61. )
  62. ExternalProject_Get_Property(sylvan binary_dir)
  63. set(Sylvan_INCLUDE_DIR "${STORM_SYLVAN_ROOT}/src" PARENT_SCOPE)
  64. set(Sylvan_LIBRARY "${binary_dir}/src/libsylvan.a" PARENT_SCOPE)
  65. add_dependencies(resources sylvan)
  66. ExternalProject_Add(
  67. googletest
  68. #For downloads (may be useful later!)
  69. #SVN_REPOSITORY http://googletest.googlecode.com/svn/trunk/
  70. #TIMEOUT 10
  71. DOWNLOAD_COMMAND ""
  72. SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.7.0"
  73. # Force the same output paths for debug and release builds so that
  74. # we know in which place the binaries end up when using the Xcode generator
  75. CMAKE_ARGS -Dgtest_force_shared_crt=ON -DCXX=${CMAKE_CXX_COMPILER} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0 -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0
  76. # Disable install step
  77. INSTALL_COMMAND ""
  78. BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0"
  79. INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0"
  80. # Wrap download, configure and build steps in a script to log output
  81. LOG_CONFIGURE ON
  82. LOG_BUILD ON)
  83. # Specify include dir
  84. ExternalProject_Get_Property(googletest source_dir)
  85. set(GTEST_INCLUDE_DIR ${source_dir}/include PARENT_SCOPE)
  86. # Specify MainTest's link libraries
  87. ExternalProject_Get_Property(googletest binary_dir)
  88. set(GTEST_LIBRARIES ${binary_dir}/libgtest.a ${binary_dir}/libgtest_main.a PARENT_SCOPE)
  89. add_dependencies(test-resources googletest)