Commit a9c7efb1 authored by Gerhard Stein's avatar Gerhard Stein

Win32 build improvements

parent a4c64452
File deleted
File added
File added
......@@ -20,16 +20,16 @@ SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${BU
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT")
IF(BUILD_TARGET STREQUAL WIN32)
IF(WIN32)
SET(CPACK_PACKAGE_INSTALL_DIRECTORY ${APPDIR})
SET(CPACK_GENERATOR "ZIP;NSIS")
ELSE(BUILD_TARGET STREQUAL WIN32)
ELSE(WIN32)
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "/usr/games")
SET(CPACK_GENERATOR "TGZ")
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/share/cgenius.desktop DESTINATION ${CGENIUS_DESKTOP_DIR})
ENDIF(BUILD_TARGET STREQUAL WIN32)
ENDIF(WIN32)
IF(BUILD_TARGET STREQUAL WIN32)
IF(WIN32)
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backlasshes.
SET(CPACK_NSIS_INSTALLED_ICON_NAME "CGenius.exe")
......@@ -45,9 +45,9 @@ SET(CPACK_PACKAGE_EXECUTABLES "CGenius" "Commander Genius")
# This section is only called if the user wants to get debian packages created
IF(CREATE_DEBS)
IF(BUILD_TARGET STREQUAL WIN32)
IF(WIN32)
MESSAGE("NOTE: Windows does not use DEB Packages. Those won't be build here...")
ELSE(BUILD_TARGET STREQUAL WIN32)
ELSE(WIN32)
SET(CPACK_GENERATOR "DEB;${CPACK_GENERATOR}") # For Debian, Ubuntu etc...
SET(CPACK_DEBIAN_PACKAGE_NAME "CGenius")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Gerhard Stein <gerstrong@gmail.com>")
......@@ -63,15 +63,15 @@ IF(CREATE_DEBS)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libvorbis0a (>= 1.2.3), libvorbisenc2 (>> 1.2.3), libvorbisfile3 (>= 1.2.3), libsdl2-2.0-0 (>= 2.0.0), libgl1-mesa-glx (>= 7.7.1), libsdl2-image-2.0-0 (>= 2.0)")
SET(CPACK_DEBIAN_PACKAGE_SECTION "games")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
ENDIF(BUILD_TARGET STREQUAL WIN32)
ENDIF(WIN32)
ENDIF(CREATE_DEBS)
# This section is only called if the user wants to get debian packages created
IF(CREATE_RPMS)
IF(BUILD_TARGET STREQUAL WIN32)
IF(WIN32)
MESSAGE("NOTE: Windows does not use RPM Packages. Those won't be build here...")
ELSE(BUILD_TARGET STREQUAL WIN32)
ELSE(WIN32)
SET(CPACK_GENERATOR "RPM;${CPACK_GENERATOR}") # For Fedora, OpenSuse, etc.
SET(CPACK_RPM_PACKAGE_SUMMARY "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
SET(CPACK_RPM_PACKAGE_NAME "CGenius")
......@@ -87,7 +87,7 @@ IF(CREATE_RPMS)
SET(CPACK_RPM_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}")
SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}\n .\n ${CPACK_PACKAGE_DESCRIPTION}")
SET(CPACK_RPM_PACKAGE_REQUIRES "SDL >= 2.0, libvorbis >= 1.3, mesa-libGL >= 7.7")
ENDIF(BUILD_TARGET STREQUAL WIN32)
ENDIF(WIN32)
ENDIF(CREATE_RPMS)
INCLUDE(CPack)
......
########################################################################
############### Prepare the installation of the compiled stuff here!
IF(BUILD_TARGET STREQUAL WIN32)
IF(WIN32)
SET(DATADIR CGenius)
SET(APPDIR CGenius)
ELSE(BUILD_TARGET STREQUAL WIN32)
SET(GAMES_SHAREDIR "${APPDIR}" CACHE PATH "Game data root dir")
SET(DOCDIR ${DATADIR} CACHE PATH "Docs destination")
ELSE(WIN32)
SET(SHAREDIR share CACHE PATH "System share dir location")
# seperate SHAREDIR and GAMES_SHAREDIR
# for cases where we want /usr/share/games for the data
......@@ -14,7 +16,7 @@ SET(GAMES_SHAREDIR "share/games/" CACHE PATH "Game data root dir")
SET(DATADIR "${GAMES_SHAREDIR}/commandergenius")
SET(APPDIR games CACHE PATH "Binary destination")
SET(DOCDIR ${DATADIR} CACHE PATH "Docs destination")
ENDIF(BUILD_TARGET STREQUAL WIN32)
ENDIF(WIN32)
# This will install the application itself
INSTALL(TARGETS CGeniusExe
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment