New compile.sh script that use cmake, there should be no more problems on Linux (except for svn old version)
This commit is contained in:
parent
4cf533b392
commit
e5a423fbd7
|
@ -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 /)
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue