Move code for Clang to separate CMake module.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cmake_modules/FindClang.cmake Fri Nov 30 20:00:58 2012 -0600
@@ -0,0 +1,27 @@
+# Load LLVM/Clang
+IF (CLANG)
+ SET(CLANG_EXECUTABLE ${CLANG})
+ELSE()
+ FIND_PROGRAM(CLANG_EXECUTABLE
+ NAMES clang-mp-3.2 clang-mp-3.1 clang-mp-3.0 clang
+ PATHS /opt/local/bin /usr/local/bin /usr/bin)
+ENDIF()
+
+# Check LLVM/Clang version
+IF (CLANG_EXECUTABLE)
+ EXEC_PROGRAM(${CLANG_EXECUTABLE} ARGS "-v" OUTPUT_VARIABLE CLANG_VERSION_FULL)
+
+ STRING(REGEX MATCH "[0-9]+\\.[0-9]+" CLANG_VERSION_LONG "${CLANG_VERSION_FULL}")
+ STRING(REGEX REPLACE "([0-9]+\\.[0-9]+)" "\\1" CLANG_VERSION "${CLANG_VERSION_LONG}")
+
+ # Required that LLVM/Clang version is >= 3.0
+ IF (CLANG_VERSION VERSION_GREATER 3.0 OR CLANG_VERSION VERSION_EQUAL 3.0)
+ MESSAGE(STATUS "Found CLANG: ${CLANG_EXECUTABLE} (version ${CLANG_VERSION})")
+ ELSE()
+ MESSAGE(FATAL_ERROR "Necessary LLVM/Clang version not found (version >= 3.0 required)")
+ ENDIF()
+ELSE()
+ MESSAGE(FATAL_ERROR "No LLVM/Clang compiler found (required for engine_c target)")
+ENDIF()
+
+SET(CMAKE_C_COMPILER ${CLANG_EXECUTABLE})
--- a/project_files/hwc/CMakeLists.txt Sat Nov 24 04:27:31 2012 +0100
+++ b/project_files/hwc/CMakeLists.txt Fri Nov 30 20:00:58 2012 -0600
@@ -1,26 +1,3 @@
-
-#only Clang is supported
-if(CLANG)
- set(clang_executable ${CLANG})
-else()
- find_program(clang_executable
- NAMES clang-mp-3.2 clang-mp-3.1 clang-mp-3.0 clang
- PATHS /opt/local/bin /usr/local/bin /usr/bin)
-endif()
-
-if (clang_executable)
- exec_program(${clang_executable} ARGS "-v" OUTPUT_VARIABLE clang_version_full)
- string(REGEX MATCH "[0-9]+\\.[0-9]+" clang_version_long "${clang_version_full}")
- string(REGEX REPLACE "([0-9]+\\.[0-9]+)" "\\1" clang_version "${clang_version_long}")
- #TODO: check version >= 3.0
- message(STATUS "Found CLANG: ${clang_executable} (version ${clang_version})")
-else()
- message(FATAL_ERROR "No LLVM/Clang compiler found (required for engine_c target)")
-endif()
-
-set(CMAKE_C_COMPILER ${clang_executable})
-
-
#the usual set of dependencies
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/misc/hwengine.desktop Fri Nov 30 20:00:58 2012 -0600
@@ -0,0 +1,26 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Encoding=UTF-8
+Name=Hedgewars Engine
+GenericName=Hedgewars engine, for playback of saves and demos
+GenericName[de]=Hedgewars engine, für die Wiedergabe von gespeicherten Spielen und Demos
+GenericName[es]=Motor del juego Hedgewars, reproduce demos y partidas guardadas
+GenericName[fr]=Moteur graphique d'Hedgewars, pour revoir les parties enregistrées et de démonstration.
+GenericName[it]=Motore grafico di Hedgewars, riproduce le demo e riprende le partite salvate
+GenericName[ko]=헤즈와즈 게임 엔진, 데모 와 저장한 게임을 재생함
+GenericName[pl]=Silnik gry Hedgewars do odtwarzania dem i zapisów gier
+GenericName[pt]=Motor de jogo Hedgewars, para reprodução de jogos guardados e demos
+GenericName[ru]=Движок Hedgewars для проигрывания сохранённых игр и демок
+GenericName[sk]=Engine hry Hedgewars, pre prehrávanie uložených hier a demo súborov
+GenericName[cs]=Engine hry Hedgewars pro přehrávání uložených her a ukázkových souborů
+GenericName[sv]=Hedgewarsmotorn, för att öppna demo- och sparfiler
+GenericName[da]=Kæmpende Pindsvin
+Icon=hedgewars.png
+Exec=/usr/local/bin/hwengine /usr/local/share//hedgewars/Data %f
+Path=/tmp
+Terminal=false
+StartupNotify=false
+NoDisplay=true
+Categories=Application;Game;StrategyGame;
+MimeType=application/x-hedgewars-demo;application/x-hedgewars-save