CMakeLists.txt 1.9 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}/../submodules/config/src
    ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/global/src
    ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/logutils/src
    ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/interfaces/src
    ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/datatypes/src
    ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/dbconnector/src
    ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/transqueue/src
    ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/pugixml/src
)

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}
)

include(installation)
install_component()