Commit 40719a6e authored by Dario Freddi's avatar Dario Freddi

Switch to cmake. I'll eventually switch back later, I can't afford losing that much time

Signed-off-by: default avatarDario Freddi <drf@kde.org>
parent 67e8f49d
project(akabeicore)
cmake_minimum_required(VERSION 2.6.0)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
set(MAJOR_AKABEI_VERSION 2 CACHE INT "Akabei's major version number" FORCE)
set(MINOR_AKABEI_VERSION 3 CACHE INT "Akabei's minor version number" FORCE)
set(PATCH_AKABEI_VERSION 3 CACHE INT "Akabei's patch version number" FORCE)
set(FIX_AKABEI_VERSION 6 CACHE INT "Akabei's fix version number" FORCE)
set(AKABEI_VERSION_STRING "${MAJOR_AKABEI_VERSION}.${MINOR_AKABEI_VERSION}.${PATCH_AKABEI_VERSION}.${FIX_AKABEI_VERSION}")
# requires minimal Qt 4.4
set(QT_MIN_VERSION "4.4.0")
find_package(Qt4 REQUIRED)
include_directories(
${QT_INCLUDES}
${LIBARCHIVE_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/lib
${CMAKE_SOURCE_DIR}/lib
)
option(BUILD_TESTS "Builds various tests and examples for Akabei" ON)
add_subdirectory(lib)
### Source tarball autogeneration ###
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${AKABEI_VERSION_STRING})
add_custom_target(dist
COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD
| bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
#version check qt
contains(QT_VERSION, ^4\.[0-5]\..*) {
message("Cannot build Qt Creator with Qt version $${QT_VERSION}.")
error("Use at least Qt 4.6.")
}
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = lib benchmarks
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
set(AKABEI_CORE_SRCS
akabeibackend.cpp
akabeidatabase.cpp
akabeioperation.cpp
akabeioperationrunner.cpp
akabeipackage.cpp
)
set(AKABEI_OPERATION_SRCS
operations/akabeiplaininstalloperation.cpp
)
qt4_automoc(${AKABEI_CORE_SRCS})
qt4_automoc(${AKABEI_OPERATION_SRCS})
add_library(akabeicore SHARED ${AKABEI_CORE_SRCS} ${AKABEI_OPERATION_SRCS})
set_target_properties(akabeicore PROPERTIES VERSION ${MAJOR_AKABEI_VERSION}.${MINOR_AKABEI_VERSION}.${PATCH_AKABEI_VERSION}
SOVERSION ${MAJOR_AKABEI_VERSION}
)
target_link_libraries(akabeicore
${QT_QTCORE_LIBRARY}
)
TEMPLATE = subdirs
SUBDIRS = database
TEMPLATE = app
QT -= gui
QT += testlib
LIBS += -L../../lib -lakabeicore
HEADERS += databasebenchmark.h
SOURCES += databasebenchmark.cpp
# -------------------------------------------------
# Project created by QtCreator 2010-03-07T17:52:44
# -------------------------------------------------
QT -= gui
TARGET = akabeicore
TEMPLATE = lib
DEFINES += AKABEICORE_LIBRARY
LIBS += -L/usr/lib -lsqlite3
VERSION = 0.0.1
SOURCES += akabeibackend.cpp \
akabeidatabase.cpp \
akabeipackage.cpp \
akabeioperation.cpp \
akabeioperationrunner.cpp \
operations/akabeiplaininstalloperation.cpp
HEADERS += akabeibackend.h \
akabeicore_global.h \
akabeidatabase.h \
akabeipackage.h \
akabeioperation.h \
akabeioperationrunner.h \
operations/akabeiplaininstalloperation.h \
akabeioperation_p.h \
akabeidatabase_p.h \
akabeipackage_p.h \
akabeioperationrunner_p.h
<!DOCTYPE QtCreatorProject>
<qtcreator>
<data>
<variable>RunConfiguration0-Arguments</variable>
<valuelist type="QVariantList"/>
</data>
<data>
<variable>RunConfiguration0-BaseEnvironmentBase</variable>
<value type="int">2</value>
</data>
<data>
<variable>RunConfiguration0-Executable</variable>
<value type="QString"></value>
</data>
<data>
<variable>RunConfiguration0-RunConfiguration.name</variable>
<value type="QString">Custom Executable</value>
</data>
<data>
<variable>RunConfiguration0-UseTerminal</variable>
<value type="bool">false</value>
</data>
<data>
<variable>RunConfiguration0-UserEnvironmentChanges</variable>
<valuelist type="QVariantList"/>
</data>
<data>
<variable>RunConfiguration0-UserName</variable>
<value type="QString"></value>
</data>
<data>
<variable>RunConfiguration0-UserSetName</variable>
<value type="bool">false</value>
</data>
<data>
<variable>RunConfiguration0-WorkingDirectory</variable>
<value type="QString">$BUILDDIR</value>
</data>
<data>
<variable>RunConfiguration0-type</variable>
<value type="QString">ProjectExplorer.CustomExecutableRunConfiguration</value>
</data>
<data>
<variable>activeRunConfiguration</variable>
<value type="int">0</value>
</data>
<data>
<variable>activebuildconfiguration</variable>
<value type="QString">Debug</value>
</data>
<data>
<variable>buildConfiguration-Debug</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
<value key="QtVersionId" type="int">0</value>
<value key="ToolChain" type="int">0</value>
<value key="buildConfiguration" type="int">2</value>
</valuemap>
</data>
<data>
<variable>buildConfiguration-Release</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
<value key="QtVersionId" type="int">0</value>
<value key="buildConfiguration" type="int">0</value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Debug-buildstep0</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Debug-buildstep1</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Debug-cleanstep0</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
<value key="cleanConfig" type="bool">true</value>
<valuelist key="makeargs" type="QVariantList">
<value type="QString">clean</value>
</valuelist>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Release-buildstep0</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Release-buildstep1</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Release-cleanstep0</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
</valuemap>
</data>
<data>
<variable>buildconfigurations</variable>
<valuelist type="QVariantList">
<value type="QString">Debug</value>
<value type="QString">Release</value>
</valuelist>
</data>
<data>
<variable>buildstep0</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
<value key="mkspec" type="QString"></value>
</valuemap>
</data>
<data>
<variable>buildstep1</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
</valuemap>
</data>
<data>
<variable>buildsteps</variable>
<valuelist type="QVariantList">
<value type="QString">trolltech.qt4projectmanager.qmake</value>
<value type="QString">trolltech.qt4projectmanager.make</value>
</valuelist>
</data>
<data>
<variable>cleanstep0</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
<value key="clean" type="bool">true</value>
</valuemap>
</data>
<data>
<variable>cleansteps</variable>
<valuelist type="QVariantList">
<value type="QString">trolltech.qt4projectmanager.make</value>
</valuelist>
</data>
<data>
<variable>defaultFileEncoding</variable>
<value type="QByteArray">UTF-8</value>
</data>
<data>
<variable>project</variable>
<valuemap type="QVariantMap"/>
</data>
</qtcreator>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment