Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

79 lines (67 sloc) 2.377 kb
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_POLICY(VERSION 2.6)
PROJECT(VALYRIATEAR)
OPTION(EDITOR_SUPPORT "Compile the Qt editor" OFF)
OPTION(DEBUG_MENU "Add the debug menu options at game start" OFF)
IF (NOT VERSION)
SET(VERSION 0.1.0)
ENDIF()
STRING(REPLACE "." " " _VERSION ${VERSION})
SEPARATE_ARGUMENTS(_VERSION)
LIST(LENGTH _VERSION _LEN)
IF(NOT _LEN EQUAL 4 AND NOT _LEN EQUAL 3)
MESSAGE(FATAL_ERROR "Version needs to be in the form MAJOR.MINOR.RELEASE[.BUILD]")
ENDIF()
LIST(GET _VERSION 0 VER_MAJOR)
LIST(GET _VERSION 1 VER_MINOR)
LIST(GET _VERSION 2 VER_RELEASE)
IF(_LEN EQUAL 4)
LIST(GET _VERSION 3 VER_BUILD)
ELSE()
SET(VER_BUILD 0)
ENDIF()
# where to look for cmake modules
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
SET(PKG_NAME "valyriatear")
IF (WIN32)
SET(PKG_DATADIR ".")
SET(PKG_BINDIR ".")
SET(LOCALEDIR ".")
CONFIGURE_FILE(src/winver.h.in src/winver.h)
ELSE (WIN32)
IF (NOT OSX AND NOT BEOS)
OPTION(USE_X11 "Use X11 Clipboard functionality" ON)
ENDIF ()
SET(PKG_DATADIR ${CMAKE_INSTALL_PREFIX}/share/valyriatear)
SET(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
SET(PKG_BINDIR ${CMAKE_INSTALL_PREFIX}/bin)
ENDIF (WIN32)
# The sub-folders to parse
ADD_SUBDIRECTORY(src)
# TODO: Add data packages
FIND_PACKAGE(Gettext)
ADD_SUBDIRECTORY(po)
#ADD_SUBDIRECTORY(dat)
#ADD_SUBDIRECTORY(img)
#ADD_SUBDIRECTORY(mus)
#ADD_SUBDIRECTORY(snd)
# CPack installation part
If(UNIX)
INSTALL(FILES valyriatear.desktop DESTINATION share/applications) #TODO Add a desktop file
ENDIF()
SET(CPACK_PACKAGE_NAME "valyriatear")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Valyria Tear")
SET(CPACK_PACKAGE_VENDOR "Bertram")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "ValyriaTear")
SET(CPACK_PACKAGE_VERSION_MAJOR ${VER_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${VER_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${VER_RELEASE})
IF(WIN32)
SET(CPACK_NSIS_DISPLAY_NAME "Valyria Tear")
SET(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/img/logos/program_icon.ico")
SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/img/logos/program_icon.png") #TODO: use a bmp
SET(CPACK_NSIS_URL_INFO_ABOUT "http://valyriatear.blogspot.com")
ENDIF()
INCLUDE(CPack)
Jump to Line
Something went wrong with that request. Please try again.