CMakeLists.txt 1.85 KB
cmake_minimum_required(VERSION 3.0)
include(projectheader)
project_header(orm)

find_package( Qt5Core REQUIRED )
find_package( Qt5Sql REQUIRED )

include_directories( SYSTEM
    ${Qt5Core_INCLUDE_DIRS}
    ${Qt5Sql_INCLUDE_DIRS}
)

include(compiler)

include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}/../config
    ${CMAKE_CURRENT_SOURCE_DIR}/../global
    ${CMAKE_CURRENT_SOURCE_DIR}/../logutils
    ${CMAKE_CURRENT_SOURCE_DIR}/../../interfaces
    ${CMAKE_CURRENT_SOURCE_DIR}/../datatypes
    ${CMAKE_CURRENT_SOURCE_DIR}/../dbconnector
    ${CMAKE_CURRENT_SOURCE_DIR}/../transqueue
    ${CMAKE_CURRENT_SOURCE_DIR}/../pugixml
)

set(SRC_LIST
    ${CMAKE_CURRENT_SOURCE_DIR}/multisortfilterproxymodel.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/ormhandler.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/ormthread.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/ormtable.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/ormtablerow.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/ormbatchchange.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/ormbatchchange.h
    ${CMAKE_CURRENT_SOURCE_DIR}/multisortfilterproxymodel.h
    ${CMAKE_CURRENT_SOURCE_DIR}/ormhandler.h
    ${CMAKE_CURRENT_SOURCE_DIR}/ormthread.h
    ${CMAKE_CURRENT_SOURCE_DIR}/ormtable.h
    ${CMAKE_CURRENT_SOURCE_DIR}/ormtablerow.h
    ${CMAKE_CURRENT_SOURCE_DIR}/timeline.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/timeline.h
    ${CMAKE_CURRENT_SOURCE_DIR}/timestamp.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/timestamp.h
)

include(qtmoc)
create_mocs( SRC_LIST MOC_LIST
    ${CMAKE_CURRENT_SOURCE_DIR}/multisortfilterproxymodel.h
    ${CMAKE_CURRENT_SOURCE_DIR}/ormhandler.h
    ${CMAKE_CURRENT_SOURCE_DIR}/ormthread.h
    ${CMAKE_CURRENT_SOURCE_DIR}/ormtable.h
)

link_directories(
    ${CMAKE_BINARY_DIR}/lib
)

include(library)
add_libraries(
    ${Qt5Core_LIBRARIES}
    ${Qt5Sql_LIBRARIES}
    global
    logutils
    datatypes
    dbconnector
    transqueue
)

include(installation)
install_component()