Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 79 lines (67 sloc) 2.377 kB
86749af Added basic CMake compile files.
Yohann Ferreira authored
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 CMAKE_POLICY(VERSION 2.6)
3
9c6bf61 Started the app rebranding to Valyria Tear.
Yohann Ferreira authored
4 PROJECT(VALYRIATEAR)
86749af Added basic CMake compile files.
Yohann Ferreira authored
5
9c6bf61 Started the app rebranding to Valyria Tear.
Yohann Ferreira authored
6 OPTION(EDITOR_SUPPORT "Compile the Qt editor" OFF)
b605e9f Made the debug menus only shown with a cmake compile option.
Yohann Ferreira authored
7 OPTION(DEBUG_MENU "Add the debug menu options at game start" OFF)
7525720 Added an option to compile the editor through CMake.
Yohann Ferreira authored
8
86749af Added basic CMake compile files.
Yohann Ferreira authored
9 IF (NOT VERSION)
10 SET(VERSION 0.1.0)
11 ENDIF()
12
13 STRING(REPLACE "." " " _VERSION ${VERSION})
14 SEPARATE_ARGUMENTS(_VERSION)
15 LIST(LENGTH _VERSION _LEN)
16 IF(NOT _LEN EQUAL 4 AND NOT _LEN EQUAL 3)
17 MESSAGE(FATAL_ERROR "Version needs to be in the form MAJOR.MINOR.RELEASE[.BUILD]")
18 ENDIF()
19
20 LIST(GET _VERSION 0 VER_MAJOR)
21 LIST(GET _VERSION 1 VER_MINOR)
22 LIST(GET _VERSION 2 VER_RELEASE)
23 IF(_LEN EQUAL 4)
24 LIST(GET _VERSION 3 VER_BUILD)
25 ELSE()
26 SET(VER_BUILD 0)
27 ENDIF()
28
29 # where to look for cmake modules
30 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
31
9c6bf61 Started the app rebranding to Valyria Tear.
Yohann Ferreira authored
32 SET(PKG_NAME "valyriatear")
86749af Added basic CMake compile files.
Yohann Ferreira authored
33 IF (WIN32)
34 SET(PKG_DATADIR ".")
35 SET(PKG_BINDIR ".")
36 SET(LOCALEDIR ".")
37 CONFIGURE_FILE(src/winver.h.in src/winver.h)
38 ELSE (WIN32)
39 IF (NOT OSX AND NOT BEOS)
40 OPTION(USE_X11 "Use X11 Clipboard functionality" ON)
41 ENDIF ()
9c6bf61 Started the app rebranding to Valyria Tear.
Yohann Ferreira authored
42 SET(PKG_DATADIR ${CMAKE_INSTALL_PREFIX}/share/valyriatear)
86749af Added basic CMake compile files.
Yohann Ferreira authored
43 SET(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
44 SET(PKG_BINDIR ${CMAKE_INSTALL_PREFIX}/bin)
45 ENDIF (WIN32)
46
47 # The sub-folders to parse
48 ADD_SUBDIRECTORY(src)
49
50 # TODO: Add data packages
9394af3 Add a cmake based translation system
Yohann Ferreira authored
51 FIND_PACKAGE(Gettext)
9908c9d Fixed the testing translation preparation, and fixed the menus reloading
Yohann Ferreira authored
52 ADD_SUBDIRECTORY(po)
86749af Added basic CMake compile files.
Yohann Ferreira authored
53 #ADD_SUBDIRECTORY(dat)
54 #ADD_SUBDIRECTORY(img)
55 #ADD_SUBDIRECTORY(mus)
56 #ADD_SUBDIRECTORY(snd)
57
58 # CPack installation part
59 If(UNIX)
9c6bf61 Started the app rebranding to Valyria Tear.
Yohann Ferreira authored
60 INSTALL(FILES valyriatear.desktop DESTINATION share/applications) #TODO Add a desktop file
86749af Added basic CMake compile files.
Yohann Ferreira authored
61 ENDIF()
62
9c6bf61 Started the app rebranding to Valyria Tear.
Yohann Ferreira authored
63 SET(CPACK_PACKAGE_NAME "valyriatear")
64 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Valyria Tear")
65 SET(CPACK_PACKAGE_VENDOR "Bertram")
86749af Added basic CMake compile files.
Yohann Ferreira authored
66 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
67 SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
9c6bf61 Started the app rebranding to Valyria Tear.
Yohann Ferreira authored
68 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "ValyriaTear")
86749af Added basic CMake compile files.
Yohann Ferreira authored
69 SET(CPACK_PACKAGE_VERSION_MAJOR ${VER_MAJOR})
70 SET(CPACK_PACKAGE_VERSION_MINOR ${VER_MINOR})
71 SET(CPACK_PACKAGE_VERSION_PATCH ${VER_RELEASE})
72 IF(WIN32)
9c6bf61 Started the app rebranding to Valyria Tear.
Yohann Ferreira authored
73 SET(CPACK_NSIS_DISPLAY_NAME "Valyria Tear")
86749af Added basic CMake compile files.
Yohann Ferreira authored
74 SET(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/img/logos/program_icon.ico")
9c6bf61 Started the app rebranding to Valyria Tear.
Yohann Ferreira authored
75 SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/img/logos/program_icon.png") #TODO: use a bmp
7ac3cdb Updated the website in Cpack while thinking about it.
Yohann Ferreira authored
76 SET(CPACK_NSIS_URL_INFO_ABOUT "http://valyriatear.blogspot.com")
86749af Added basic CMake compile files.
Yohann Ferreira authored
77 ENDIF()
78 INCLUDE(CPack)
Something went wrong with that request. Please try again.