From e5a423fbd79c8e92c6e04ba55425cce125d00219 Mon Sep 17 00:00:00 2001 From: Damien Dupuis Date: Fri, 19 Feb 2010 15:25:45 +0000 Subject: [PATCH] New compile.sh script that use cmake, there should be no more problems on Linux (except for svn old version) --- bootstrap/easyChams/CMakeLists.txt | 22 ++++++++++++++++++++++ bootstrap/easyChams/compile.sh | 17 +++++++++++------ 2 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 bootstrap/easyChams/CMakeLists.txt diff --git a/bootstrap/easyChams/CMakeLists.txt b/bootstrap/easyChams/CMakeLists.txt new file mode 100644 index 00000000..d1f50507 --- /dev/null +++ b/bootstrap/easyChams/CMakeLists.txt @@ -0,0 +1,22 @@ +PROJECT(EASYCHAMS) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0) + +SET(CMAKE_BUILD_TYPE release) + +FIND_PACKAGE(Qt4 REQUIRED) + +INCLUDE(${QT_USE_FILE}) + +SET(CPP_FILES main.cpp MainWindow.cpp CompilationWidget.cpp CompileHighlighter.cpp ConfigDialog.cpp) + +QT4_WRAP_CPP(MOC_EASYCHAMS MainWindow.h CompilationWidget.h CompileHighlighter.h ConfigDialog.h) + +IF(APPLE) + ADD_EXECUTABLE(easyChams MACOSX_BUNDLE ${MOC_EASYCHAMS} ${CPP_FILES}) +ELSE(APPLE) + ADD_EXECUTABLE(easyChams ${MOC_EASYCHAMS} ${CPP_FILES}) +ENDIF(APPLE) + +TARGET_LINK_LIBRARIES(easyChams ${QT_LIBRARIES}) +INSTALL(TARGETS easyChams DESTINATION /) diff --git a/bootstrap/easyChams/compile.sh b/bootstrap/easyChams/compile.sh index 56e63490..a4ab8a31 100755 --- a/bootstrap/easyChams/compile.sh +++ b/bootstrap/easyChams/compile.sh @@ -1,8 +1,13 @@ #!/bin/bash -qmake -project -case "`uname -s`" in - Linux) qmake;; - Darwin) qmake -spec macx-g++;; -esac -make -j2 && make clean +if [ ! -e "./compile.sh" ]; then + echo "You must run compile.sh in its own direcotry : ./compile.sh" + exit 1 +fi + +if [ ! -d "build" ]; then + echo "Creating build directory" + mkdir build +fi + +cd build && cmake .. && make DESTDIR=.. -j2 install