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.

80 lines
3.4 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. ExternalProject_Add(
  32. cudd3
  33. DOWNLOAD_COMMAND ""
  34. SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cudd-3.0.0
  35. PREFIX ${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0
  36. 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}
  37. BUILD_COMMAND make "CFLAGS=-O2 -w"
  38. INSTALL_COMMAND make install
  39. BUILD_IN_SOURCE 0
  40. )
  41. add_dependencies(resources cudd3)
  42. ExternalProject_Get_Property(cudd3 binary_dir)
  43. set(CUDD3_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0/include PARENT_SCOPE)
  44. set(CUDD3_SHARED_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0/lib/libcudd${DYNAMIC_EXT} PARENT_SCOPE)
  45. set(CUDD3_STATIC_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/cudd-3.0.0/liblibcudd${STATIC_EXT} PARENT_SCOPE)
  46. ExternalProject_Add(
  47. googletest
  48. #For downloads (may be useful later!)
  49. #SVN_REPOSITORY http://googletest.googlecode.com/svn/trunk/
  50. #TIMEOUT 10
  51. DOWNLOAD_COMMAND ""
  52. SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.7.0"
  53. # Force the same output paths for debug and release builds so that
  54. # we know in which place the binaries end up when using the Xcode generator
  55. 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
  56. # Disable install step
  57. INSTALL_COMMAND ""
  58. BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0"
  59. INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/gtest-1.7.0"
  60. # Wrap download, configure and build steps in a script to log output
  61. LOG_CONFIGURE ON
  62. LOG_BUILD ON)
  63. # Specify include dir
  64. ExternalProject_Get_Property(googletest source_dir)
  65. set(GTEST_INCLUDE_DIR ${source_dir}/include PARENT_SCOPE)
  66. # Specify MainTest's link libraries
  67. ExternalProject_Get_Property(googletest binary_dir)
  68. set(GTEST_LIBRARIES ${binary_dir}/libgtest.a ${binary_dir}/libgtest_main.a PARENT_SCOPE)
  69. add_dependencies(test-resources googletest)