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.

83 lines
3.4 KiB

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