share/CMakeLists.txt
author koda
Sun, 29 Jan 2012 18:52:01 +0100
changeset 6613 c7bf3b7c49dd
parent 5252 ded882439548
child 7256 5b97b9946cde
permissions -rw-r--r--
disabling the discovery of SDL13+ on desktop. SDL13 has become SDL2 with a completely different ABI and will require a new FindSDL2 module for Cmake to be found; for current sdl development installations, hedgewars will either use the compatibility layer (present in sdl1.3 but not in sdl2) or just fail to build (in case sdl2 is installed but sdl1.2.* is not). whew

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)