share/CMakeLists.txt
author sheepluva
Thu, 15 Sep 2011 09:19:56 +0200
changeset 5911 4a28d0ae9624
parent 5252 ded882439548
child 7256 5b97b9946cde
permissions -rw-r--r--
based on the fact that the crash never seemed to have happened with default screen resolutions and also inspired by the only other getmem usage in the code I came up with this simple solution which seems to work just fine. I do not understand why getmem seems to need this, but well - feel free to explain.

add_subdirectory(hedgewars)

IF(APPLE)
	#needed for CFBundleVersion and CFBundleShortVersionString
	FIND_PROGRAM(HGCOMMAND hg)
	IF (HGCOMMAND AND (EXISTS ${hedgewars_SOURCE_DIR}/.hg))
		exec_program(${HGCOMMAND}
			     ARGS identify -n ${hedgewars_SOURCE_DIR}
			     OUTPUT_VARIABLE version_suffix
			     )
		STRING(REGEX REPLACE "([0-9]+)(.*)" "\\1" version_suffix ${version_suffix})
		set (HEDGEWARS_REVISION ${version_suffix})
	ELSE ()
		set (HEDGEWARS_REVISION ${HEDGEWARS_VERSION})
	ENDIF ()

	configure_file(${hedgewars_SOURCE_DIR}/share/Info.plist.in 
		${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
	install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/Info.plist"
		DESTINATION ../)
	install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/Icon.icns"
		DESTINATION ../Resources/)
	install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/hwico.icns"
		DESTINATION ../Resources/)
	install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/dsa_pub.pem"
		DESTINATION ../Resources/)
ENDIF(APPLE)