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.
 
 
 
 

93 lines
2.9 KiB

cmake_minimum_required (VERSION 2.8)
project (Oyun)
set (OYUN_VERSION "2.0.b6")
set (CPACK_PACKAGE_VERSION_MAJOR "2")
set (CPACK_PACKAGE_VERSION_MINOR "0")
set (CPACK_PACKAGE_VERSION_PATCH "b6")
set (CPACK_PACKAGE_INSTALL_DIRECTORY "Oyun 2.0.b6")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/build/cmake/")
##########
# Enable all warnings on all projects
##########
if (MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
else ()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -std=c++11")
endif ()
##########
# Sub-directories
##########
add_subdirectory (tools/hhp2cached)
add_subdirectory (lib/CppUnitLite)
add_subdirectory (src)
##########
# Install root-level files to the documentation directory, if we're on *nix
##########
if (NOT APPLE AND NOT WIN32 AND NOT MSVC)
install (FILES AUTHORS COPYING ChangeLog ChangeLog-2015
ChangeLog-2012 ChangeLog-2011 ChangeLog-2010
ChangeLog-2009 ChangeLog-2008 ChangeLog-2007
ChangeLog-2006 ChangeLog-2005 NEWS README.md THANKS
DESTINATION share/doc/oyun)
endif()
##########
# Configure installation packages
##########
include (InstallRequiredSystemLibraries)
set (CPACK_PACKAGE_VERSION ${OYUN_VERSION})
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Oyun evolutionary game-theory simulator")
set (CPACK_PACKAGE_VENDOR "Charles H. Pence")
set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
if (WIN32 OR MSVC)
set (CPACK_PACKAGE_EXECUTABLES "oyun" "Oyun")
set (CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/build\\\\oyun.ico")
set (CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\oyun.exe")
set (CPACK_NSIS_DISPLAY_NAME ${CPACK_PACKAGE_INSTALL_DIRECTORY})
set (CPACK_NSIS_HELP_LINK "http://charlespence.net/oyun/")
set (CPACK_NSIS_URL_INFO_ABOUT "http://charlespence.net/")
set (CPACK_NSIS_CONTACT "charles@charlespence.net")
set (CPACK_NSIS_MODIFY_PATH ON)
set (CPACK_GENERATOR "NSIS")
set (CPACK_PACKAGE_FILE_NAME "oyun-${OYUN_VERSION}-win32")
elseif (APPLE)
set (CPACK_GENERATOR "DragNDrop")
set (CPACK_PACKAGE_FILE_NAME "oyun-${OYUN_VERSION}-mac")
else ()
set (CPACK_STRIP_FILES "bin/oyun")
set (CPACK_SOURCE_STRIP_FILES "")
set (CPACK_GENERATOR "TXZ")
set (CPACK_PACKAGE_FILE_NAME "oyun-${OYUN_VERSION}-linux")
endif()
set (CPACK_SOURCE_PACKAGE_FILE_NAME "oyun-${OYUN_VERSION}")
set (CPACK_SOURCE_GENERATOR "TXZ")
include (CPack)
##########
# Install the PDF and HTB manuals to $PREFIX/share or to the bundle on Mac
##########
if (APPLE)
set (MANUAL_DESTINATION ".")
set (DOCBOOK_DESTINATION "Oyun.app/Contents/Resources")
else ()
set (MANUAL_DESTINATION "share/doc/oyun")
set (DOCBOOK_DESTINATION "share/oyun")
endif ()
install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/doc/manual/oyun-manual.pdf"
DESTINATION ${MANUAL_DESTINATION})
install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/doc/manual/oyun.htb"
DESTINATION ${DOCBOOK_DESTINATION})