Only use DEB generator if CPACK_GENERATOR is unset

When trying to build a dmg package on an apple system the values set in
mk/macos/CMakeLists.txt are masked by those coded in the main CMakeLists file.
This change means the values are only set if they haven't been already (eg by
using the apple CMakeLists).

I feel it would probably be better to move this lot ot mk/linux/CMakeLists and
then conditionally import the correct file - I'm happy to redo the change that
way if there is agreement on that.
This commit is contained in:
Karl Goetz
2014-12-15 13:04:05 +11:00
parent 3ecc553ba9
commit 00f116eeee

View File

@@ -376,6 +376,7 @@ IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
MESSAGE(WARNING ">> CLANG is NOT currently compatible as it does not support the following essential GCC compiler settings: -frounding-math -fsignaling-nans") MESSAGE(WARNING ">> CLANG is NOT currently compatible as it does not support the following essential GCC compiler settings: -frounding-math -fsignaling-nans")
ENDIF() ENDIF()
IF(NOT DEFINED CPACK_GENERATOR)
SET(CPACK_GENERATOR "DEB") SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Mark Vejvoda") #required SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Mark Vejvoda") #required
SET(CPACK_DEBIAN_PACKAGE_DEPENDS " SET(CPACK_DEBIAN_PACKAGE_DEPENDS "
@@ -423,6 +424,7 @@ IF(WIN32)
SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/mk/windoze/megaglest.ico") SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/mk/windoze/megaglest.ico")
SET(CPACK_NSIS_URL_INFO_ABOUT "http://megaglest.org") SET(CPACK_NSIS_URL_INFO_ABOUT "http://megaglest.org")
ENDIF() ENDIF()
ENDIF(NOT DEFINED CPACK_GENERATOR)
INCLUDE(CPack) INCLUDE(CPack)
get_directory_property( DirDefs DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS ) get_directory_property( DirDefs DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS )