Evolutionary game-theory simulator https://oyun.charlespence.net/
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.
 
 
 
 

94 lines
2.9 KiB

  1. cmake_minimum_required (VERSION 2.8)
  2. project (Oyun)
  3. set (OYUN_VERSION "2.0.b6")
  4. set (CPACK_PACKAGE_VERSION_MAJOR "2")
  5. set (CPACK_PACKAGE_VERSION_MINOR "0")
  6. set (CPACK_PACKAGE_VERSION_PATCH "b6")
  7. set (CPACK_PACKAGE_INSTALL_DIRECTORY "Oyun 2.0.b6")
  8. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/build/cmake/")
  9. ##########
  10. # Enable all warnings on all projects
  11. ##########
  12. if (MSVC)
  13. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
  14. else ()
  15. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -std=c++11")
  16. endif ()
  17. ##########
  18. # Sub-directories
  19. ##########
  20. add_subdirectory (tools/hhp2cached)
  21. add_subdirectory (lib/CppUnitLite)
  22. add_subdirectory (src)
  23. ##########
  24. # Install root-level files to the documentation directory, if we're on *nix
  25. ##########
  26. if (NOT APPLE AND NOT WIN32 AND NOT MSVC)
  27. install (FILES AUTHORS COPYING ChangeLog ChangeLog-2015
  28. ChangeLog-2012 ChangeLog-2011 ChangeLog-2010
  29. ChangeLog-2009 ChangeLog-2008 ChangeLog-2007
  30. ChangeLog-2006 ChangeLog-2005 NEWS README.md THANKS
  31. DESTINATION share/doc/oyun)
  32. endif()
  33. ##########
  34. # Configure installation packages
  35. ##########
  36. include (InstallRequiredSystemLibraries)
  37. set (CPACK_PACKAGE_VERSION ${OYUN_VERSION})
  38. set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Oyun evolutionary game-theory simulator")
  39. set (CPACK_PACKAGE_VENDOR "Charles H. Pence")
  40. set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
  41. set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
  42. if (WIN32 OR MSVC)
  43. set (CPACK_PACKAGE_EXECUTABLES "oyun" "Oyun")
  44. set (CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/build\\\\oyun.ico")
  45. set (CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\oyun.exe")
  46. set (CPACK_NSIS_DISPLAY_NAME ${CPACK_PACKAGE_INSTALL_DIRECTORY})
  47. set (CPACK_NSIS_HELP_LINK "http://charlespence.net/oyun/")
  48. set (CPACK_NSIS_URL_INFO_ABOUT "http://charlespence.net/")
  49. set (CPACK_NSIS_CONTACT "charles@charlespence.net")
  50. set (CPACK_NSIS_MODIFY_PATH ON)
  51. set (CPACK_GENERATOR "NSIS")
  52. set (CPACK_PACKAGE_FILE_NAME "oyun-${OYUN_VERSION}-win32")
  53. elseif (APPLE)
  54. set (CPACK_GENERATOR "DragNDrop")
  55. set (CPACK_PACKAGE_FILE_NAME "oyun-${OYUN_VERSION}-mac")
  56. else ()
  57. set (CPACK_STRIP_FILES "bin/oyun")
  58. set (CPACK_SOURCE_STRIP_FILES "")
  59. set (CPACK_GENERATOR "TXZ")
  60. set (CPACK_PACKAGE_FILE_NAME "oyun-${OYUN_VERSION}-linux")
  61. endif()
  62. set (CPACK_SOURCE_PACKAGE_FILE_NAME "oyun-${OYUN_VERSION}")
  63. set (CPACK_SOURCE_GENERATOR "TXZ")
  64. include (CPack)
  65. ##########
  66. # Install the PDF and HTB manuals to $PREFIX/share or to the bundle on Mac
  67. ##########
  68. if (APPLE)
  69. set (MANUAL_DESTINATION ".")
  70. set (DOCBOOK_DESTINATION "Oyun.app/Contents/Resources")
  71. else ()
  72. set (MANUAL_DESTINATION "share/doc/oyun")
  73. set (DOCBOOK_DESTINATION "share/oyun")
  74. endif ()
  75. install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/doc/manual/oyun-manual.pdf"
  76. DESTINATION ${MANUAL_DESTINATION})
  77. install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/doc/manual/oyun.htb"
  78. DESTINATION ${DOCBOOK_DESTINATION})