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.

75 lines
3.1 KiB

  1. add_custom_target(resources)
  2. add_custom_target(test-resources)
  3. if(STORM_SUPPORT_XML_FORMATS)
  4. include(ExternalProject)
  5. ExternalProject_Add(
  6. xercesc
  7. SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2
  8. 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
  9. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2
  10. BUILD_COMMAND make
  11. BUILD_IN_SOURCE 0
  12. LOG_CONFIGURE ON
  13. LOG_BUILD ON
  14. LOG_INSTALL ON
  15. )
  16. add_dependencies(resources xercesc)
  17. endif()
  18. ExternalProject_Add(
  19. glpk
  20. DOWNLOAD_COMMAND ""
  21. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/glpk-4.57
  22. SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/glpk-4.57
  23. 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}
  24. BUILD_COMMAND make "CFLAGS=-O2 -w"
  25. INSTALL_COMMAND make install
  26. BUILD_IN_SOURCE 0
  27. LOG_CONFIGURE ON
  28. LOG_BUILD ON
  29. LOG_INSTALL ON
  30. )
  31. add_dependencies(resources glpk)
  32. ExternalProject_Add(
  33. cudd3
  34. DOWNLOAD_COMMAND ""
  35. SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cudd-3.0.0
  36. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0
  37. CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cudd-3.0.0/configure --enable-shared --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}
  38. BUILD_COMMAND make "CFLAGS=-O2 -w"
  39. INSTALL_COMMAND make install
  40. BUILD_IN_SOURCE 0
  41. )
  42. add_dependencies(resources cudd3)
  43. ExternalProject_Add(
  44. googletest
  45. #For downloads (may be useful later!)
  46. #SVN_REPOSITORY http://googletest.googlecode.com/svn/trunk/
  47. #TIMEOUT 10
  48. DOWNLOAD_COMMAND ""
  49. SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.7.0"
  50. # Force the same output paths for debug and release builds so that
  51. # we know in which place the binaries end up when using the Xcode generator
  52. 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
  53. # Disable install step
  54. INSTALL_COMMAND ""
  55. BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0"
  56. INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0"
  57. # Wrap download, configure and build steps in a script to log output
  58. LOG_CONFIGURE ON
  59. LOG_BUILD ON)
  60. # Specify include dir
  61. ExternalProject_Get_Property(googletest source_dir)
  62. set(GTEST_INCLUDE_DIR ${source_dir}/include PARENT_SCOPE)
  63. # Specify MainTest's link libraries
  64. ExternalProject_Get_Property(googletest binary_dir)
  65. set(GTEST_LIBRARIES ${binary_dir}/libgtest.a ${binary_dir}/libgtest_main.a PARENT_SCOPE)
  66. add_dependencies(test-resources googletest)